MCPize 模板

MCPize Templates 是 MCPize CLI 的项目模板集合,提供 TypeScript、Python、PHP 等多种运行时模板及 OpenAPI 集成能力,用于快速初始化 MCP 服务器项目。

  • by mcpize
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 mcpize/templates

使用说明

MCPize Templates

Project templates for MCPize CLI.

Available Templates

Template Description
typescript/default TypeScript MCP server with @modelcontextprotocol/sdk (recommended)
typescript/billing-events TypeScript MCP server with event billing
typescript/openapi Generate a TypeScript MCP server from an OpenAPI spec
python/default Python MCP server with FastMCP
python/openapi Generate a Python MCP server from an OpenAPI spec using FastMCP
php/default PHP MCP server with the official PHP SDK

Usage

# Install CLI
npm install -g mcpize

# Create from template (runtime/name; "typescript" = "typescript/default")
mcpize init my-server --template typescript
mcpize init my-server --template typescript/billing-events
mcpize init my-server --template python
mcpize init my-server --template php

# OpenAPI templates ("openapi" = "typescript/openapi")
mcpize init my-api --template openapi --from-url https://api.example.com/openapi.json
mcpize init my-api --template python/openapi --from-file ./openapi.yaml

Template Structure

Each template lives at <runtime>/<name>/ and should include:

runtime/template-name/
├── src/                  # Source code
├── Dockerfile            # Container build
├── mcpize.yaml           # MCPize configuration (runtime, build, startCommand)
├── package.json          # Dependencies: package.json (Node.js), pyproject.toml + uv.lock (Python), composer.json (PHP)
├── template.config.json  # Optional: description, postInit script, CLI options
└── CLAUDE.md             # AI assistant instructions (optional)

Contributing

  1. Create a new folder under the runtime directory (e.g., typescript/my-template)
  2. Add required files (Dockerfile, mcpize.yaml, source code)
  3. Submit a pull request

License

MIT