JulianGiraldo97/MCP-Github-To-Trello
If you are the rightful owner of MCP-Github-To-Trello and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP GitHub Repository Analyzer is a server that uses the Model Context Protocol to analyze GitHub repositories, identify issues, and create tasks in Trello.
analyze_repository
Analyzes a GitHub repository and creates Trello tasks.
list_repositories
Lists repositories for a GitHub user/organization.
get_repository_info
Gets detailed information about a specific repository.
MCP GitHub Repository Analyzer
This project demonstrates the Model Context Protocol (MCP) by creating a server that can analyze GitHub repositories, identify potential issues, and create tasks in Trello.
Use Case
The system performs the following workflow:
- Connects to a GitHub repository
- Analyzes the codebase for potential issues (missing documentation, security vulnerabilities, code quality issues)
- Creates Trello cards for identified issues with appropriate labels and descriptions
Features
- GitHub Integration: Fetches repository information, code files, and issues
- AI-Powered Code Analysis: Uses OpenAI GPT-4 and Anthropic Claude for intelligent code review
- Advanced Security Analysis: Detects vulnerabilities, security issues, and best practices
- Code Quality Assessment: Evaluates maintainability, performance, and architecture
- Trello Integration: Creates organized tasks with proper categorization
- MCP Server: Exposes functionality through the Model Context Protocol
Setup
1. Set Up Virtual Environment (Recommended)
It's highly recommended to use a virtual environment to isolate dependencies:
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate
# Or use the provided script:
./activate_venv.sh
2. Install Dependencies
pip install -r requirements.txt
2. Environment Variables
Create a .env
file with your API keys:
# GitHub API Token
GITHUB_TOKEN=your_github_token_here
# Trello API Keys
TRELLO_API_KEY=your_trello_api_key
TRELLO_TOKEN=your_trello_token
TRELLO_BOARD_ID=your_trello_board_id
# AI API Keys (Optional - for enhanced analysis)
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
3. Get API Keys
GitHub Token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate a new token with
repo
permissions
Trello API:
- Go to https://trello.com/app-key
- Get your API key and token
- Create a board and note its ID from the URL
AI APIs (Optional - for enhanced analysis):
- OpenAI: Get API key from https://platform.openai.com/api-keys
- Anthropic: Get API key from https://console.anthropic.com/
4. Run the MCP Server
# Using the main script
python main.py server
# Or using make
make run-server
Usage
Quick Start
# Run the full workflow on your repository
python main.py workflow
# Or use make
make run-workflow
# Run a quick test
python main.py test
# Set up Trello board
python main.py setup-trello
Available Commands
python main.py server
- Start the MCP serverpython main.py workflow [repo]
- Run full workflow analysispython main.py test
- Run quick testpython main.py setup-trello
- Set up Trello boardpython main.py ai-test
- Test AI analysis functionality
MCP Server Tools
The MCP server provides the following tools:
analyze_repository
: Analyzes a GitHub repository and creates Trello taskslist_repositories
: Lists repositories for a GitHub user/organizationget_repository_info
: Gets detailed information about a specific repositorycreate_trello_card
: Create a single Trello card
Project Structure
mcp_tests/
āāā src/ # Source code
ā āāā analyzers/ # Analysis modules
ā ā āāā github_analyzer.py
ā ā āāā ai_analyzer.py
ā āāā managers/ # External service managers
ā ā āāā trello_manager.py
ā āāā utils/ # Utility functions
ā āāā mcp_server.py # Main MCP server
āāā tests/ # Test files
ā āāā quick_test.py
ā āāā direct_test.py
ā āāā test_my_repo.py
āāā examples/ # Example scripts
ā āāā run_full_mcp_workflow.py
ā āāā setup_trello_board.py
ā āāā example_client.py
āāā docs/ # Documentation
āāā main.py # Main entry point
āāā config.py # Configuration settings
āāā Makefile # Build and development tasks
āāā requirements.txt # Python dependencies
āāā .env.example # Example environment variables
āāā README.md # This file
Example Workflow
- Start the MCP server
- Use an MCP client to connect to the server
- Call
analyze_repository
with a GitHub repository URL - The system will:
- Fetch repository data
- Analyze code for issues
- Create Trello cards for each identified issue
- Return a summary of actions taken
MCP Protocol
This server implements the MCP protocol, allowing AI assistants and other tools to interact with GitHub and Trello through a standardized interface. The server exposes tools that can be called by MCP clients to perform repository analysis and task management.