GitHub

Queries GitHub data and automates actions via a code-first MCP server with token-efficient execution.
  • typescript

4

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "crypto-ninja-mcp-server-for-github": {
      "command": "python3",
      "args": [
        "-m",
        "github_mcp"
      ],
      "env": {
        "GITHUB_TOKEN": "YOUR_TOKEN",
        "MCP_WORKSPACE_ROOT": "/path/to/your/project"
      }
    }
  }
}

This GitHub MCP Server lets you control GitHub operations from your MCP client with a code-first approach. You write TypeScript code that calls a single execute_code tool, which orchestrates hundreds of GitHub actions under the hood while keeping token usage low and workflows highly programmable.

How to use

You interact with the server from your MCP client by writing TypeScript code inside execute_code. Use callMCPTool to invoke any available GitHub operation by name, pass the required parameters, and receive a structured result. You can chain multiple tool calls within a single execution to perform complex workflows efficiently. For example, you can fetch repository information, create an issue, and update labels all in one execution, reducing back-and-forth and token load.

How to install

Prerequisites you need on your machine: a Deno-compatible runtime, and a GitHub authentication method (Personal Access Token or GitHub App). You will also set up an MCP client configuration to run the MCP server.

Step 1: Prepare your MCP server config for stdio mode. Use the exact command and arguments shown here to start the server.

{
  "mcpServers": {
    "github_mcp": {
      "command": "python3",
      "args": ["-m", "github_mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here",
        "MCP_WORKSPACE_ROOT": "/path/to/your/project"
      }
    }
  }
}

Additional setup notes

Note: The server uses a code-first architecture. You interact with a single tool named execute_code, and your code routes through a secure Deno runtime to access the internal tool set. You’ll still have access to all underlying 112 GitHub tools through callMCPTool, but you only expose one entry point to your MCP client to maximize token efficiency.

Configuration & authentication

Configure authentication to balance rate limits and reliability. You can use GitHub App authentication for higher rate limits or fallback to Personal Access Tokens for operations that GitHub Apps cannot perform.

Keyboard-friendly quick start configuration for a single GitHub MCP server in stdio mode:

{
  "mcpServers": {
    "github": {
      "command": "python",
      "args": ["-m", "github_mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here",
        "GITHUB_APP_ID": "123456",
        "GITHUB_APP_INSTALLATION_ID": "12345678",
        "GITHUB_APP_PRIVATE_KEY_PATH": "/path/to/private-key.pem",
        "MCP_WORKSPACE_ROOT": "/path/to/your/project"
      }
    }
  }
}

Security

Code execution runs in a restricted Deno sandbox with network access limited to the GitHub API, no file system write access, and a 60-second timeout. This minimizes risk when executing user-provided code.

Troubleshooting

If you encounter authentication issues, verify that your GITHUB_TOKEN is set and has the appropriate scopes (repo, workflow). If you are using a GitHub App, ensure the Installation ID and private key path are correct. You can enable debug diagnostics with an environment flag to get more insight into the auth flow.

Usage patterns and examples

The code-first approach lets you compose multiple GitHub actions inside a single execute_code call. You can discover tools, learn their parameters, and then call them as needed. Examples you’ll often implement: create an issue, fetch repo info, and update PRs or files in a single, cohesive workflow.

Available tools

github_create_issue

Create a new issue in a repository with title, body, labels, and assignees.

github_get_repo_info

Retrieve repository metadata including description, stars, forks, and default branch.

github_update_issue

Update issue fields such as status, labels, and assignees with conflict checks.

github_list_issues

List issues with filters for state, labels, assignees, and milestones.

github_list_prs

List pull requests with state filters and basic metadata.

github_get_pr_details

Fetch comprehensive PR details including reviews, commits, and changed files.

github_create_pr

Open a new pull request with title, body, and branch origin.

github_merge_pr

Merge a PR using specified merge method (merge, squash, or rebase).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
GitHub MCP Server - crypto-ninja/mcp-server-for-github | VeilStrat