github-mcp-server
Enables interaction with the GitHub API, providing tools to create repositories, issues, commits, and list repositories and issues.
Click on "Install 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-servercreate an issue in octocat/hello-world titled 'fix typo in readme'"
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
MCP server in Node.js and TypeScript that allows a compatible agent to execute operations on GitHub using natural language.
Architecture
Usuario -> Antigravity (Host) -> MCP Client -> MCP Server -> Octokit -> GitHub APIA chatbot mainly maintains a conversation. An AI assistant helps using additional capabilities. An AI Agent interprets a goal, decides what actions it needs, and uses tools to achieve it.
MCP (Model Context Protocol) standardizes communication between an AI Host, an MCP client, and servers that expose tools or data sources. In this project the transport is stdio: protocol messages use stdin/stdout and logs use stderr.
Related MCP server: GitHub MCP Server
Technologies
Node.js 18 or higher
TypeScript with
strict: true@modelcontextprotocol/sdk@octokit/restzoddotenvVitest
Installation
npm install
npm run buildConfiguration
Copy .env.example as .env and fill in the token locally:
GITHUB_TOKEN=tu_token_de_github.env is excluded by .gitignore and should never be committed.
The token should only have the necessary permissions. For private repositories, fine-grained tokens should allow access to the repository and contents/issues depending on the operation. A classic PAT may require repo. The user permission is only needed for additional user operations, and admin:org is not needed for the current five tools unless that scenario is required. Tokens are not included in examples, tests, logs, or MCP responses.
Scripts
npm run dev # Ejecuta TypeScript directamente
npm run build # Compila a dist/
npm start # Ejecuta el JavaScript compilado
npm test # Ejecuta los tests unitariosMCP Tools
create_repository
Creates a new repository in the authenticated account.
Inputs: name, description.
Returns the full name and URL of the repository.
create_issue
Creates an issue in an existing repository.
Inputs: owner, repo, title, body.
Returns the issue number, title, and URL.
list_repositories
Lists the repositories of the authenticated user.
Optional inputs: page, per_page.
Returns a summarized list with full name and URL.
create_commit
Creates or updates a file and generates the commit using the Contents API.
Inputs: owner, repo, path, message, content; branch is optional.
The tool first queries the file. If it exists, it uses its SHA; if GitHub responds with 404, it creates the file without a SHA.
list_issues
Lists the open issues of a repository and excludes pull requests.
Inputs: owner, repo; page and per_page are optional.
Error Handling
Errors are classified as ValidationError, AuthenticationError, GitHubAPIError, or NetworkError. MCP responses contain actionable messages and do not forward technical messages that could expose credentials.
Operations retry up to three times only on rate limiting, 5xx errors, or recoverable network errors. Validation, authentication, and missing resource errors are not retried.
Tests
Tests do not call real GitHub. They use mocked Octokit clients and cover:
Valid and invalid schemas for repositories and issues.
Creation of repositories and issues.
Listing of repositories and open issues.
Creation of new files.
Updating existing files using SHA.
Error transformation.
Retry with backoff.
Run npm test to run the full suite.
MCP Inspector
Build the project and run the server using the Inspector:
npm run build
npx @modelcontextprotocol/inspector node dist/index.jsSet GITHUB_TOKEN in the environment before starting the Inspector. Verify that the five tools, their descriptions, and schemas appear. For a real test, use a test repository and avoid destructive operations.
Antigravity and VS Code
The file .vscode/mcp.json contains a stdio configuration without versioned credentials. Run npm run build before starting the server from the Host. The configuration runs dist/index.js and takes GITHUB_TOKEN from the local environment.
For another MCP-compatible Host, register the equivalent command:
{
"type": "stdio",
"command": "node",
"args": ["dist/index.js"],
"env": { "GITHUB_TOKEN": "${env:GITHUB_TOKEN}" }
}Make sure the Host detects create_repository, create_issue, list_repositories, create_commit, and list_issues.
Structure
src/
errors/ Errores clasificados y sanitizacion
github/ Cliente Octokit y operaciones GitHub
schemas/ Schemas Zod y tipos inferidos
tools/ Handlers MCP individuales
utils/ Retry, logging, respuestas y ensamblado del servidor
index.ts Entrada y transporte stdio
tests/ Tests unitarios con mocksSecurity
Do not hardcode tokens.
Do not commit
.env.Do not print tokens or authorization headers.
Keep logs on
stderrto avoid contaminating the protocol.Apply the principle of least privilege to the PAT.
Review changes before executing tools that write to GitHub.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables Git repository operations and GitHub PR workflows, allowing users to manage repositories, create branches, commit changes, and create pull requests through natural language.2
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to directly manage GitHub repositories, including PRs, issues, and code search, using natural language.MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that enables GitHub API operations such as managing repositories, issues, and pull requests through natural language.441ISC
- FlicenseNot gradedqualityBmaintenanceMCP server that enables AI agents to perform GitHub operations like creating repositories, issues, and commits through natural language.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
A MCP server built for developers enabling Git based project management with project and personal…
GibsonAI MCP server: manage your databases with natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tongax12/MCP_Server_GastonStratta'
If you have feedback or need assistance with the MCP directory API, please join our Discord server