Get the FREE Ultimate OpenClaw Setup Guide →

github -

AI agent deploy

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository:
git clone https://github.com/balajirajput96/github-mcp-server-.git
cd github-mcp-server-
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env
# Edit .env and add your GitHub token if a token is used by the project
  1. Build the project (if applicable):
npm run build
  1. Start the server:
npm start
  1. 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

Sponsor this space

Reach thousands of developers