github-mcp-server-n8n
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
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
- n8n (self-hosted or cloud)
- A GitHub OAuth2 App
- An MCP-compatible AI client (optional)
Quick Start
-
Download the workflow file from
workflow/github-mcp-server.json -
Import into n8n:
- Open your n8n instance
- Go to Workflows β Add Workflow β Import from File
- Select
github-mcp-server.json
-
Set up GitHub OAuth2 (see Configuration)
-
Connect credentials to each GitHub tool node
-
Activate the workflow
-
Connect your AI client to the MCP endpoint
For step-by-step instructions, see docs/installation.md.
βοΈ Configuration
GitHub OAuth2 Setup
- Go to GitHub Developer Settings
- Click New OAuth App
- 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
- Application name:
- Note the Client ID and Client Secret
- In n8n, go to Credentials β Add Credential β GitHub OAuth2 API
- Enter your Client ID and Client Secret
- 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.
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - 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
- n8n β Powerful workflow automation platform
- Model Context Protocol β Open standard for AI tool integration
- GitHub REST API β Comprehensive API for GitHub
Built with β€οΈ for the AI Agent community