MCP Server Creator: FastMCP Configs and Python
Generate dynamic MCP server configurations and Python code with a meta-server that creates FastMCP servers quickly and reliably.
npx -y @GongRzhe/MCP-Server-CreatorOverview
MCP Server Creator is a meta-server that automates the generation of FastMCP-compatible server configurations and Python starter code. Instead of hand-crafting many nearly-identical server setups for different models, environments, or tests, this tool emits ready-to-run configurations and server modules on demand. That makes spinning up ephemeral model servers fast, consistent, and scriptable.
For developers building model hosting, testing frameworks, or CI pipelines, the meta-server eliminates repetitive boilerplate and reduces error-prone manual edits. You can request a tailored FastMCP server (configuration + Python entrypoint) via an HTTP API or a small Python client, then deploy that generated server directly or adapt it as needed.
Features
- Generate FastMCP configuration files dynamically from templates
- Emit ready-to-run Python server code that loads the requested model and exposes the FastMCP protocol
- HTTP API for programmatic creation of server bundles
- Config templating supporting model, port, resource, and runtime options
- CLI and Python client examples for quick integration
- Designed for ephemeral/dev/test servers and CI/CD automation
Installation / Configuration
Prerequisites: Python 3.8+ and pip.
Clone the repository and install dependencies:
Start the meta-server locally (example):
# run the meta-server process (example entrypoint)
Environment variables (examples)
- MCP_CREATOR_HOST — host for the meta-server (default: 0.0.0.0)
- MCP_CREATOR_PORT — port for the meta-server (default: 8000)
- OUTPUT_DIR — directory where generated servers and configs are written
You can override these values on the command line or via a .env file depending on your setup.
Available Resources
- GitHub repository: https://github.com/GongRzhe/MCP-Server-Creator
- Template files: Jinja2 or similar templates for config and Python server entrypoints
- Example clients: a small CLI and Python snippets illustrating the API
- Docker support: Dockerfile for containerized meta-server (if provided in the repo)
- Generated output: YAML/JSON config files plus Python modules you can launch directly
Example API usage
Create a new FastMCP server bundle via HTTP:
Typical response:
Python client example:
=
=
After generation, start the emitted server:
# or use the provided Dockerfile to containerize the generated bundle
Common configuration keys
| Key | Type | Description |
|---|---|---|
| server_name | string | Identifier used for filenames and directories |
| model | string | Model backend name or path |
| port | integer | TCP port for the generated FastMCP server |
| max_tokens | integer | Maximum generated tokens |
| context_window | integer | Model context size |
| workers | integer | Number of worker processes to spawn |
| env | map | Environment variables to inject into the generated runtime |
Use Cases
- Local development: spin up a disposable model server to debug integrations without altering a shared host.
- CI pipelines: generate and run short-lived model servers as part of integration tests to verify client behavior.
- A/B testing: quickly create multiple server variants with different model settings or token limits to compare outputs.
- Education and demos: provide students or stakeholders with ready-to-run server packages that illustrate model hosting patterns.
- Edge prototypes: produce lightweight FastMCP servers configured for constrained resources for proof-of-concept deployments.
Extending and Best Practices
- Templates: extend or replace provided templates to customize logging, metrics, authentication, or model-loading behavior.
- Validation: the meta-server validates inputs; ensure production deployments add stricter policies (e.g., allowed model lists).
- Security: restrict access to the meta-server API in production and sanitize model identifiers to prevent path traversal.
- Artifact storage: use a persistent artifact store (S3, artifact registry) for generated bundles if they need to be preserved across restarts.
For full details and examples, see the repository: https://github.com/GongRzhe/MCP-Server-Creator.