create-shapemcp-server
v1.0.1
Published
Scaffold MCP servers from ShapeMCP (https://shapemcp.com) — UI export or JSON config
Downloads
14
Maintainers
Readme
create-shapemcp-server
Official command-line tool for ShapeMCP — scaffold a production-ready Model Context Protocol (MCP) server from:
- a graph you built in the UI (MCP guide / builder) and exported as JSON or a share URL, or
- a local
mcp.config.json(or equivalent) manifest.
Live site: shapemcp.com · CLI docs: shapemcp.com/cli · Package: npmjs.com/package/create-shapemcp-server
Why this name?
The npm name create-mcp-server was already registered by another package. This CLI is published as create-shapemcp-server so installs are unambiguous and tied to the ShapeMCP project.
Usage
No global install required — use npx:
npx -y create-shapemcp-server my-appThen:
cd my-app
npm install # if you used --skip-install
npm run devInteractive prompts will ask for project name, transport (HTTP / SSE / stdio), template, and whether to include an example tool — unless you pass flags (see below).
Common flags
| Flag | Description |
|------|-------------|
| --template basic | advanced | Scaffold style (same generator; advanced reserved for future extras). |
| --transport http | sse | stdio | Default MCP transport. |
| --example-tools yes | no | Include the example echo tool. |
| --config ./mcp.json | Load manifest from disk. |
| --config-url <url> | Fetch manifest JSON from a URL. |
| --from-shapemcp [token\|url] | Load config from ShapeMCP: full share URL, or short v1… token (resolved against --shapemcp-api). |
| --shapemcp-api <origin> | API origin for tokens (default: https://shapemcp.com). Override with env SHAPEMCP_API. |
| --force | Allow writing into a non-empty directory. |
| --skip-install | Do not run npm install after scaffold. |
Examples:
npx -y create-shapemcp-server my-app --from-shapemcp "https://shapemcp.com/api/mcp-config/v1...."
npx -y create-shapemcp-server my-app --config ./mcp.json
npx -y create-shapemcp-server my-app --transport stdio --example-tools noShapeMCP UI ↔ CLI
- Build a graph at shapemcp.com/mcp.
- Use Export MCP Server to download a ZIP and get a share URL for the same manifest.
- Run
npx -y create-shapemcp-server <folder> --from-shapemcp "<url-or-token>"to generate the same project locally.
Exported projects include mcp.config.json and mcp.nodes.json for round-trip with the builder.
What gets generated
- Runtime:
@modelcontextprotocol/sdk, Zod, AJV, Express (for HTTP/SSE transports). - Layout:
server/tools/*,server/transports/*,server/validation/*,server/create-server.ts,server/index.ts, plusmcp.config.json,mcp.nodes.json,tsconfig.json,README.md,.env.example. - Scripts:
npm run dev(tsx watch),npm run build,npm start(compileddist/).
Dependencies (what you actually install)
When you run npx create-shapemcp-server, npm only installs runtime dependencies of this CLI package:
| Package | Role | |---------|------| | commander | Argument parsing and help. |
The published package.json also lists devDependencies (typescript, @types/node) for developers who clone the repo and build the CLI from source. Those are not installed when end users run npx against the published tarball in the normal way (npm installs production deps for the tool).
Development (this monorepo)
cd packages/create-mcp-server
npm install
npm run build
node dist/index.js --helpPublish (with npm 2FA / token as required by your account):
npm publish --access public
# If npm asks for 2FA, use a 6-digit authenticator code:
# npm publish --access public --otp=123456License
MIT — see the ShapeMCP repository.
