MCP Create Enhanced
An enhanced dynamic MCP server management service that creates, runs, and manages Model Context Protocol servers with multi-language support and strict parameter validation.
README
MCP Create Enhanced
An enhanced version of the dynamic MCP server management service that creates, runs, and manages Model Context Protocol (MCP) servers dynamically. This service runs as an MCP server itself and spawns/manages other MCP servers as child processes, enabling a robust and flexible MCP ecosystem.
🔄 Enhanced Version
This is an enhanced and improved version of tesla0225/mcp-create with significant improvements and new features.
<a href="https://glama.ai/mcp/servers/lnl6xjkkeq"> <img width="380" height="200" src="https://glama.ai/mcp/servers/lnl6xjkkeq/badge" alt="Create Server MCP server" /> </a>
🌟 Key Features
- Dynamic MCP Server Creation: Create and run MCP server code on-the-fly
- Multi-Language Support: TypeScript, JavaScript, and Python server templates
- Parameter Validation: Strict JSON Schema validation with proper MCP error codes (-32602)
- Server Persistence: Save/load/delete servers to/from disk
- Tool Execution: Execute tools on child MCP servers with validation
- Server Management: Update, restart, and delete servers as needed
- Robust Python Support: Fixed Python server stability issues
🔧 Recent Improvements
✨ New Features
- MCP Parameter Validation: Strict validation with proper error codes (-32602 for invalid parameters)
- Server Persistence: Save servers to disk and reload them later
- Enhanced Python Support: Fixed Python server stability and closure issues
- Better Error Handling: Improved error messages and MCP compliance
🐛 Bug Fixes
- Fixed Python servers closing immediately after creation
- Corrected pip installation to use
python3 -m pip - Fixed duplicate process spawning issues
- Improved EOF handling in Python templates
- Better signal handling and graceful shutdown
🔄 Differences from Original
This enhanced version provides significant improvements over the original mcp-create:
| Feature | Original | Enhanced |
|---|---|---|
| Parameter Validation | ❌ Default values for missing params | ✅ Strict JSON Schema validation with MCP errors |
| Python Support | ⚠️ Unstable, immediate closure | ✅ Robust, fixed stability issues |
| Server Persistence | ❌ Not available | ✅ Save/load/delete servers to/from disk |
| Error Handling | ⚠️ Basic error messages | ✅ Proper MCP error codes (-32602, -32601) |
| Process Management | ⚠️ Duplicate process spawning | ✅ Clean single process management |
| Documentation | ⚠️ French comments, basic docs | ✅ Full English docs with examples |
Original Project: tesla0225/mcp-create
📦 Installation
Note: Docker is the recommended method for running this service
Docker Installation (Recommended)
# Build the Docker image
docker build -t mcp-create .
# Run the Docker container
docker run -it --rm mcp-create
Manual Installation
# Clone the repository
git clone https://github.com/PlumyCat/mcp-create-enhanced.git
cd mcp-create-enhanced
# Install dependencies
npm install
# Build
npm run build
# Run
npm start
Testing Local Installation
After making changes to the code, you can test locally:
# Rebuild after changes
npm run build
# Test the server directly (it will wait for MCP protocol input)
npm start
# Or test with a simple echo command
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | npm start
Using Local Version with Claude Desktop
To use your modified local version with Claude Desktop, update your claude_desktop_config.json:
{
"mcpServers": {
"mcp-create-local": {
"command": "node",
"args": ["./build/index.js"],
"cwd": "/path/to/your/mcp-create-enhanced"
}
}
}
Note: Replace /path/to/your/mcp-create-enhanced with the actual path to your local repository.
Building Docker Image with Local Changes
To create a Docker image with your local changes:
# Build Docker image with your changes
docker build -t mcp-create-local .
# Test the Docker image
docker run -it --rm mcp-create-local
# Use with Claude Desktop
# Update claude_desktop_config.json:
{
"mcpServers": {
"mcp-create-local": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp-create-local"]
}
}
}
🤖 Claude Desktop Integration
Add the following to your Claude Desktop configuration file (claude_desktop_config.json):
{
"mcpServers": {
"mcp-create": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp-create"]
}
}
}
🛠️ Available Tools
| Tool Name | Description | Input Parameters | Output |
|---|---|---|---|
| create-server-from-template | Create an MCP server from template | language: string<br>code?: string<br>dependencies?: object | { serverId: string, message: string } |
| execute-tool | Execute a tool on the server | serverId: string<br>toolName: string<br>args: object | Tool execution result |
| get-server-tools | Get list of server tools | serverId: string | { tools: ToolDefinition[] } |
| delete-server | Delete a server | serverId: string | { success: boolean, message: string } |
| list-servers | Get list of running servers | none | { servers: string[] } |
| save-server | Save a server to disk | serverId: string<br>name: string | Success message |
| list-saved-servers | List saved servers | none | Array of saved servers |
| load-saved-server | Load a saved server | savedServerId: string | New server ID |
| delete-saved-server | Delete a saved server | savedServerId: string | Success message |
📋 Usage Examples
Creating a New Server
{
"name": "create-server-from-template",
"arguments": {
"language": "python",
"code": "# Custom Python MCP server code here"
}
}
Executing a Tool with Validation
{
"name": "execute-tool",
"arguments": {
"serverId": "ba7c9a4f-6ba8-4cad-8ec8-a41a08c19fac",
"toolName": "echo",
"args": {
"message": "Hello, dynamic MCP server!"
}
}
}
Parameter Validation Example
If you try to execute a tool with missing required parameters:
{
"name": "execute-tool",
"arguments": {
"serverId": "ba7c9a4f-6ba8-4cad-8ec8-a41a08c19fac",
"toolName": "echo",
"args": {}
}
}
You'll get a proper MCP error response:
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid parameters: Missing required parameter: 'message'"
}
}
🔄 Complete Workflow After Modifications
- Make your changes in the source code
- Rebuild Docker:
docker build -t mcp-create-local . - Test:
docker run -it --rm mcp-create-local - Update Claude Desktop configuration if needed
💡 Practical Tips
-
Different tag: If you want to keep the old version, use a different tag:
docker build -t mcp-create-local:v2 . -
Cleanup: Remove unused old images:
docker image prune -
Verification: List your images to confirm:
docker images | grep mcp-create
🏗️ Technical Specifications
- Node.js 18 or higher
- TypeScript (required)
- Dependencies:
- @modelcontextprotocol/sdk: MCP client/server implementation
- child_process (Node.js built-in): Child process management
- fs/promises (Node.js built-in): File operations
- uuid: Unique server ID generation
- zod: JSON schema validation
🔒 Security Considerations
- Code Execution Restrictions: Consider sandboxing as the service executes arbitrary code
- Resource Limitations: Set limits on memory, CPU usage, file count, etc.
- Process Monitoring: Monitor and forcefully terminate zombie or runaway processes
- Path Validation: Properly validate file paths to prevent directory traversal attacks
- Parameter Validation: All tool parameters are validated against JSON schemas before execution
🧪 Testing
The project includes comprehensive validation for MCP parameters:
- ✅ Valid parameters: Normal execution
- ✅ Missing required parameters: Returns MCP error -32602 with explicit message
- ✅ Wrong parameter types: Returns MCP error -32602 with type details
- ✅ Unknown tools: Returns MCP error -32601
- ✅ Optional parameters: Handled correctly
📄 License
MIT
🤝 Contributing
Feel free to submit issues and pull requests. This project has been enhanced with Claude Code assistance to provide robust MCP server management capabilities.
🧪 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。