GitHub MCP Server
Allows interaction with the GitHub REST API, providing tools for listing repositories, fetching repository details, managing issues, reading file contents, and searching code.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitHub MCP Server list open issues in the facebook/react repo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHub MCP Server
Custom MCP (Model Context Protocol) server, written in TypeScript, that connects GitHub to the GitHub REST API.
What it does
It exposes 6 tools that Claude can call:
Tool | Description |
| Lists the authenticated user's repositories |
| Details of a specific repository |
| Lists a repository's issues |
| Creates a new issue |
| Reads the contents of a file in the repository |
| Searches code on GitHub |
Related MCP server: PR Reviewer MCP Server
1. Generate a GitHub Personal Access Token
Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
Create a token with the minimum required permissions:
Contents: Read(forget_file_content)Issues: Read and write(forlist_issues/create_issue)Metadata: Read(always required)
Copy the generated token (it starts with
github_pat_...)
Security tip: never commit the token to the repository. Use an environment variable.
2. Install and build
npm install
npm run buildThis generates build/index.js, which is the server executable (it communicates via stdio, the standard MCP protocol).
3. Test locally (optional, without Claude)
export GITHUB_PERSONAL_ACCESS_TOKEN="seu_token_aqui"
npm startIf GitHub MCP server rodando via stdio. appears in stderr, it is working. To test the tools interactively, use the MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.js4. Connect to Claude Desktop
Edit the Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/caminho/absoluto/para/github-mcp-server/build/index.js"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "seu_token_aqui"
}
}
}
}Restart Claude Desktop. The GitHub tools should appear in the conversation's tools icon (🔨).
5. Next steps (ideas to expand and boost your portfolio)
Add authoring tools:
create_pull_request,merge_pull_request,create_branchAdd real (cursor-based) pagination instead of just
per_pageRate limiting and caching (GitHub limits authenticated requests to 5000 req/h)
Automated tests with Vitest/Jest
CI with GitHub Actions running lint + tests + build on every push
Publish as a npm package (
npx github-mcp-server)Dockerize the server (good hook to connect with your other DevOps projects)
Project structure
github-mcp-server/
├── src/
│ └── index.ts # lógica do servidor e definição das tools
├── build/ # gerado pelo `npm run build`
├── package.json
├── tsconfig.json
└── README.mdAvailable Tools
6 toolscreate_issueB
Cria uma nova issue em um repositório
Inputs: repo (required), owner (required), title (required), body, +1 more.
get_file_contentB
Lê o conteúdo de um arquivo em um repositório
Inputs: path (required), repo (required), owner (required), ref.
get_repoC
Obtém detalhes de um repositório específico
Inputs: repo (required), owner (required).
list_issuesC
Lista issues de um repositório
Inputs: repo (required), owner (required), state.
list_reposA
Lista os repositórios do usuário autenticado no GitHub
Inputs: sort, per_page.
search_codeA
Busca código no GitHub usando a sintaxe de busca do GitHub
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource/action: repository listing/detail, issue listing/creation, file reading, and code search. No tools appear to overlap in purpose.
All tool names follow a consistent verb_noun pattern such as list_repos, get_repo, list_issues, and create_issue. The naming is predictable and internally consistent.
Six tools provide a reasonable, well-scoped surface for basic GitHub repository queries, issue management, and code search. Each tool earns its place without redundancy.
The set covers a useful read-heavy workflow and issue creation, but it lacks operations like updating/closing issues, repository creation, and pull request access. These are notable gaps within the GitHub domain.
Maintenance
Related MCP Connectors
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Manage repositories, users, releases, and automate GitHub workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to authenticate with GitHub OAuth and access tools for user information, calculations, and GitHub repositories.5MIT
- FlicenseAqualityDmaintenanceConnects Claude to GitHub, enabling listing repositories, browsing open pull requests, and inspecting PR diffs for code review.4-
- AlicenseNot gradedqualityDmaintenanceEnables to interact with GitHub repositories directly from Claude, supporting actions like viewing repos, checking status, committing and pushing changes, and managing pull requests.544 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to query GitHub repositories in plain English, fetching recent activity, release notes, issue triage, and health summaries via the GitHub API.-