Supports configuration through .env files for storing API keys and other environment variables needed for the MCP server.
Utilizes Google Gemini AI to perform project planning, code reviews, and execution analysis, acting as an AI architect that provides structured project plans, code quality assessment, security vulnerability detection, and debugging assistance.
Leverages Pydantic for data validation and settings management in the MCP server's internal models.
Uses Rich for enhanced terminal output and formatting when displaying MCP server information and logs.
Click on "Install 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., "@Plan-MCPreview this Python code for security issues and suggest improvements"
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.
Plan-MCP
A Model Context Protocol (MCP) server that leverages Google Gemini AI for intelligent project planning and code review.
๐ Overview
Plan-MCP acts as an AI-powered project architect that bridges Gemini's planning capabilities with Claude's coding abilities:
Gemini as Architect: Analyzes requirements, creates project plans, reviews code quality
Claude as Developer: Implements code based on Gemini's guidance
Continuous Feedback Loop: Gemini reviews execution results and provides iterative improvements
Related MCP server: Gemini MCP Server
๐ Features
Plan-MCP provides complete MCP feature support, making it one of the most comprehensive MCP servers available:
โ Complete MCP Feature Matrix
Feature | Status | Description |
Resources | โ | File system access (file://, dir://, workspace://) |
Prompts | โ | 4 structured prompt templates for common tasks |
Tools | โ | 10 comprehensive tools for project management |
Discovery | โ | Dynamic tool discovery (handled by FastMCP) |
Sampling | โ | LLM text generation for documentation and tests |
Roots | โ | Workspace navigation and project root suggestions |
Elicitation | โ | Interactive user input collection |
๐ง Core Tools
1. Project Planning (plan_project)
Break down complex requirements into structured phases and tasks
Generate detailed project plans with priorities and dependencies
Estimate effort and identify potential risks
Support for technical constraints and preferred tech stacks
2. Code Review (review_code)
Comprehensive code quality analysis
Security vulnerability detection
Performance optimization suggestions
Best practices and design pattern recommendations
Language-agnostic support
3. Execution Analysis (analyze_execution)
Debug runtime errors with root cause analysis
Provide specific code fixes with explanations
Evaluate if execution meets expected behavior
Guide iterative development with next steps
4. Directory Review (review_directory)
Complete project/directory analysis
Multi-file code quality assessment
Project structure recommendations
Security scanning across entire codebase
๐ฏ Advanced Features
Interactive Tools (Elicitation)
Interactive Project Planning: Collects user preferences and requirements dynamically
Interactive Code Review: Customizes review focus based on user needs
LLM Sampling
Documentation Generation: Auto-generates comprehensive docs for code
Test Generation: Creates unit tests with proper assertions and edge cases
File System Resources
File Access: Read individual files with
file://URIsDirectory Access: Access entire directories with
dir://URIsWorkspace Navigation: Current workspace info with
workspace://current
Workspace Management (Roots)
Workspace Roots: Lists available workspace directories
Project Suggestions: Recommends appropriate project locations by type
Prompt Templates
Code Review Template: Structured code review prompts
Project Planning Template: Interactive planning conversations
Debug Assistant: Systematic debugging guidance
Architecture Review: System architecture analysis
๐ Prerequisites
Python 3.10 or higher
Google Gemini API key
Claude Code (for MCP integration)
๐ ๏ธ Installation
Quick Start with uvx (Recommended)
# Install and run directly with uvx
uvx plan-mcp
# Or add to Claude Code
claude mcp add plan-mcp -- uvx plan-mcpTraditional pip Installation
# Install from PyPI
pip install plan-mcp
# Run the server
plan-mcp๐ง Configuration
Set up your Gemini API key
export GEMINI_API_KEY="your_gemini_api_key_here"Or create a .env file:
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-1.5-pro
LOG_LEVEL=INFOClaude Code Integration
๐ Method 1: Direct from GitHub (Recommended)
Run directly from GitHub using uv without local installation:
# Team/project configuration (recommended)
claude mcp add -s project plan-mcp -- uv tool run --from git+https://github.com/bee4come/plan-mcp.git plan-mcpThis creates a .mcp.json file in your project root. For secure API key management, edit the file:
๐ง Method 2: Local Installation (Recommended)
Install locally for reliable connection:
# Clone and install dependencies
git clone https://github.com/bee4come/plan-mcp.git
cd plan-mcp
pip install mcp google-generativeai python-dotenv pydantic loguru rich
# Add to Claude Code
claude mcp add -s project plan-mcp -- python run_mcp.pyโ Verify Installation
Check if the MCP server is working:
# List MCP servers
claude mcp list
# Check server details
claude mcp get plan-mcp
# Test in Claude Code by typing: /mcp{
"mcpServers": {
"plan-mcp": {
"command": "uv",
"args": [
"tool",
"run",
"--from",
"git+https://github.com/bee4come/plan-mcp.git",
"plan-mcp"
],
"env": {
"GEMINI_API_KEY": "${GEMINI_API_KEY}"
}
}
}
}Alternative Configuration Options
Personal global configuration:
claude mcp add -s user plan-mcp -e GEMINI_API_KEY=your_api_key -- uv tool run --from git+https://github.com/bee4come/plan-mcp.git plan-mcpLocal testing configuration:
claude mcp add plan-mcp -e GEMINI_API_KEY=your_api_key -- uv tool run --from git+https://github.com/bee4come/plan-mcp.git plan-mcpManaging MCP Services
# List all services
claude mcp list
# Get service details
claude mcp get plan-mcp
# Check status in Claude Code
# Type /mcp command to view connection status๐ป Usage
Once configured, you can use these tools in Claude Code:
1. Create a project plan
Use the plan_project tool to create a plan for building a REST API for task management with user authentication2. Review code
Use the review_code tool to review this Python function for security and performance issues: [paste code]3. Review entire directory/project
Use the review_directory tool to review my entire Python project at /path/to/project for security and code quality issues4. Analyze execution errors
Use the analyze_execution tool to help me debug this error: [paste code and error]5. Access files and directories
You can now ask Claude to analyze files directly:
"Please review the code in file:///path/to/my/project and suggest improvements"๐๏ธ Architecture
plan-mcp/
โโโ plan_mcp/
โ โโโ api/ # Gemini API integration
โ โโโ tools/ # MCP tools (planner, reviewer, analyzer)
โ โโโ prompts/ # System prompts for Gemini
โ โโโ utils/ # Utilities (logging, etc.)
โ โโโ config.py # Configuration management
โ โโโ models.py # Pydantic data models
โ โโโ server.py # MCP server implementation
โโโ README.md๐ค Workflow Example
Human โ Claude: "Help me build a web scraper"
Claude โ Plan-MCP: Requests project plan
Plan-MCP โ Gemini: Analyzes requirements
Gemini โ Plan-MCP: Returns structured plan
Plan-MCP โ Claude: Delivers plan
Claude: Implements first task
Claude โ Plan-MCP: Submits code for review
Plan-MCP โ Gemini: Reviews code
Gemini โ Plan-MCP: Provides feedback
Plan-MCP โ Claude: Delivers improvements
Cycle continues...
๐ API Reference
Tools
plan_project
Description: Create a comprehensive project plan
Parameters:
description(required): Project descriptionrequirements: List of specific requirementsconstraints: Project constraintstech_stack: Preferred technologies
review_code
Description: Review code for quality and issues
Parameters:
code(required): Code to reviewlanguage(required): Programming languagecontext: Additional contextfocus_areas: Specific areas to focus on
analyze_execution
Description: Analyze execution results and debug errors
Parameters:
code(required): Code that was executedexecution_output(required): Output or error messagesexpected_behavior: What the code should doerror_messages: Specific error messageslanguage: Programming language (default: python)
๐งช Development
Set up development environment
# Clone the repository
git clone https://github.com/bee4come/plan-mcp.git
cd plan-mcp
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytestCode quality
# Format code
black plan_mcp/
# Lint code
ruff check plan_mcp/
# Type checking
mypy plan_mcp/๐ Troubleshooting
Common Issues
"GEMINI_API_KEY not found"
Ensure your API key is set in environment variables:
export GEMINI_API_KEY="your_key_here"Or create a
.envfile in your working directory withGEMINI_API_KEY=your_key_hereGet your API key from: https://makersuite.google.com/app/apikey
Connection errors
Verify your internet connection
Check if the Gemini API is accessible
Ensure your API key has proper permissions
MCP connection issues
Restart Claude Code after configuration
Check that the server starts without errors
Look at Claude Code logs for errors
๐ License
MIT License - see LICENSE file for details
๐ Acknowledgments
Google Gemini for powerful AI capabilities
Anthropic for Claude and the MCP protocol
The open-source community for inspiration