github -
AI agent deploy
claude mcp add --transport stdio balajirajput96-github-mcp-server- node /path/to/github-mcp-server/dist/index.js \ --env GITHUB_TOKEN="your_github_token_here"
How to use
This MCP server provides a GitHub API integration for AI agents via the Model Context Protocol. It exposes tools to list and inspect repositories, manage issues and pull requests, read file contents from repos, and retrieve authenticated user information. With MCP-compliant endpoints, you can discover available actions, execute tasks in sequence, and receive structured responses suitable for AI tooling such as Claude Desktop. To use it, configure the MCP server in your AI assistant (for example Claude Desktop) by pointing to the node server (dist/index.js) and supplying a GitHub token via environment variable GITHUB_TOKEN. Once connected, you can ask the agent to list repositories, fetch repository details, create issues, view pull requests, read file contents, and obtain user information. The server also includes security features to redact sensitive data and validate inputs to prevent token exposure during interactions.
Capabilities include: list_repositories, get_repository, list_issues, create_issue, get_issue, list_pull_requests, get_pull_request, get_commit, get_release, get_file_content, and resources access like github://user for authenticated user information. Use these tools to perform common GitHub tasks directly through the MCP interface, enabling automation and integration with other enterprise tools.
How to install
Prerequisites:
- Node.js 18 or later installed on the machine
- GitHub Personal Access Token with at least repo and read:user scopes
Installation steps:
- Clone the repository:
git clone https://github.com/balajirajput96/github-mcp-server-.git
cd github-mcp-server-
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
# Edit .env and add your GitHub token if a token is used by the project
- Build the project (if applicable):
npm run build
- Start the server:
npm start
- Verify the MCP endpoint is up and responding to MCP protocol calls (expect stdio-based MCP communication when using direct MCP usage).
Docker alternative:
# Build image
docker build -t github-mcp-server .
# Run container (provide token securely via env)
docker run -e GITHUB_TOKEN=your_token_here github-mcp-server
Additional notes
Tips and notes:
- Always store GitHub tokens in environment variables rather than hard-coding them. Use GITHUB_TOKEN as the primary token env var.
- For local testing, point your MCP consumer to the built dist/index.js as shown in the example configuration.
- If you regenerate a GitHub token, update the .env file and restart the server.
- The server supports enterprise integrations via additional modules; ensure you enable or configure those as needed in your environment.
- When deploying in containers, mount data directories as needed and consider using a secret management solution for tokens.
- Check the Security section of the repository for best practices around token exposure, input validation, and redaction in responses.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.