Generate Python Code for MCP Servers
Create and generate MCP servers with dynamic tools and resources. Supports sync/async operations and Python code generation.
Why it matters
Dynamically generate and configure MCP servers with custom tools and resources. Automate the creation of Python code for your servers, streamlining development and deployment.
Outcomes
What it gets done
Create new MCP server configurations on the fly.
Add custom synchronous or asynchronous tools to servers.
Manage static and dynamic resources with template support.
Generate complete, ready-to-run Python code for servers.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-mcp-server-creator | bash Capabilities
Tools your agent gets
Create a new MCP server configuration
List all server configurations in memory
Get detailed information about a specific server
Add a tool to an existing server with support for sync/async and custom parameters
Add a resource to an existing server with templates and custom MIME types
Generate complete Python code for the server
Save the generated server code to a file
Create a complete Weather Service example server
Overview
MCP Server Creator MCP Server
What it does
MCP Server Creator is a meta-server that dynamically generates MCP server configurations and Python code. It allows for the creation of new MCP servers on the fly, with capabilities to add custom tools (supporting sync/async, parameters, and automatic implementation) and resources (static or dynamic with templates and custom MIME types).
How it connects
Use MCP Server Creator when you need to rapidly build custom MCP servers, integrate various services through dynamic tool generation, or automate the creation of server infrastructure. It's ideal for generating servers with both synchronous and asynchronous tools and for adding resources with template support.
Source README
A meta-server that creates other MCP servers, providing tools for dynamic generation of FastMCP server configurations and Python code.
Installation
pip
pip install mcp-server-creator
uvx (recommended)
uvx mcp-server-creator
Python module
python -m mcp_server_creator
From source
git clone https://github.com/GongRzhe/mcp-server-creator.git
cd mcp-server-creator
pip install -e .
Configuration
Claude Desktop
{
"mcpServers": {
"mcp-server-creator": {
"command": "uvx",
"args": ["mcp-server-creator"]
}
}
}
Available Tools
| Tool | Description |
|---|---|
create_server |
Create a new MCP server configuration |
list_servers |
List all server configurations in memory |
get_server_details |
Get detailed information about a specific server |
add_tool |
Add a tool to an existing server with support for sync/async, custom parameters, and automatic... |
add_resource |
Add a resource to an existing server (static or dynamic with templates and custom MIME types) |
generate_server_code |
Generate complete Python code for the server |
save_server |
Save the generated server code to a file |
create_example_server |
Create a complete Weather Service example |
Features
- Dynamic server creation: Create new MCP server configurations on the fly
- Tool builder: Add custom tools with parameters, return types, and implementations
- Resource manager: Add static and dynamic resources with template support
- Code generation: Generate complete, ready-to-run Python code for your servers
- File export: Save generated servers directly to Python files
- Template examples: Built-in server example demonstrating capabilities
Usage Examples
Create a weather service MCP server with tools for getting current weather
Build custom API integration servers with dynamic tool generation
Generate MCP servers with both sync and async tools
Add resources to servers with template support
Notes
Requires Python 3.8+ and FastMCP >= 0.1.0. Can be used as an MCP server and programmatically via Python API. Supports both synchronous and asynchronous tool implementations.
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.