Get the FREE Ultimate OpenClaw Setup Guide →

GitHub

🧠🤖 MCP-compliant AI agent server in TypeScript 🚀 — Extend Claude & others with 🐙 GitHub Repos, Issues, Pull Requests & Actions superpowers! Ready-to-use executables available for macOS & Windows

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio chayan-1906-github-mcp node dist/server.js \
  --env PORT="20253" \
  --env DB_NAME="github" \
  --env CLIENT_ID="your_github_client_id" \
  --env MONGODB_URI="your_mongodb_connection_string" \
  --env TOKEN_SECRET="your_token_secret" \
  --env CLIENT_SECRET="your_github_client_secret" \
  --env GITHUB_CALLBACK_URL="http://localhost:20253/github/oauth/callback"

How to use

GitHub-MCP is an MCP-compliant server built with TypeScript that extends Claude and other AI agents with specialized GitHub capabilities. It provides tools to manage and interact with GitHub data such as repositories, issues, pull requests, branches, releases, and actions. After starting the server, you can browse the available tools via the provided UI at the configured port (default 20253) and prompt Claude or other agents to use the GitHub tools for tasks like listing repositories, getting repository details, creating repositories, and managing collaborators. To use the tools effectively, authenticate with a GitHub account to enable OAuth-scoped access; the tools automatically handle API calls and return structured results that you can present in your prompts or workflows. When prompting, instruct the agent to use the available GitHub tools to ensure actions are executed through the MCP rather than external web searches.

How to install

Prerequisites:

  • Node.js 16.x or newer and npm
  • MongoDB instance reachable at the configured MONGODB_URI
  • A GitHub OAuth App with client ID and secret

Installation steps:

  1. Clone the repository: git clone https://github.com/chayan-1906/GitHub-MCP.git cd GitHub-MCP

  2. Install dependencies: npm install

  3. Configure credentials: Create or edit src/config/config.ts and set:

    • PORT = 20253
    • DB_NAME = github
    • CLIENT_ID = your_github_client_id
    • CLIENT_SECRET = your_github_client_secret
    • GITHUB_CALLBACK_URL = http://localhost:20253/github/oauth/callback
    • MONGODB_URI = your_mongodb_connection_string
    • TOKEN_SECRET = a securely generated hex string Example snippet: export const PORT = 20253 export const DB_NAME = "github" export const CLIENT_ID = "your_github_client_id" export const CLIENT_SECRET = "your_github_client_secret" export const GITHUB_CALLBACK_URL = http://localhost:${PORT}/github/oauth/callback export const MONGODB_URI = "your_mongodb_connection_string" export const TOKEN_SECRET = "your_token_secret"
  4. Generate a secure token secret (optional but recommended): openssl rand -hex 32

  5. Run the server (development): npm run dev

  6. Build and package (optional): npm run build npm run bundle npm run package

Additional notes

Notes and tips:

  • This MCP server can also run via pre-built executables for macOS, Windows, and Linux as described in the Quick Start section to avoid Node.js dependencies on the client machine.
  • The server exposes a web UI at http://localhost:20253/ to explore available tools and understand descriptions.
  • If you need to switch GitHub accounts, visit http://localhost:20253/auth to complete the OAuth flow for the desired account.
  • Ensure you provide valid MongoDB connection details and GitHub OAuth credentials before starting the server.
  • The port, database name, and OAuth settings are configurable; adjust them in src/config/config.ts or environment variables as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers