Github To MCP Server

Convert any GitHub repository into an MCP server

Local serverstdioPython

What is the Github To MCP MCP server?

Github To MCP MCP server exists for a simple reason — assistants are far more useful when they can act on Github To MCP directly instead of describing what you should do. Convert any GitHub repository into an MCP server.

What the assistant can call

Once Github To MCP is connected, these are the calls the assistant has available:

  • get_readme — Retrieve the repository's README content
  • list_files — List files and directories at a given path
  • read_file — Read the contents of a specific file
  • search_code — Search for patterns across the repository
  • Format — File Patterns
  • OpenAPI — openapi.json, openapi.yaml, swagger.json, swagger.yaml, api.json, api.yaml
  • GraphQL — schema.graphql, *.gql, schema.json
  • Cursor — Cursor supports MCP servers through its settings. Add the server path in Cursor's MCP configuration panel, or edit the configuration file directly:
  • Prerequisites — The Prerequisites tool exposed by this server
  • Building — The Building tool exposed by this server
  • Testing — The Testing tool exposed by this server

Configuration and credentials

You will need 2 environment variables: GITHUB_TOKEN, GITHUB_API_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

| Requirement | Version | |-------------|---------| | Node.js | 22.x or later | | pnpm | 10.x or later | | Git | 2.x or later |

Setting it up

@nirholas/github-to-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Choosing this one

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Github To MCP's toolset — get_readme, list_files, read_file and 8 more — is a fair guide to whether it matches your workflow. It is maintained by nirholas; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 11 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Github To MCP.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the github to mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
get_readmeRetrieve the repository's README content
list_filesList files and directories at a given path
read_fileRead the contents of a specific file
search_codeSearch for patterns across the repository
FormatFile Patterns
OpenAPIopenapi.json, openapi.yaml, swagger.json, swagger.yaml, api.json, api.yaml
GraphQLschema.graphql, *.gql, schema.json
CursorCursor supports MCP servers through its settings. Add the server path in Cursor's MCP configuration panel, or edit the configuration file directly:
PrerequisitesThe Prerequisites tool exposed by this server.
BuildingThe Building tool exposed by this server.
TestingThe Testing tool exposed by this server.

How to install the Github To MCP MCP server

{
  "mcpServers": {
    "github-to": {
      "command": "npx",
      "args": ["-y", "@nirholas/github-to-mcp"],
      "env": {
        "GITHUB_TOKEN": "your-value",
        "GITHUB_API_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

| Requirement | Version | |-------------|---------| | Node.js | 22.x or later | | pnpm | 10.x or later | | Git | 2.x or later |

VariableDescriptionRequired
GITHUB_TOKENCredential the server authenticates with.Yes
GITHUB_API_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Github To MCP to get readme.
  • Use Github To MCP to list files.
  • Use Github To MCP to read file.

Frequently asked questions

It connects Github To MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 11 tools (get_readme, list_files, read_file, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Github To MCP directly.