{"_id":"@aigentools/mcpgen","_rev":"2-3fdcb2b616b5bd1c5250a268b22c3c30","name":"@aigentools/mcpgen","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@aigentools/mcpgen","version":"0.1.1","_id":"@aigentools/mcpgen@0.1.1","maintainers":[{"name":"beshkenadze","email":"beshkenadze@gmail.com"}],"bin":{"mcpgen":"dist/index.js"},"dist":{"shasum":"196b36c69ce172af6605643a00cb33364c1e91bc","tarball":"https://registry.npmjs.org/@aigentools/mcpgen/-/mcpgen-0.1.1.tgz","fileCount":8,"integrity":"sha512-c7tzuAbUMmyD6YnllTGKveXDG8piM83qfAID13OPE6L2VOJ2fvw/qMXiaqfDvN/FYKXuFn73Z/qcWXVLzCXTCA==","signatures":[{"sig":"MEQCIDLUA8TmteQZv6JfN/WoweuIsfA2uPRvN0PGD6/HHoPgAiACuHN75xUXxh/gOYuvySn0jlF3OkTzxQ51eW9SGKr+UA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33378435},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"9315a4cd83c2215c83c4adb4597bb7ebf4a859f7","private":false,"scripts":{"dev":"bun run src/index.ts","lint":"biome lint .","test":"bun test","build":"bun build src/index.ts --outdir dist --target node --format esm --sourcemap && tsc -p tsconfig.json --emitDeclarationOnly && bun run ./scripts/add-shebang.ts","format":"biome format --write .","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"bun test --watch","build:binary":"bun run ./scripts/build-binary.ts","build:binary:cross":"bun run ./scripts/build-cross-platform.ts","build:binary:linux":"bun build --compile --target=bun-linux-x64 --minify --sourcemap --define BUILD_VERSION='\"$(bun --version)\"' --define BUILD_TIME='\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"' --define BUILD_TARGET='\"linux-x64\"' src/index.ts --outfile bin/mcpgen-linux-x64","build:binary:macos":"bun build --compile --target=bun-darwin-x64 --minify --sourcemap --define BUILD_VERSION='\"$(bun --version)\"' --define BUILD_TIME='\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"' --define BUILD_TARGET='\"darwin-x64\"' src/index.ts --outfile bin/mcpgen-macos-x64","build:binary:windows":"bun build --compile --target=bun-windows-x64 --minify --sourcemap --define BUILD_VERSION='\"$(bun --version)\"' --define BUILD_TIME='\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"' --define BUILD_TARGET='\"windows-x64\"' src/index.ts --outfile bin/mcpgen-windows-x64.exe"},"_npmUser":{"name":"beshkenadze","email":"beshkenadze@gmail.com"},"_npmVersion":"10.8.2","description":"CLI for generating an MCP server scaffold from an OpenAPI document.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"yaml":"^2.5.0","boxen":"^8.0.1","chalk":"^5.5.0","consola":"^3.4.2","@clack/prompts":"^0.10.0","@aigentools/mcpgen-core":"workspace:*"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcpgen_0.1.1_1755091423974_0.9222039680928651","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aigentools/mcpgen","version":"0.1.2","private":false,"type":"module","bin":{"mcpgen":"dist/index.js"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"bun build src/index.ts --outdir dist --target node --format esm --sourcemap && tsc -p tsconfig.json --emitDeclarationOnly && bun run ./scripts/add-shebang.ts","build:binary":"bun run ./scripts/build-binary.ts","build:binary:cross":"bun run ./scripts/build-cross-platform.ts","build:binary:linux":"bun build --compile --target=bun-linux-x64 --minify --sourcemap --define BUILD_VERSION='\"$(bun --version)\"' --define BUILD_TIME='\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"' --define BUILD_TARGET='\"linux-x64\"' src/index.ts --outfile bin/mcpgen-linux-x64","build:binary:macos":"bun build --compile --target=bun-darwin-x64 --minify --sourcemap --define BUILD_VERSION='\"$(bun --version)\"' --define BUILD_TIME='\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"' --define BUILD_TARGET='\"darwin-x64\"' src/index.ts --outfile bin/mcpgen-macos-x64","build:binary:windows":"bun build --compile --target=bun-windows-x64 --minify --sourcemap --define BUILD_VERSION='\"$(bun --version)\"' --define BUILD_TIME='\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"' --define BUILD_TARGET='\"windows-x64\"' src/index.ts --outfile bin/mcpgen-windows-x64.exe","dev":"bun run src/index.ts","typecheck":"tsc -p tsconfig.json --noEmit","lint":"biome lint .","format":"biome format --write .","test":"bun test","test:watch":"bun test --watch"},"dependencies":{"@clack/prompts":"^0.10.0","@aigentools/mcpgen-core":"workspace:*","boxen":"^8.0.1","chalk":"^5.5.0","consola":"^3.4.2","yaml":"^2.5.0"},"_id":"@aigentools/mcpgen@0.1.2","gitHead":"6b4c43ec515c6e162d5d6dfefbda39e8e3fbf56b","description":"CLI for generating an MCP server scaffold from an OpenAPI document.","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-LTsKVlIXR4NZ/iem/+GmGJ4wuPkyTrjMiOPzL/QkgBRY/6VIZRv3Si/XIxsCLFFwJR/3ambyHW1JOyPEtVt3iQ==","shasum":"9299deabededf6c8a8b3a1dad871fb7d2a079f8f","tarball":"https://registry.npmjs.org/@aigentools/mcpgen/-/mcpgen-0.1.2.tgz","fileCount":8,"unpackedSize":33378435,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCor+MniwLrfmodVUlWX2LjkfU0DxN6EgdsIDpcuyaPZwIgaoPVA+ImQHAY3Z7S/PUtKU2QY3QtD/T/yOAcw2yyKPs="}]},"_npmUser":{"name":"beshkenadze","email":"beshkenadze@gmail.com"},"directories":{},"maintainers":[{"name":"beshkenadze","email":"beshkenadze@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcpgen_0.1.2_1755092640041_0.11768429994671492"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-13T13:23:43.878Z","modified":"2025-08-13T13:44:00.522Z","0.1.1":"2025-08-13T13:23:44.317Z","0.1.2":"2025-08-13T13:44:00.325Z"},"description":"CLI for generating an MCP server scaffold from an OpenAPI document.","maintainers":[{"name":"beshkenadze","email":"beshkenadze@gmail.com"}],"readme":"# @aigentools/mcpgen\n\nCLI for generating an MCP server scaffold from an OpenAPI document.\n\n## Usage\n```sh\nmcpgen --input <openapi.(json|yaml)> --out <dir> [--name <server-name>] [--runtime bun|node|hono] [--force]\n\n# Standard runtime examples (stdio transport)\nmcpgen --input ./petstore.json --out ./servers/petstore --name petstore-mcp --runtime bun\nmcpgen --input ./petstore.json --out ./servers/petstore --name petstore-mcp --runtime node\n\n# Hono runtime example (HTTP + SSE + WebSocket transports)\nmcpgen --input ./petstore.json --out ./servers/petstore-web --name petstore-mcp --runtime hono\n```\n\n### Subcommands\n- `version`: Show detailed version info (name + version, runtime, release date, commit)\n\nExamples:\n```sh\nmcpgen version\n# during local dev\nbun run -w packages/cli dev version\n```\n\n### Flags\n- `--input, -i`: Path to the OpenAPI spec (`.yaml/.yml/.json`).\n- `--out, -o`: Output directory for the scaffold.\n- `--name, -n`: Server name; when omitted, clack suggests one.\n- `--runtime, -r`: Runtime: `bun` (default), `node`, or `hono` (web server with HTTP/SSE/WebSocket).\n- `--force, -f`: Skip confirmation when output directory is not empty.\n- `--config, -c`: YAML config file with `openapi` and optional `name`.\n- `--help, -h`: Show usage.\n- `--version, -v`: Show version.\n\n### Interactive mode (clack)\nIf any required flags are missing, `mcpgen` enters an interactive flow:\n- Validates `--input` exists and has the correct extension.\n- Suggests `--name` using `info.title` from the OpenAPI spec when available, falling back to the input filename (slugified) with `-mcp` appended.\n- Suggests `--out` as `./servers/<name>`.\n- Prompts for `--runtime` selection: Bun (recommended), Node.js, or Hono Web Server (HTTP + SSE + Stdio).\n- Confirms overwriting an existing non-empty output directory (unless `--force`).\n\n### Configuration file\nMinimal supported YAML file when using `--config`:\n```yaml\nopenapi: ./path/to/spec.yaml\nname: my-mcp\nruntime: hono  # optional: bun (default), node, or hono\n# out can still be passed via --out; defaults to \"output\" if omitted\n```\n\n## Dev\n- Run help from built binary: `bun --bun packages/cli/dist/index.js --help`\n- Build (bundled + d.ts): `bun run --filter @aigentools/mcpgen build`\n- Typecheck: `bun run -w packages/cli typecheck`\n\n## Tests\n- Run: `bun -w packages/cli test` or `cd packages/cli && bun test`\n- Includes: unit tests for arg parsing and interactive prompts (mocked), plus an integration test that spawns the bundled CLI.\n\n## Notes\n- Build uses Bun bundler for JS and `tsc --emitDeclarationOnly` for `.d.ts`.\n- A post-build step adds a `#!/usr/bin/env node` shebang to `dist/index.js` so the `bin` works.\n- The CLI delegates to `@aigentools/mcpgen-core`.\n","readmeFilename":"README.md"}