Skip to main content
Glama

x4-mcpgen

CI License

Generate production-oriented MCP server scaffolds — secure by default.

Part of the X4 ecosystem: x4-skills → x4-mcpgen → x4-sec → x4-runtime → x4-obs

30-second demo

pip install -e ".[dev]"
x4-mcpgen init weather --tools 2
cd weather
pip install -e ".[dev]"
pytest -q
x4-mcpgen validate .
x4-mcpgen test .

Related MCP server: mcpnew

Why not another template?

Most MCP starters ship with broad permissions and no tests. x4-mcpgen produces:

  • Explicit tool allow-lists (no "*")

  • Unit tests for every generated tool

  • SECURITY.md, Apache-2.0, CI workflow

  • mcp.json with stdio transport only by default

  • Dockerfile with non-root user

  • Ready for x4-sec scan

CLI

x4-mcpgen init <name> [--tools N] [--out DIR]
x4-mcpgen validate [PATH]
x4-mcpgen test [PATH]
x4-mcpgen package [PATH]
x4-mcpgen doctor

Generated layout

my-mcp/
├── src/<pkg>/
│   ├── server.py
│   └── tools/
├── tests/
├── schemas/
├── Dockerfile
├── mcp.json
├── pyproject.toml
├── README.md
├── SECURITY.md
├── LICENSE
└── .github/workflows/ci.yml

License

Apache-2.0

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables developers to scaffold secure-by-default MCP servers with deny-all permissions, typed tool stubs, and pre-wired audit hooks, while enforcing security posture through CI.
    5 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Generates complete, runnable MCP server projects from natural-language tool descriptions, including schema, implementation, tests, README, and license. It enables AI agents to scaffold standalone MCP servers ready to install and run.
    MIT