Skip to content

GitHub Repository Assistant

Read pull requests and repository files with a scoped GitHub token.

Categories
Integration
GitHub
Repositories
Code review
HTTP
Share
Post on X

Read pull requests and repository files with a scoped GitHub token.

Included workflow

  • List pull requests with explicit pagination.
  • Inspect a pull request's description, refs, commit SHAs, and merge status.
  • Read a UTF-8 repository file at a branch, tag, or commit, up to 100,000 bytes.

Create a fine-grained token limited to the intended repositories with Pull requests: read and Contents: read. All tools are read-only. Review comments, diffs, and check results are outside this starter's scope.

Run locally

Use Node 22 and pnpm. This starter lives in the xmcp workspace; run these commands from the repository root:

Shell

Configure examples/github-http/.env with GITHUB_TOKEN, MCP_API_KEY. Generate the separate client secret with openssl rand -hex 32. Keep .env private. Every client request must include MCP_API_KEY as x-api-key; all clients share the provider account permissions.

Shell

Use the endpoint printed by the server, normally http://localhost:3001/mcp. In another terminal, check discovery without invoking a provider tool:

Shell

When ready to use the provider, send this tools/call request through your MCP client:

JSON

Validate and customize

Shell

Tests mock provider calls; they do not use live credentials or perform real provider actions. Add or adapt tools in examples/github-http/src/tools/.

The deployment menu links to setup guides because this workspace example is not a standalone clone-and-deploy project. Configure the provider variables and client authentication for your target host, and follow its transport setup.

Other templates

One framework to rule them all