github-mcp-server-n8n

Carlo-KunN/github-mcp-server-n8n Checked 2 days ago

Production-ready GitHub MCP Server built with n8n for AI Agents (Claude, Cursor, and other MCP-compatible clients).

A fully-featured MCP Server that connects AI agents to the GitHub API through n8n. Supports Claude, Cursor, and any MCP-compatible client. GitHub MCP Server for n8n exposes 9 production-ready GitHub tools via the Model Context Protocol (MCP), allowing AI agents to interact with GitHub repositories seamlessly. 1. Download the workflow file from workflow/github-mcp-server.json

Summary extracted from the README.

πŸ€– GitHub MCP Server for n8n

Production-ready GitHub MCP Server built with n8n for AI Agents

Version License: MIT n8n MCP Compatible GitHub Stars

A fully-featured MCP Server that connects AI agents to the GitHub API through n8n. Supports Claude, Cursor, and any MCP-compatible client.

Installation Β· Configuration Β· Usage Β· Examples


πŸ“Έ Screenshots

Screenshots and architecture diagrams coming soon. See docs/architecture.md for detailed architecture.


🌟 Overview

GitHub MCP Server for n8n exposes 9 production-ready GitHub tools via the Model Context Protocol (MCP), allowing AI agents to interact with GitHub repositories seamlessly.

What is it? An n8n workflow that acts as an MCP Server, bridging AI agents and the GitHub API
Why use it? Secure OAuth2 auth, modular design, zero credential exposure to AI clients
Who is it for? AI developers, automation engineers, and anyone building with MCP-compatible clients

✨ Features

  • πŸ” OAuth2 Authentication β€” Secure credential management via n8n
  • πŸ”§ 9 GitHub Tools β€” Repository, issues, PRs, releases, and more
  • πŸ€– MCP Compatible β€” Works with Claude Desktop, Cursor, and other MCP clients
  • πŸ“¦ Import & Go β€” One-click import into any n8n instance
  • πŸ—οΈ Modular Design β€” Each tool is a separate, composable node
  • πŸ›‘οΈ Security First β€” No credentials stored in the workflow; all auth handled by n8n
  • πŸ“‹ AI Agent Ready β€” Optimized for natural language interactions

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          AI Client                  β”‚
β”‚   (Claude, Cursor, etc.)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ MCP Protocol
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      GitHub MCP Server (n8n)        β”‚
β”‚                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  MCP     β”‚  β”‚  GitHub Tools    β”‚ β”‚
β”‚  β”‚  Trigger │──│  β€’ Get Repo      β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ List Issues   β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ Get Issue     β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ Create Issue  β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ Comment Issue β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ Get PR        β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ Comment PR    β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ List Releases β”‚ β”‚
β”‚  β”‚          β”‚  β”‚  β€’ Close Issue   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ OAuth2
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        GitHub REST API              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For a detailed architecture breakdown, see docs/architecture.md.


πŸ“¦ Installation

Prerequisites

Quick Start

  1. Download the workflow file from workflow/github-mcp-server.json

  2. Import into n8n:

    • Open your n8n instance
    • Go to Workflows β†’ Add Workflow β†’ Import from File
    • Select github-mcp-server.json
  3. Set up GitHub OAuth2 (see Configuration)

  4. Connect credentials to each GitHub tool node

  5. Activate the workflow

  6. Connect your AI client to the MCP endpoint

For step-by-step instructions, see docs/installation.md.


βš™οΈ Configuration

GitHub OAuth2 Setup

  1. Go to GitHub Developer Settings
  2. Click New OAuth App
  3. Fill in:
    • Application name: n8n MCP Server
    • Homepage URL: Your n8n instance URL
    • Authorization callback URL: https://your-n8n-instance.com/rest/oauth2-credential/callback
  4. Note the Client ID and Client Secret
  5. In n8n, go to Credentials β†’ Add Credential β†’ GitHub OAuth2 API
  6. Enter your Client ID and Client Secret
  7. Click Connect to authorize

