MCP GitHub Navigator
MCP server for AI agents to securely access GitHub data, including listing repositories and user profile info via the GitHub API.
README
MCP GitHub Navigator
A Model Context Protocol (MCP) server that provides an AI agent with secure access to GitHub data, allowing it to list repositories, view issues, and read files via the GitHub API.
HLD (High-Level Design)
- Architecture: The server is built in Node.js/TypeScript and implements the standard MCP
@modelcontextprotocol/sdk. It uses a StdioServerTransport to communicate directly with any MCP-compatible AI client via standard input/output. - External Integration: Uses Axios to connect to the GitHub REST API (
https://api.github.com). - Authentication: Relies on a Personal Access Token provided via the
GITHUB_TOKENenvironment variable.
LLD (Low-Level Design)
- Entry Point:
src/index.tsis the main entry point which initializes theServerinstance and maps MCP capabilities. - Tools Registered:
get_user: UsesGET /userto return the authenticated GitHub profile.list_repos: UsesGET /user/repos?sort=updated&per_page=10to return recently active repositories.
- Data Flow: When an AI client sends a
CallToolRequestSchemaforlist_repos, the MCP server validates the tool name, invokes the corresponding GitHub API endpoint via Axios, formats the JSON response into a text block, and returns it to the client.
TDD (Test-Driven Development) Strategy
- Frameworks: We recommend using
Jestfor executing test suites. - Mocking: Testing relies on mocking the
axiosInstanceusing libraries likenockoraxios-mock-adapterto simulate GitHub API responses without requiring an active internet connection or hitting API rate limits. - Integration Tests: Creating a mock MCP Client using
@modelcontextprotocol/sdk/clientto test the end-to-end flow of standardCallToolrequests.
Setup Instructions
Prerequisites
- Node.js (v16 or higher)
- A GitHub Personal Access Token (PAT)
Installation
- Clone the repository:
git clone https://github.com/RachitJava/mcp-github.git cd mcp-github - Install dependencies:
npm install - Build the project:
npm run build
Running the Server
The server requires the GITHUB_TOKEN environment variable to be set. You can run it directly:
export GITHUB_TOKEN="your_personal_access_token_here"
npm start
Note: Since this is an MCP server, it is meant to be run by an MCP client (like Claude Desktop) rather than manually.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.