GitHub Activity MCP Server

GitHub Activity MCP Server

Enables AI assistants to search and inspect code repositories, manage issues and pull requests, and analyze user contributions.

Category
Visit Server

README

šŸš€ GitHub Activity MCP Server

An MCP (Model Context Protocol) server built with FastMCP and PyGithub that connects AI assistants to GitHub — search repos, manage issues & PRs, analyze contributions, and more.

What is MCP? The Model Context Protocol is an open standard that lets AI assistants connect to external data and tools through a unified interface. Think of it as "USB-C for AI".


✨ Features

This server exposes 13 tools, 3 resource providers, and 3 prompt templates — covering all three MCP primitives.

šŸ”§ Tools (Model-Controlled)

Actions the AI can take autonomously:

Tool Description
search_repositories Search GitHub repos by query, language, stars
get_repository Get detailed repo info (stars, forks, topics, etc.)
get_file_contents Read any file from a repo
list_commits List recent commits with filters
list_issues List issues with state/label/assignee filters
get_issue Get full issue details + comments
create_issue Create a new issue
add_issue_comment Comment on an issue
list_pull_requests List PRs with state/branch filters
get_pull_request Get PR details + merge status
get_pull_request_diff View PR code changes
get_user_profile Get a user's public profile
list_user_repos List a user's repositories

šŸ“¦ Resources (Application-Controlled)

Contextual data the AI can read:

Resource URI Description
github://repo/{owner}/{repo}/readme Repository README (markdown)
github://repo/{owner}/{repo}/tree Full file tree listing
github://repo/{owner}/{repo}/languages Language breakdown with percentages

šŸ’¬ Prompts (User-Triggered)

Pre-built workflow templates:

Prompt Description
analyze-repo Comprehensive repository analysis
review-pr Code review with best practices
issue-triage Categorize and prioritize open issues

šŸ—ļø Architecture

graph LR
    A[AI Assistant] <-->|MCP Protocol| B[GitHub MCP Server]
    B <-->|REST API| C[GitHub API]

    subgraph "MCP Server (FastMCP)"
        B --> D[Tools]
        B --> E[Resources]
        B --> F[Prompts]
    end

    subgraph "Tools"
        D --> D1[Repos]
        D --> D2[Issues]
        D --> D3[Pull Requests]
        D --> D4[Users]
    end

šŸš€ Quick Start

Prerequisites

  • Python ≄ 3.10
  • GitHub Personal Access Token (optional, but recommended for higher rate limits)

Installation

# Clone the repository
git clone https://github.com/YOUR_USERNAME/github-mcp-server.git
cd github-mcp-server

# Install dependencies
pip install fastmcp PyGithub

Set up your GitHub Token (Optional)

Create a Personal Access Token with repo and read:user scopes:

# Linux/macOS
export GITHUB_TOKEN=ghp_your_token_here

# Windows (PowerShell)
$env:GITHUB_TOKEN = "ghp_your_token_here"

Note: Without a token, you're limited to 60 API requests/hour. With a token, you get 5,000/hour.

Run the Server

# Run directly
fastmcp run src/server.py

# Or with Python
python -m src.server

Test with FastMCP Dev Mode

fastmcp dev src/server.py

āš™ļø Configuration

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "github": {
      "command": "fastmcp",
      "args": ["run", "src/server.py"],
      "cwd": "/absolute/path/to/github-mcp-server",
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Cursor

Add to your Cursor MCP config (.cursor/mcp.json in your project or global config):

{
  "mcpServers": {
    "github": {
      "command": "fastmcp",
      "args": ["run", "src/server.py"],
      "cwd": "/absolute/path/to/github-mcp-server",
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

VS Code (GitHub Copilot)

Add to your VS Code settings (.vscode/settings.json):

{
  "mcp": {
    "servers": {
      "github": {
        "command": "fastmcp",
        "args": ["run", "src/server.py"],
        "cwd": "/absolute/path/to/github-mcp-server",
        "env": {
          "GITHUB_TOKEN": "ghp_your_token_here"
        }
      }
    }
  }
}

šŸ“ Project Structure

github-mcp-server/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ __init__.py
│   ā”œā”€ā”€ server.py             # FastMCP server instance & entry point
│   ā”œā”€ā”€ github_client.py      # PyGithub client wrapper & error handling
│   ā”œā”€ā”€ resources.py          # Resource providers (README, tree, languages)
│   ā”œā”€ā”€ prompts.py            # Prompt templates (analyze, review, triage)
│   └── tools/
│       ā”œā”€ā”€ __init__.py
│       ā”œā”€ā”€ repos.py          # Repository tools (search, get, file contents, commits)
│       ā”œā”€ā”€ issues.py         # Issue tools (list, get, create, comment)
│       ā”œā”€ā”€ pulls.py          # Pull request tools (list, get, diff)
│       └── users.py          # User tools (profile, repos)
ā”œā”€ā”€ pyproject.toml
ā”œā”€ā”€ README.md
ā”œā”€ā”€ LICENSE
└── .gitignore

šŸ› ļø Tech Stack

Technology Purpose
FastMCP High-level MCP server framework
PyGithub GitHub REST API client
Model Context Protocol The open standard for AI-tool integration

šŸ¤ Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

šŸ“„ License

This project is licensed under the MIT License — see the LICENSE file for details.


<p align="center"> Built with ā¤ļø using FastMCP and the Model Context Protocol </p>

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