
mcp demo repo
展示如何使用 GitHub 的模型上下文协议 (MCP) 管理 AI 模型上下文的示例项目。
Repository Info
About This Server
展示如何使用 GitHub 的模型上下文协议 (MCP) 管理 AI 模型上下文的示例项目。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
GitHub MCP Official Demo
This project demonstrates how to use GitHub's official Model Context Protocol (MCP) to manage AI model context. This repository was automatically created to test the complete MCP Server flow.
Requirements
- Python 3.7+
- GitHub Access
- GitHub Personal Access Token with MCP permissions
- Docker
Step-by-Step Setup
-
Clone the repository:
git clone <your-repository> cd github-mcp-official/python -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Create a
.envfile in the project root:# GitHub Configuration GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here GITHUB_USERNAME=your_usernameTo get the token:
- Go to GitHub
- Navigate to Settings > Developer settings > Personal access tokens
- Generate a new token with the following permissions:
repo(Full control of private repositories)workflow(Update GitHub Action workflows)
-
Run the test script:
python test_mcp.py
Testing the MCP Server
The script will:
- Start the MCP Server using Docker
- Create a new repository
- Make an initial commit
- Create a feature branch
- Add a test file
- Create a pull request
Example Output
🚀 Starting MCP Server...
🚀 Creating repository username/mcp-demo-repo...
✅ Repository created successfully
📝 Creating initial commit in main branch...
✅ Initial commit created successfully
🌿 Creating branch feature/test-mcp...
✅ Branch created successfully
📝 Creating test file in feature branch...
✅ Test file created successfully
🔀 Creating Pull Request...
✅ PR created successfully: https://github.com/username/mcp-demo-repo/pull/1
Project Structure
python/
├── test_mcp.py # Main test script for MCP Server operations
├── requirements.txt # Python dependencies
├── docker-compose.yml # Docker configuration for MCP Server
└── README.md # This file
Troubleshooting
-
Authentication Error:
- Verify your token in the
.envfile - Confirm the token has the required permissions
- Verify your token in the
-
Connection Error:
- Check if Docker is running
- Verify your internet connection
-
Dependency Error:
- Try reinstalling dependencies:
pip install -r requirements.txt --force-reinstall
- Try reinstalling dependencies:
Support
For more information about GitHub MCP, see:
- GitHub MCP Documentation
- API Reference
Quick Start
Clone the repository
git clone https://github.com/topgunder/mcp-demo-repoInstall dependencies
cd mcp-demo-repo
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.