GitHub MCP Server

GitHub MCP Server

A Model Context Protocol (MCP) server that connects Claude AI directly to the GitHub API, enabling natural language queries for live repository data, issues, PRs, and contributions.

Category
Visit Server

README

šŸ¤– GitHub MCP Server — Your AI-Powered GitHub Assistant

Ask Claude anything about a GitHub repo — and it actually does it.

Demo


What is this?

This is a Model Context Protocol (MCP) server that connects Claude AI directly to the GitHub API.

Instead of copy-pasting repo links and asking Claude to "analyze this", you just talk to Claude naturally:

"Get the stats for facebook/react" "Find good first issues in microsoft/vscode" "Summarize PR #42 for vercel/next.js"

And Claude calls the right tool, fetches live data from GitHub, and gives you a clean, formatted answer — all inside Claude Desktop.

No browser switching. No manual copy-paste. Just ask.


Tools Available

Tool What it does
get_repo_stats Stars, forks, language, license, last push — everything at a glance
get_open_issues Lists open issues with labels, age, and comment count
get_contributors Top contributors ranked by commits, with percentage insights
summarize_pull_request Fetches PR diffs and generates an AI summary with risk level
find_good_first_issues Finds beginner-friendly issues filtered by label — great for open source contributions

How it works

You (in Claude Desktop)
        ↓
   Claude AI
        ↓
  MCP Server (this project)
        ↓
   GitHub REST API  +  Groq AI
        ↓
  Formatted response back to Claude

When you ask Claude about a repo, it calls one of the tools registered in this server. The server fetches data from GitHub, optionally runs it through Groq for AI summaries, formats everything into clean markdown, and sends it back to Claude to show you.


Tech Stack

  • Runtime — Node.js + TypeScript
  • MCP SDK — @modelcontextprotocol/sdk (connects to Claude Desktop)
  • GitHub API — via axios with token auth
  • AI Summaries — Groq API (fast, free tier available)
  • Config — dotenv for environment variables

Project Structure

src/
ā”œā”€ā”€ server.ts              # Entry point — wires up the MCP server
ā”œā”€ā”€ tools/
│   ā”œā”€ā”€ registry.ts        # Tool registry — all tools defined and dispatched here
│   ā”œā”€ā”€ issues.ts          # Open issues logic
│   ā”œā”€ā”€ contributors.ts    # Contributors logic
│   ā”œā”€ā”€ pullRequest.ts     # PR fetch + AI summary
│   └── goodFirstIssues.ts # Beginner issue finder
ā”œā”€ā”€ services/
│   ā”œā”€ā”€ githubService.ts   # Shared GitHub axios client
│   └── aiService.ts       # Groq AI summarization
└── utils/
    └── formatters.ts      # Markdown formatters for all tool responses

Getting Started

1. Clone and install

git clone https://github.com/aviralkaushik412/github-mcp-server
cd github-mcp-server
npm install

2. Set up environment variables

Create a .env file in the root:

GITHUB_TOKEN=your_github_personal_access_token
GROQ_API_KEY=your_groq_api_key

3. Connect to Claude Desktop

Open your Claude Desktop config file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this:

{
  "mcpServers": {
    "github-mcp-server": {
      "command": "npx",
      "args": ["ts-node", "/absolute/path/to/src/server.ts"]
    }
  }
}

4. Restart Claude Desktop and start asking

"Get stats for torvalds/linux"
"Find good first issues in facebook/react"
"Summarize PR #1 for aviralkaushik412/SkillMirror"

Screenshots

Repo Stats

Repo Stats

PR Summary with AI

PR Summary

Current working

Good First Issues


What I learned building this

This project taught me a lot about how AI models actually work with tools — not just answering questions from memory, but taking actions and fetching real-time data.

A few things that were genuinely tricky:

  • MCP servers communicate over stdout as a JSON stream — one stray console.log() breaks everything silently
  • Claude decides which tool to call based on the tool's description field — so wording matters a lot
  • Structuring responses as clean markdown makes Claude's output dramatically better

Coming Soon

  • [ ] explain_repository — AI-generated plain-English explanation of what any repo does
  • [ ] analyze_pr_risk — flags high-risk PRs based on file count, diff size, and sensitive paths
  • [ ] React dashboard frontend for non-Claude-Desktop users

Resume Bullet Points

If you're here from my resume, here's the one-liner version:

Built a production-ready Model Context Protocol (MCP) server in TypeScript that connects Claude AI to the GitHub REST API and Groq AI, enabling natural language queries over live repository data via 5 registered tools with structured error handling, formatted markdown responses, and a tool registry pattern.


Author

Aviral Kaushik github.com/aviralkaushik412


Built with Claude Desktop, TypeScript, and a lot of stderr debugging.

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
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
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
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