MCP Configuration Generator
Standalone YAML-based MCP configuration generator with template interpolation and secret management.
Why This Tool Exists
Problem: MCP configurations contain hardcoded paths and secrets, making them impossible to version control or share across teams/environments.
Solution: Separate configuration structure from secrets and environment-specific values:
- Version control YAML configs without exposing secrets
- Team sharing of standardized MCP server setups
- Environment portability via template variables
- Secret isolation in git-ignored files
Transform this unmaintainable config:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/alice/dev/project"]
},
"github": {
"command": "docker",
"args": ["run", "-e", "GITHUB_TOKEN=ghp_actual_secret123", "github-server"]
}
}
}
Into maintainable, shareable YAML:
variables:
project_root: "/Users/alice/dev/project"
servers:
filesystem:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "{{ variables.project_root }}"]
github:
command: "docker"
args: ["run", "-e", "GITHUB_TOKEN={{ secrets.GITHUB_TOKEN }}", "github-server"]
Installation
pip install -e .
Quick Start
Using the Examples
- Navigate to project root:
cd /path/to/mcp-gen
- Generate MCP JSON from example configuration:
python -m mcp_gen.cli generate \
--config examples/mcp.config.yaml \
--secrets examples/mcp.secrets.yaml
- View the generated files (automatically written to configured outputs):
cat .amazonq/mcp.json
cat claude-desktop/mcp.json
CLI Commands
Generate configuration:
python -m mcp_gen.cli generate --config config.yaml --secrets secrets.yaml --output mcp.json
Generate to configured outputs (no --output needed):
python -m mcp_gen.cli generate --config config.yaml --secrets secrets.yaml
Validate configuration:
python -m mcp_gen.cli validate --config config.yaml
Configuration Format
mcp.config.yaml:
version: "1.0"
outputs:
- "{{ variables.project_root }}/.amazonq/mcp.json"
- "{{ variables.project_root }}/claude-desktop/mcp.json"
variables:
project_root: "/path/to/project"
servers:
filesystem:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "{{ variables.project_root }}"]
mcp.secrets.yaml:
secrets:
API_TOKEN: "your_secret_token"
Features
- Template interpolation with Jinja2 (variables, secrets, environment)
- Multiple output paths with variable support
- Secret management (git-ignored files)
- JSON Schema validation
- Optional outputs configuration (CLI --output overrides)
Metadata
Release files for mcp-gen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_gen-0.1.0.tar.gz | 12.3 kB | Without provenance | Details for mcp_gen-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_gen-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_gen-0.1.0-py3-none-any.whl |
Total release size: 23.0 kB
Release files / mcp_gen-0.1.0.tar.gz
| Download URL | mcp_gen-0.1.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f95cf16ee60990df1f77022b8c94f8cc2b6b30d487bf1e56380dffdaefaa5fe
|
|
BLAKE2b-256 checksum How to use checksums |
4a878c449da0db13d7c902f0cdf52505731143fb49f1f12bdce699c93f13fb17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / mcp_gen-0.1.0-py3-none-any.whl
| Download URL | mcp_gen-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c14214d041ca36fc1a3e819de9f852561f02579ba68db49103f5ec72a0eaed60
|
|
BLAKE2b-256 checksum How to use checksums |
9a7877f7bf3c4c37f8ab6519eb8f6de4ce0b375fdecd28de6cc167577d76e9f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for mcp-gen 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.