home / mcp / github mcp server
Provides GitHub data (repos, issues, PRs, and code search) to MCP clients via HTTP and local stdio interfaces.
Configuration
View docs{
"mcpServers": {
"akarnik23-mcp-github": {
"url": "https://github-mcp.onrender.com/mcp",
"headers": {
"GITHUB_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}You can run a FastMCP server that exposes GitHub data to MCP clients. This server lets you fetch a user’s repositories, issues, pull requests, and perform code searches on GitHub, all accessible through MCP-compatible endpoints. It requires a GitHub token for API access and can be deployed locally or hosted in the cloud for integration with your workflows.
To use this MCP server, connect your MCP client to the provided MCP URL or run it locally and call the available tools. You can query a user’s repositories, list issues for a repository, fetch open pull requests, and search code on GitHub. Each operation is exposed as a distinct tool you can invoke from your MCP client.
Prerequisites you need before installing: Python 3.x and access to install Python dependencies.
1. Install dependencies from the requirements file.
pip install -r requirements.txt2. Set your GitHub access token so the server can authenticate with the GitHub API.
export GITHUB_TOKEN=your_token_here3. Run the server locally using Python.
python src/server.pyDeployment can be hosted on Render. Use the following steps to deploy and configure the service.
# Deploy to Render and set up environment variables
# This is a summary of the deployment steps shown in the deployment notes.The server exposes these MCP tools for integration with clients: get_repos, get_issues, get_pull_requests, and search_code. Each tool maps to a specific GitHub data endpoint and accepts parameters such as username, repository, state, and query terms.
If you hit API rate limits, ensure you provide a GitHub token for higher quotas. The GitHub API limits are higher when a token is supplied and lower when you operate anonymously.
Use your MCP client to call the available tools in your desired context. For example, you can fetch a user’s repositories, list open issues, retrieve open PRs, or search for code on GitHub.
Your server will be available at the provided MCP URL once deployed. The local development flow runs the server with the standard Python command shown above.
Keep your GitHub token secure. Do not share the token or commit it to source control. Rotate tokens as needed and restrict scopes to what you actually use (repo and public_repo).
If the server fails to start, verify that Python 3.x is installed, dependencies are installed from requirements.txt, and GITHUB_TOKEN is set in your environment before launching the server.
Fetch repositories for a specified GitHub user. Supports limiting the number of results to control response size.
Retrieve issues for a given repository, with optional state filter (open, closed) and limit.
List pull requests for a repository with optional state and limit parameters.
Search GitHub code across repositories with an optional language filter and limit.