MCP GitHub Navigator

MCP GitHub Navigator

MCP server for AI agents to securely access GitHub data, including listing repositories and user profile info via the GitHub API.

Category
Visit Server

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_TOKEN environment variable.

LLD (Low-Level Design)

  • Entry Point: src/index.ts is the main entry point which initializes the Server instance and maps MCP capabilities.
  • Tools Registered:
    • get_user: Uses GET /user to return the authenticated GitHub profile.
    • list_repos: Uses GET /user/repos?sort=updated&per_page=10 to return recently active repositories.
  • Data Flow: When an AI client sends a CallToolRequestSchema for list_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 Jest for executing test suites.
  • Mocking: Testing relies on mocking the axiosInstance using libraries like nock or axios-mock-adapter to 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/client to test the end-to-end flow of standard CallTool requests.

Setup Instructions

Prerequisites

  • Node.js (v16 or higher)
  • A GitHub Personal Access Token (PAT)

Installation

  1. Clone the repository:
    git clone https://github.com/RachitJava/mcp-github.git
    cd mcp-github
    
  2. Install dependencies:
    npm install
    
  3. 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

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.

Official
Featured
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured