
mcp
该仓库提供 GitHub MCP 协议的配置与 AI 工具集成方法。
Repository Info
About This Server
该仓库提供 GitHub MCP 协议的配置与 AI 工具集成方法。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
GitHub MCP Setup
This repository contains the configuration for GitHub MCP (Model Context Protocol) integration with AI tools like Claude.
Setup Instructions
-
Generate a GitHub Personal Access Token:
- Go to GitHub Personal Access Tokens
- Click on "Generate new token" (classic)
- Give your token a descriptive name like "MCP Access"
- Select the necessary scopes:
- For full access to private repositories, select
repo - For access to public repositories only, select
public_repo
- For full access to private repositories, select
- Click "Generate token"
- Copy the generated token (you won't be able to see it again!)
-
Set the Environment Variable:
export GITHUB_PERSONAL_ACCESS_TOKEN="your_token_here"For permanent setup, add this to your shell profile file (~/.zshrc, ~/.bash_profile, etc.)
Alternatively, use the provided setup script:
./setup-token.sh -
Verify the Installation:
- Run the test script:
./test-mcp.js- Or open Claude Desktop or your AI assistant
- Start a new conversation
- Ask it to perform a GitHub-related task
- If properly set up, the AI should be able to interact with your GitHub repositories
Managing GitHub Accounts
If you need to switch between different GitHub accounts, you can use the account manager script:
./github-account-manager.sh
This script provides the following options:
- Check current login status
- Logout from GitHub
- Login to GitHub with a new account
- Exit
The script will:
- Help you logout by removing your current token
- Allow you to login with a different account's token
- Check who you're currently logged in as
- Update your shell configuration if needed
Advanced: Multi-Repository Configuration
For working with multiple Git repositories, you can use the advanced configuration:
-
Copy the
multi-repo-config.jsonfile to~/.cursor/mcp.json:cp multi-repo-config.json ~/.cursor/mcp.json -
Edit the configuration to point to your actual repositories:
{ "mcpServers": { "github-main": { "command": "mcp-github", "args": [] }, "git-repo1": { "command": "uvx", "args": [ "mcp-server-git", "--repository", "/path/to/your/repo1" ] } } } -
When interacting with your AI assistant, specify which repository you want to work with:
- "Show me commits in my git-repo1 repository"
- "Check recent changes in github-main"
Usage Examples
- "Show me my GitHub repositories"
- "Check the latest commits in my repository X"
- "Create a new issue in my repository Y"
- "Show me open pull requests"
- "Clone repository Z to my local machine"
Troubleshooting
If you encounter issues:
- Verify your token has the correct permissions
- Check that the environment variable is properly set (run
echo $GITHUB_PERSONAL_ACCESS_TOKEN) - Restart your AI assistant application
- Ensure the MCP server is properly configured
- Run the test script to verify the installation:
./test-mcp.js
Quick Start
Clone the repository
git clone https://github.com/nareneran/mcpInstall dependencies
cd mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.