{"_id":"@3dpolygen/mcp","name":"@3dpolygen/mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@3dpolygen/mcp","version":"0.1.0","description":"Polygen MCP server — drive the Concept → 3D Models → Textures pipeline from any MCP host. Dual-era (2026-07-28 modern + legacy).","license":"UNLICENSED","private":false,"homepage":"https://www.3dpolygen.com","repository":{"type":"git","url":"git+https://github.com/3dpolygen/polygen.git","directory":"tools/polygen-mcp"},"keywords":["mcp","modelcontextprotocol","3d","game-assets","pbr","polygen"],"type":"module","publishConfig":{"access":"public"},"bin":{"polygen-mcp":"dist/bin/stdio.js"},"scripts":{"build":"node scripts/build.mjs","typecheck":"tsc -p tsconfig.json","test":"npm run build && node scripts/dual-era-smoke.mjs","smoke":"npm run build && node scripts/dual-era-smoke.mjs","start":"node dist/bin/stdio.js","prepare":"npm run build"},"dependencies":{"@modelcontextprotocol/server":"2.0.0","zod":"^4.1.5"},"devDependencies":{"@modelcontextprotocol/client":"^2.0.0","@types/node":"^24.0.0","esbuild":"^0.25.12","typescript":"^5.9.0"},"engines":{"node":">=20.0.0"},"gitHead":"412c7cba43334dc5470e5ac424f1e498fab85458","_id":"@3dpolygen/mcp@0.1.0","bugs":{"url":"https://github.com/3dpolygen/polygen/issues"},"_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-tQs5mesEjSz+VNXQhG6lMd2B7ykivdP9GNJTiF0kFg0QkVqrpG7y4M/WegXlKcp8TbqAPGu0mqdysUHYKW6CfQ==","shasum":"7d4a66b8744ab03c39e5ccd77d79d13d82512590","tarball":"https://registry.npmjs.org/@3dpolygen/mcp/-/mcp-0.1.0.tgz","fileCount":4,"unpackedSize":156753,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDw+CtjNa0iMPtZtCwgpTnCeH3fBsvK/A1wLYl6IG03lAiEA6iM6mSOZOklb5cFINmDbzDxx+i/YbhdhUxu685KEXK0="}]},"_npmUser":{"name":"ethan-polygen","email":"ethan@3dpolygen.com"},"directories":{},"maintainers":[{"name":"ethan-polygen","email":"ethan@3dpolygen.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_0.1.0_1785443801068_0.8650008012035171"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-30T20:36:40.854Z","0.1.0":"2026-07-30T20:36:41.237Z","modified":"2026-07-30T20:36:41.517Z"},"maintainers":[{"name":"ethan-polygen","email":"ethan@3dpolygen.com"}],"description":"Polygen MCP server — drive the Concept → 3D Models → Textures pipeline from any MCP host. Dual-era (2026-07-28 modern + legacy).","homepage":"https://www.3dpolygen.com","keywords":["mcp","modelcontextprotocol","3d","game-assets","pbr","polygen"],"repository":{"type":"git","url":"git+https://github.com/3dpolygen/polygen.git","directory":"tools/polygen-mcp"},"bugs":{"url":"https://github.com/3dpolygen/polygen/issues"},"license":"UNLICENSED","readme":"# @3dpolygen/mcp\n\nThe [Polygen](https://www.3dpolygen.com) MCP server, over stdio — drive the **Concept → 3D Models →\nTextures** pipeline from Claude Code, Claude Desktop, Cursor, Codex, or any MCP host.\n\nRequires a Polygen account on **Indie or higher** and an API key.\n\n## Install\n\nNothing to install — point your host at `npx`.\n\n```json\n{\n  \"mcpServers\": {\n    \"polygen\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@3dpolygen/mcp\"],\n      \"env\": { \"POLYGEN_API_KEY\": \"plg_live_…\" }\n    }\n  }\n}\n```\n\nCodex (`~/.codex/config.toml`):\n\n```toml\n[mcp_servers.polygen]\ncommand = \"npx\"\nargs = [\"--yes\", \"@3dpolygen/mcp\"]\n\n[mcp_servers.polygen.env]\nPOLYGEN_API_KEY = \"plg_live_…\"\n```\n\n## Configuration\n\n| Variable | Required | Default | Notes |\n|---|---|---|---|\n| `POLYGEN_API_KEY` | yes | — | Scoped, revocable key (`plg_live_…`), minted in Account → API keys. Shown once. |\n| `POLYGEN_API_URL` | no | `https://www.3dpolygen.com` | Override only for staging or a self-hosted origin. |\n| `POLYGEN_REQUEST_TIMEOUT_MS` | no | `120000` | Generation is async — poll `polygen_run` rather than raising this. |\n\nThe server writes the origin it is serving to **stderr** on startup, so your host's MCP log shows\nwhich Polygen it is talking to. Startup failures exit `78` with the reason and a remedy rather than\nstarting a server that would fail every call.\n\nThere is also a **remote Streamable HTTP** endpoint at `https://www.3dpolygen.com/api/agent/mcp`,\nwhich needs no install and cannot go stale. Both transports serve the same implementation.\n\n## What it exposes\n\n**Tools** — `polygen_onboard`, `polygen_contracts`, `polygen_elevate`, `polygen_generate`,\n`polygen_run`, `polygen_price`, `polygen_style`, `polygen_projects`, `polygen_assets`.\n\n**Prompts** — `polygen-concept`, `polygen-kit-sheet`, `polygen-style-from-image`,\n`polygen-elevate-check`.\n\n**Resources** — `polygen://product-map`, `polygen://craft/concept`, `polygen://craft/kit-sheets`,\n`polygen://craft/style-aspects`, `polygen://capabilities`, `polygen://contracts`,\n`polygen://projects`, `polygen://styles`.\n\nReads, `polygen_price`, `polygen_contracts` and `polygen_elevate` cost no image credits; only\n`polygen_generate` spends.\n\n## The order that works\n\n1. **Bind a style** — persistent art direction is the point. Generating before binding is the most\n   common way to get mediocre output from a capable pipeline.\n2. **Read the contracts** (`polygen_contracts`, free) — returned whole.\n3. **Elevate** (`polygen_elevate`, free) — returns the prompt that *would* generate, plus a spendable\n   handle.\n4. **Read the opening clause** — it decides camera, framing, and whether the result reads as an\n   extractable asset.\n5. **Generate with the handle** — the resolved input is re-checked; if anything moved, the call fails\n   and names the field rather than spending.\n\n## Protocol\n\nDual-era. Serves the `2026-07-28` revision (per-request `_meta`, `server/discover`, no handshake) and\nclients still opening with `initialize` on `2025-11-25`. An unsupported version is refused with\n`-32022` naming the supported set rather than being silently downgraded.\n\n## Development\n\nThis package is a **distribution shell, not a second implementation**. The server lives in\n`website/lib/mcp/` so the Next.js route can mount the same code as the HTTP transport; `npm run build`\nbundles it here with esbuild. See `scripts/build.mjs` for why `tsc` cannot build this package.\n\n```bash\nnpm run build      # bundle → dist/bin/stdio.js\nnpm run typecheck  # tsc --noEmit over the bundled graph\nnpm test           # build, then the dual-era protocol smoke\n```\n\n`POLYGEN_MCP_BIN=/path/to/stdio.js npm run smoke` points the smoke at a packed-and-installed binary,\nwhich is the only thing that proves the *distribution* rather than the working tree.\n","readmeFilename":"README.md","_rev":"1-76c6f8ff07a6ba24568c4f7330c79244"}