GitHub Activity MCP Server
Provides tools for interacting with GitHub, including searching repositories, accessing repository contents and commit history, managing issues and pull requests, and retrieving user profile information via the GitHub API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitHub Activity MCP Server Search for Python projects about machine learning"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
š 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 GitHub repos by query, language, stars |
| Get detailed repo info (stars, forks, topics, etc.) |
| Read any file from a repo |
| List recent commits with filters |
| List issues with state/label/assignee filters |
| Get full issue details + comments |
| Create a new issue |
| Comment on an issue |
| List PRs with state/branch filters |
| Get PR details + merge status |
| View PR code changes |
| Get a user's public profile |
| List a user's repositories |
š¦ Resources (Application-Controlled)
Contextual data the AI can read:
Resource URI | Description |
| Repository README (markdown) |
| Full file tree listing |
| Language breakdown with percentages |
š¬ Prompts (User-Triggered)
Pre-built workflow templates:
Prompt | Description |
| Comprehensive repository analysis |
| Code review with best practices |
| Categorize and prioritize open issues |
Related MCP server: GitHub MCP Server
šļø 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 PyGithubSet 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.serverTest 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 |
High-level MCP server framework | |
GitHub REST API client | |
The open standard for AI-tool integration |
š¤ Contributing
Contributions are welcome! Here's how:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
š License
This project is licensed under the MIT License ā see the LICENSE file for details.
Available Tools
13 toolsadd_issue_commentB
Add a comment to an existing GitHub issue.
Inputs: body (required), repo (required), owner (required), issue_number (required). Returns: result
create_issueB
Create a new issue in a GitHub repository.
Inputs: repo (required), owner (required), title (required), body, +2 more. Returns: result
get_file_contentsB
Read the contents of a file from a GitHub repository.
Inputs: path (required), repo (required), owner (required), ref. Returns: result
get_issueA
Get detailed information about a specific issue, including its comments.
Inputs: repo (required), owner (required), issue_number (required). Returns: result
get_pull_requestC
Get detailed information about a specific pull request.
Inputs: repo (required), owner (required), pull_number (required). Returns: result
get_pull_request_diffB
Get the diff/patch of a pull request to review code changes.
Inputs: repo (required), owner (required), pull_number (required). Returns: result
get_repositoryA
Get detailed information about a specific GitHub repository.
Inputs: repo (required), owner (required). Returns: result
get_user_profileA
Get public profile information for a GitHub user.
Inputs: username (required). Returns: result
list_commitsA
List recent commits for a repository, optionally filtered by path or author.
Inputs: repo (required), owner (required), sha, path, +2 more. Returns: result
list_issuesB
List issues in a GitHub repository with optional filters.
Inputs: repo (required), owner (required), sort, state, +3 more. Returns: result
list_pull_requestsC
List pull requests in a GitHub repository.
Inputs: repo (required), owner (required), base, sort, +3 more. Returns: result
list_user_reposB
List repositories for a GitHub user.
Inputs: username (required), sort, per_page. Returns: result
search_repositoriesB
Search GitHub repositories by query. Supports GitHub search qualifiers.
Inputs: query (required), sort, order, language, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 13 tools
Each tool targets a distinct resource and action: repositories, files, commits, issues, pull requests, and user profiles are cleanly separated. There is no meaningful overlap between tools like get_repository and search_repositories or list_issues and get_issue.
All tool names follow a consistent snake_case verb_noun pattern, such as search_repositories, get_file_contents, and create_issue. Minor semantic differences between verbs like get and list are still predictable and uniform across the set.
Thirteen tools is well within the ideal range for a domain-focused server and each tool covers a meaningful capability. The count feels appropriately scoped for GitHub browsing, issue interaction, and pull request review without being bloated.
The server covers read-heavy repository activity well, including search, file access, commits, issues, pull requests, and user profiles. Issue comments are supported, but lifecycle operations like updating/ closing issues or creating/merging pull requests are absent, which is a minor gap if the server is intended for broader GitHub management.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze GitHub repositories, including fetching repository details, searching, and retrieving README content.489 npm2ISC
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform GitHub operations such as creating repositories, issues, pull requests, and more through natural language.-
- AlicenseBqualityDmaintenanceEnables AI assistants to inspect local Git repositories and interact with the GitHub API for reading commits, diffs, files, issues, comments, pull requests, and project boards.10133 npmISC
- FlicenseCqualityDmaintenanceEnables AI assistants to interact with GitHub repositories via the REST API, supporting repository listing, detail retrieval, and issue management.2-