MCP Client Setup

Add the n8n MCP endpoint to your AI client configuration:

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "github": {
      "url": "http://localhost:5678/mcp/github-automation-hub"
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "github": {
      "url": "http://localhost:5678/mcp/github-automation-hub"
    }
  }
}

For detailed configuration, see docs/configuration.md.


πŸš€ Usage

Once connected, simply ask your AI agent to interact with GitHub:

"Get information about the repository vercel/next.js"
"List open issues in facebook/react"
"Create an issue titled 'Bug: Login fails' with description 'Steps to reproduce...'"
"Comment on issue #42 saying 'Looking into this now'"
"Show me the latest releases of microsoft/vscode"

The AI agent will automatically select the right tool and execute the operation.


πŸ› οΈ Available MCP Tools

# Tool Description Inputs
1 Get Repository Info Returns repository metadata owner, repository
2 List Repository Issues Lists issues with state filter owner, repository, state
3 Get Issue Fetches a specific issue owner, repository, issueNumber
4 Create Issue Creates a new issue owner, repository, title, body
5 Create Issue Comment Adds a comment to an issue owner, repository, issueNumber, body
6 Get Pull Request Fetches PR information owner, repository, pullRequestNumber
7 Create Pull Request Comment Adds a comment to a PR owner, repository, pullRequestNumber, body
8 List Releases Lists repository releases owner, repository
9 Close Issue Closes an issue as completed owner, repository, issueNumber

For detailed usage and examples, see docs/usage.md.


πŸ’‘ Example Prompts

What's the description and stars count of torvalds/linux?
Show me the README of openai/whisper
List all open issues in n8n-io/n8n
Create an issue titled "Feature Request: Dark Mode" in my-org/my-repo
What's the latest issue in facebook/react?
Close issue #123 in my-org/my-repo
Show me PR #456 in vercel/next.js
Comment on PR #789 in my-org/my-repo saying "LGTM! Ship it πŸš€"
List the latest releases of microsoft/vscode
What's the latest version of docker/compose?

For more examples, see docs/examples.md.


πŸ”’ Security

This workflow is designed with security as a priority:

  • No credentials stored β€” OAuth tokens are managed entirely by n8n's credential system
  • No secrets in workflow β€” The JSON file contains zero tokens, keys, or passwords
  • OAuth2 only β€” No Personal Access Tokens required
  • Least privilege β€” Request only the permissions you need
  • Audit trail β€” All API calls are logged through n8n's execution history

Permissions Required

Scope Purpose
repo Read/write repository data, issues, and pull requests
read:org (Optional) For organization repositories

Best Practices

  • βœ… Use OAuth2 (not Personal Access Tokens)
  • βœ… Request minimum required permissions
  • βœ… Rotate credentials regularly
  • βœ… Review n8n execution logs periodically
  • ❌ Never share your n8n instance URL publicly
  • ❌ Never commit credentials to version control

For more security details, see SECURITY.md.


πŸ—ΊοΈ Roadmap

v1.0.0 βœ… (Current)

  • Repository information
  • Issue CRUD operations
  • Pull request operations
  • Release management
  • MCP Server trigger
  • OAuth2 authentication

v2.0.0 🚧 (Planned)

  • Branch management (list, create, delete)
  • Commit operations (list, create)
  • File operations (read, update, create)
  • GitHub Actions integration
  • Workflow run management
  • Discussions support
  • Label and milestone management
  • Repository analytics
  • Multi-repository support
  • AI-powered release notes generation

Have a feature request? Open an issue!


πŸ“š Documentation

Document Description
Installation Step-by-step setup guide
Configuration OAuth2, MCP clients, and n8n settings
Usage How to use each tool
Examples Real-world usage examples
Architecture Technical architecture deep-dive
Troubleshooting Common issues and solutions

🀝 Contributing

Contributions are welcome! Whether it's bug reports, feature requests, or pull requests β€” we appreciate your help.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ™ Acknowledgments


Built with ❀️ for the AI Agent community

⬆ Back to top