
mcp4mcp
A Meta MCP Server that provides persistent memory and intelligent guidance for MCP development projects.
README
mcp4mcp - Meta MCP Server
A Meta MCP Server that provides persistent memory and intelligent guidance for MCP development projects.
🎯 Overview
mcp4mcp is a specialized MCP server designed to help developers build better MCP projects. It provides:
- Persistent Project Memory: Track tools, their status, and development progress across sessions
- AI-Powered Intelligence: Get suggestions, detect duplicates, and avoid conflicts
- Development Session Tracking: Monitor your development activities and progress
- Code Analysis: Automatic discovery and analysis of MCP tools in your codebase
- Similarity Detection: Find similar tools to avoid duplication and improve consistency
🚀 Quick Start
Installation
# Install dependencies
pip install -e .
# Start the server
python server.py
# Or use the main entry point
python main.py server
Basic Usage
# Run the demo to see all features
python main.py demo
# Run tests
python main.py test
🛠️ Features
Core Tools
The server provides 11 MCP tools organized into three categories:
State Management
get_project_state_tool
- Load current project state and toolsupdate_project_state_tool
- Update project information and add/modify toolsscan_project_files_tool
- Automatically scan files for MCP tools
Intelligence & Analysis
check_before_build_tool
- Check for conflicts before building new toolssuggest_next_action_tool
- Get AI-powered development suggestionsanalyze_tool_similarity_tool
- Analyze tools for similarity and duplication
Development Tracking
track_development_session_tool
- Log development activities and progressend_development_session_tool
- End a development session with summaryget_development_sessions_tool
- Get recent development sessionsget_session_analytics_tool
- Get development analytics and insightsupdate_tool_status_tool
- Update individual tool status
📋 Usage Examples
1. Project Management
# Start a new development session
await track_development_session(
"Started working on file tools",
"my_project",
"file_reader",
"Implementing CSV file reading capability"
)
# Update project with new tools
await update_project_state(
"my_project",
"File processing MCP server",
[
{
"name": "read_csv",
"description": "Read CSV files",
"status": "planned"
},
{
"name": "write_csv",
"description": "Write CSV files",
"status": "planned"
}
]
)
2. Conflict Detection
# Check before building a new tool
result = await check_before_build(
"csv_processor",
"Process CSV files by reading and writing",
"my_project"
)
# Result will show potential conflicts with existing tools
print(f"Conflicts found: {len(result['conflicts'])}")
print(f"Recommendations: {result['recommendations']}")
3. AI-Powered Suggestions
# Get intelligent suggestions
suggestions = await suggest_next_action(
"my_project",
"I've implemented file reading, what should I do next?"
)
print("AI Suggestions:")
for suggestion in suggestions['suggestions']:
print(f"- {suggestion}")
4. Code Scanning
# Automatically discover tools in your codebase
scan_result = await scan_project_files("my_project", "./src")
print(f"Found {scan_result['tools_found']} tools:")
for tool in scan_result['tools']:
print(f"- {tool['name']}: {tool['description']}")
🏗️ Architecture
Project Structure
mcp4mcp/
├── server.py # FastMCP server entry point
├── mcp4mcp/
│ ├── models.py # Pydantic data models
│ ├── storage.py # SQLite storage backend
│ ├── tools/ # MCP tool implementations
│ │ ├── state_management.py
│ │ ├── intelligence.py
│ │ └── tracking.py
│ ├── analyzers/ # Code analysis modules
│ │ ├── code_scanner.py
│ │ └── similarity.py
│ └── utils/ # Utility functions
├── tests/ # Comprehensive test suite
└── examples/ # Usage examples and demos
Data Models
ProjectState
class ProjectState(BaseModel):
name: str
description: str
tools: Dict[str, Tool]
sessions: List[DevelopmentSession]
analysis: Optional[ProjectAnalysis]
created_at: datetime
updated_at: datetime
Tool
class Tool(BaseModel):
name: str
description: str
status: ToolStatus # PLANNED, IN_PROGRESS, IMPLEMENTED, TESTED
file_path: Optional[str]
function_name: Optional[str]
parameters: List[Dict[str, Any]]
return_type: Optional[str]
similarity_scores: Dict[str, float]
💾 Storage
All project data is stored in SQLite at ~/.mcp4mcp/projects.db
with the following tables:
- projects - Project metadata and state
- tools - Individual tool definitions and status
- sessions - Development session tracking
- session_actions - Detailed session activities
🧪 Testing
Comprehensive test suite covering:
# Run all tests
python -m pytest tests/ -v
# Run specific test categories
python -m pytest tests/test_models.py -v # Data models
python -m pytest tests/test_storage.py -v # Storage backend
python -m pytest tests/test_tools.py -v # Tool functionality
python -m pytest tests/test_server.py -v # Server integration
📚 Examples
Example Project
The examples/example_project/
directory contains a sample MCP server with:
- File manipulation tools (read, write, list)
- Mathematical calculation tools (calculator, sqrt, power, factorial)
- Proper FastMCP integration
Demo Script
Run the comprehensive demo:
python examples/demo_usage.py
This demonstrates:
- Project creation and management
- Tool scanning and analysis
- Development session tracking
- AI-powered suggestions
- Conflict detection
🔧 Configuration
Environment Variables
MCP4MCP_DB_PATH
- Custom database path (default:~/.mcp4mcp/projects.db
)MCP4MCP_LOG_LEVEL
- Logging level (default:INFO
)
FastMCP Integration
from fastmcp import FastMCP
from mcp4mcp.tools.state_management import register_state_tools
from mcp4mcp.tools.intelligence import register_intelligence_tools
from mcp4mcp.tools.tracking import register_tracking_tools
mcp = FastMCP("your-mcp-server")
# Register mcp4mcp tools
register_state_tools(mcp)
register_intelligence_tools(mcp)
register_tracking_tools(mcp)
# Register your own tools
@mcp.tool()
def your_tool():
return "Hello from your tool!"
mcp.run()
🚀 Development
Adding New Tools
- Create tool functions in appropriate module (
mcp4mcp/tools/
) - Add tests in
tests/test_tools.py
- Register tools in
server.py
- Update documentation
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
📄 License
This project is licensed under the MIT License.
🤝 Support
- Issues: Report bugs and request features on GitHub
- Documentation: Full API documentation in the code
- Examples: See
examples/
directory for usage patterns
mcp4mcp - Making MCP development smarter, one tool at a time! 🚀
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.