Sponsored by Deepsite.site

GitHub MCP Server

Created By
Sami-077 months ago
A Simple custom-built MCP server that provides GitHub integration features through various tools and resources.
Content

GitHub MCP Server

A Simple custom-built MCP server that provides GitHub integration features through various tools and resources.

Demo

https://github.com/user-attachments/assets/63b92a95-56f3-4290-9c73-acc4ad407246

Features

  • Get user information and profile details
  • List user repositories and followers
  • Get repository issues
  • Create new issues
  • Get commit statuses
  • Get owner information
  • Resource-based access to GitHub data

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file in the project root and add your GitHub token:
GITHUB_TOKEN=your_github_token_here

You can create a GitHub token at: https://github.com/settings/personal-access-tokens with the following permissions:

  • repo (Full control of private repositories)
  • read:user (Read user profile data)
  • user:follow (Follow and unfollow users)

Available Tools

  • owner_info(): Get information about the authenticated GitHub user
  • get_user_info(username): Get information about a GitHub user
  • list_followers(username, limit=10): List followers for a GitHub user
  • list_repositories(username, limit=5): List repositories for a GitHub user
  • get_repo_issues(owner, repo, state="open"): Get issues for a repository
  • create_issue(owner, repo, title, body, labels=None): Create a new issue
  • get_commit_statuses(owner, repo, sha): Get commit statuses for a specific commit SHA

Available Resources

  • github://user/{username}: Get a user's GitHub profile
  • github://followers/{username}: List a user's followers
  • github://repos/{username}: List a user's repositories
  • github://issues/{owner}/{repo}: Get issues for a repository
  • github://commit-status/{owner}/{repo}/{sha}: Get commit statuses for a specific commit

Running the Server

python server.py

Example Usage

# Get authenticated user information
user_info = owner_info()

# Get user information
user_info = get_user_info("octocat")

# List followers
followers = list_followers("octocat", limit=5)

# List repositories
repos = list_repositories("octocat", limit=3)

# Get repository issues
issues = get_repo_issues("octocat", "Hello-World")

# Create a new issue
new_issue = create_issue(
    "octocat",
    "Hello-World",
    "Bug Report",
    "Found a bug in the code",
    labels=["bug"]
)

# Get commit statuses
statuses = get_commit_statuses("octocat", "Hello-World", "abc123")

Response Format Examples

User Information

{
    "name": "The Octocat",
    "login": "octocat",
    "bio": "GitHub's mascot",
    "public_repos": 8,
    "followers": 1000,
    "following": 9
}

Repository Information

{
    "name": "Hello-World",
    "description": "My first repository",
    "stars": 100,
    "forks": 50,
    "language": "Python"
}

Issue Information

{
    "number": 1,
    "title": "Bug Report",
    "state": "open",
    "created_at": "2024-05-04T14:35:40.784Z",
    "user": "octocat"
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
Amap Maps高德地图官方 MCP Server
Tavily Mcp
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code