Claude Code
Claude Code adds MCP servers from the terminal with claude mcp add. This is the path to take when you want the agent writing integration code with the docs right there in its tools — see Let the AI do the coding.
Add a server
Section titled “Add a server”No clone, no build. Add the deployed Workers over HTTP:
# Rails MCP — operate the lifecycle (token-gated; token + slot in the URL)claude mcp add --transport http partifact-rails \ "https://partifact-rails-mcp.thanhvuttv.workers.dev/mcp/<MCP_ACCESS_TOKEN>/<your-slot>"
# Docs MCP — read the docs as tools (public, no token)claude mcp add --transport http partifact-docs \ "https://partifact-docs-mcp.thanhvuttv.workers.dev/mcp"Replace <MCP_ACCESS_TOKEN> with the token from your invite and <your-slot> with any name ([a-z0-9_-]). Prefer to keep the token out of the URL? Put it in a header instead and keep the slot in the path:
claude mcp add --transport http partifact-rails \ --header "Authorization: Bearer <MCP_ACCESS_TOKEN>" \ "https://partifact-rails-mcp.thanhvuttv.workers.dev/mcp/<your-slot>"Run the stdio servers — mock in-process, no token, no slot. Build once, then add by absolute path:
git clone https://github.com/vutran-tvg/prototype-rails-agenticcd prototype-rails-agentic && pnpm installpnpm --filter @partifact/mcp-rails build # → packages/mcp-rails/dist/stdio.jspnpm --filter @partifact/mcp-docs build # → packages/mcp-docs/dist/stdio.js
claude mcp add partifact-rails -- node "$PWD/packages/mcp-rails/dist/stdio.js"claude mcp add partifact-docs -- node "$PWD/packages/mcp-docs/dist/stdio.js"Everything after -- is the command Claude Code spawns. (During development you can skip the build: claude mcp add partifact-rails -- pnpm --filter @partifact/mcp-rails dev, run from the repo root.)
Scope: just me, or the whole project?
Section titled “Scope: just me, or the whole project?”claude mcp add defaults to local scope (this project, just you). Two others matter:
--scope user— available across all your projects.--scope project— written to a.mcp.jsonin the repo, so it’s shared with everyone who clones it (and the agent gets the tools automatically). Don’t commit a real token this way.
A project .mcp.json looks like:
{ "mcpServers": { "partifact-rails": { "type": "http", "url": "https://partifact-rails-mcp.thanhvuttv.workers.dev/mcp/<MCP_ACCESS_TOKEN>/<your-slot>" }, "partifact-docs": { "type": "http", "url": "https://partifact-docs-mcp.thanhvuttv.workers.dev/mcp" } }}Verify and use
Section titled “Verify and use”claude mcp list # shows each server + a connection checkclaude mcp get partifact-railsInside a Claude Code session, /mcp lists connected servers and their tools. Then hand it the work — drive the Corolla job with the Rails MCP, or point it at the API and have it build an integration.