Sponsored by Deepsite.site

GitHub MCP Client for Docker GMU Server

Created By
devendershekhawat6 months ago
MCP (Model Context Protocol) client for GitHub Multi-User Server with Claude integration. Interactive chat interface for GitHub operations using natural language.
Content

GitHub MCP Client for Docker GMU Server

This is an MCP (Model Context Protocol) client that connects to the GitHub Multi-User Server (GMU) running in Docker and provides an interactive interface for GitHub operations powered by Claude.

Features

  • 🐳 Docker Integration: Connects to GMU server running in Docker container
  • 🤖 AI-Powered: Uses Claude to interpret natural language queries and call appropriate GitHub tools
  • 🔐 Multi-User Support: Each request uses per-user GitHub Personal Access Tokens
  • 🛠️ Full GitHub API: Access repos, issues, pull requests, users, search, and more
  • 💬 Interactive Chat: Natural language interface for GitHub operations

Prerequisites

  1. Docker & Docker Compose: The GMU server must be running in Docker
  2. Python 3.13+: For running the MCP client
  3. GitHub Personal Access Token: For authenticating with GitHub API
  4. Anthropic API Key: For Claude integration

Quick Setup

1. Install Dependencies

# Using uv (recommended)
uv add mcp anthropic python-dotenv

2. Configure Environment Variables

Create a .env file in the project root:

# GitHub Personal Access Token
# Get this from: https://github.com/settings/tokens
GITHUB_TOKEN=ghp_your_github_personal_access_token_here

# Anthropic API Key for Claude
# Get this from: https://console.anthropic.com/
ANTHROPIC_API_KEY=sk-ant-your_anthropic_api_key_here

3. Start the GMU Server

# Start the GitHub Multi-User Server in Docker
docker-compose up -d

# Verify it's running
docker ps | grep github-mcp-server-multiuser

Usage

Test Connection

First, verify everything is working:

python test_gmu_connection.py

This comprehensive test will:

  • ✅ Test MCP connection to GMU server
  • ✅ Verify GitHub token functionality (if provided)
  • ✅ Test Claude integration
  • ✅ List all available GitHub tools

Interactive MCP Client

Run the main interactive client:

python tests/test_gmu.py

The client will:

  1. Prompt for your GitHub token (if not in environment)
  2. Connect to the GMU server running in Docker
  3. Start an interactive chat interface

Example Commands

Once in the interactive mode, you can use natural language:

❓ Query: Get my GitHub user information
❓ Query: List my repositories
❓ Query: how many repos I have
❓ Query: Search for Python repositories with more than 1000 stars
❓ Query: Create an issue in my test repository
❓ Query: List open pull requests in microsoft/vscode
❓ Query: tools (to see all available GitHub tools)
❓ Query: quit (to exit)

Available GitHub Tools

The GMU server provides access to comprehensive GitHub functionality:

  • User Operations: Get user info, search users
  • Repository Operations: List repos, get contents, create/update files, create branches
  • Issue Management: Create, update, list, comment on issues
  • Pull Request Operations: Create, review, merge PRs, get files/diffs
  • Search: Search repositories, issues, code, users
  • And much more...

Type tools in the interactive mode to see the complete list of 41 available tools.

Architecture

┌─────────────────┐    MCP Protocol    ┌──────────────────┐    GitHub API    ┌─────────────┐
│   MCP Client    │◄──────────────────►│  GMU Server      │◄─────────────────►│   GitHub    │
│ (test_gmu.py)   │                    │  (Docker)        │                  │             │
│                 │                    │                  │                  │             │
└─────────────────┘                    └──────────────────┘                  └─────────────┘
         │                                       │
         │ Anthropic API                         │ 
         ▼                                       │
┌─────────────────┐                             │
│     Claude      │                             │ Per-request auth
│   (Anthropic)   │                             │ with GitHub tokens
└─────────────────┘                             ▼
                                      ┌──────────────────┐
                                      │  GitHub Tools    │
                                      │ (Multi-tenancy)  │
                                      └──────────────────┘

How It Works

  1. Connection: The MCP client connects to the GMU server running in Docker using docker exec
  2. Authentication: Each GitHub API call includes a per-request auth_token parameter
  3. Query Processing: User queries are sent to Claude along with available GitHub tools
  4. Tool Execution: Claude determines which GitHub tools to call and executes them via MCP
  5. Response: Results are formatted and displayed to the user

Troubleshooting

Container Not Running

Error: Container 'github-mcp-server-multiuser' is not running.
Please start the container with: docker-compose up -d

Solution: Start the Docker container:

docker-compose up -d

Missing GitHub Token

🔑 GitHub Personal Access Token required

Solution:

  1. Create a GitHub Personal Access Token at https://github.com/settings/tokens
  2. Add it to your .env file or set the GITHUB_TOKEN environment variable

Missing Anthropic API Key

Error: ANTHROPIC_API_KEY environment variable is required

Solution:

  1. Get an API key from https://console.anthropic.com/
  2. Add it to your .env file as ANTHROPIC_API_KEY

JSON Serialization Errors

The latest version includes robust handling of MCP content types to prevent serialization errors.

MCP Connection Issues

Error connecting to GMU server: ...

Solution:

  1. Verify Docker is running: docker ps
  2. Check container logs: docker-compose logs github-mcp-server
  3. Restart the container: docker-compose restart

Development

Project Structure

├── tests/
│   └── test_gmu.py              # Main MCP client
├── test_gmu_connection.py       # Comprehensive connection tests
├── docker-compose.yaml          # GMU server configuration
├── pyproject.toml              # Project configuration
└── README.md                   # This file

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Test with the GMU server: python test_gmu_connection.py
  4. Test the interactive client: python tests/test_gmu.py
  5. Submit a pull request

License

This project follows the same license as the GitHub MCP Server Multi-User.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
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.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
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.
ChatWiseThe second fastest AI chatbot™
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"
WindsurfThe new purpose-built IDE to harness magic
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
CursorThe AI Code Editor
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Playwright McpPlaywright MCP server
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.
Amap Maps高德地图官方 MCP Server