Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A minimal MCP server for GitHub that enables browsing repos, reading code, searching, and getting insights through natural language via Claude, Cursor, or any MCP client.

README.md

github-mcp-server

A minimal MCP server for GitHub in ~140 lines of Python. Browse repos, read code, search, and get insights — all through natural language via Claude, Cursor, or any MCP client.

Tools

| Tool | Description | |------|-------------| | list_repos | List repositories with language, stars, and last update | | get_repo_structure | View the file tree of any repo | | get_file | Read any file's content | | search_code | Search code across your repos | | list_issues | Get open/closed issues | | get_commits | Recent commit history | | repo_stats | Languages breakdown, stars, forks, dates |

Quick Start

# Clone
git clone https://github.com/ArnabbLank/github-mcp-server.git
cd github-mcp-server

# Install
pip install -e .

# Configure
cp .env.example .env
# Edit .env with your GitHub token (Settings → Developer settings → Personal access tokens)

# Run
mcp dev server.py

Connect to Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "github": {
      "command": "python",
      "args": ["/path/to/github-mcp-server/server.py"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token",
        "GITHUB_OWNER": "your_username"
      }
    }
  }
}

Restart Claude Desktop. You can now ask things like:

  • "Show me my recent repos"
  • "Read the README from my EnvCraft project"
  • "Search for uses of FastAPI across my repos"
  • "What issues are open on github-mcp-server?"

How It Works

This server implements the Model Context Protocol using fastmcp. Each tool is a Python function decorated with @mcp.tool() — the MCP client (Claude, Cursor) discovers them automatically and calls them when relevant.

┌─────────────┐       MCP (stdio/SSE)       ┌──────────────┐      HTTPS       ┌────────┐
│ Claude/Cursor│ ◄──────────────────────────► │  server.py   │ ◄──────────────► │ GitHub │
│  (MCP Client)│                              │ (MCP Server) │                  │  API   │
└─────────────┘                               └──────────────┘                  └────────┘

Add Your Own Tool

@mcp.tool()
async def my_tool(repo: str, owner: str = "") -> str:
    """Description shown to the LLM."""
    owner = owner or OWNER
    data = await _get(f"/repos/{owner}/{repo}/whatever")
    return format_data(data)

That's it. The LLM sees the function name, docstring, and parameter types — no extra config needed.

Token Permissions

The GitHub token needs these scopes:

  • repo — for private repo access (optional, skip for public-only)
  • read:user — for listing repos

Generate one at: https://github.com/settings/tokens

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Search servers.