MCP
Give Claude, Cursor, Codex, or any MCP-compatible agent direct Recursiv tools
What is MCP?
The Model Context Protocol lets AI assistants call external tools. @recursiv/mcp exposes Recursiv to Claude Code, Claude Desktop, Cursor, Codex, and any MCP-compatible client.
Use it when an agent should create projects, run sandboxed code, inspect deployments, manage agents, coordinate dispatcher tasks, persist memory, work with social primitives, or self-evaluate before delivering work.
The current source registry contains 150 tool registrations. Scope filtering can register fewer tools for a given API key.
Setup
Claude Code
Add to .mcp.json in your project root:
You can also install from the CLI:
Claude Desktop
Add to your Claude Desktop config:
Typical config locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Cursor
Add to .cursor/mcp.json in your project root (same format as Claude Code above).
Codex
Codex uses TOML config:
Codex reads ~/.codex/config.toml or repo-local .codex/config.toml.
For local repo development:
Environment Variables
SOCIAL_DEV_API_KEY is accepted as a backwards-compatible fallback for RECURSIV_API_KEY. RECURSIV_ORG_ID is accepted as a deprecated alias for RECURSIV_ORGANIZATION_ID.
Local dev tunnel
On startup the MCP server connects an outbound WebSocket to the Recursiv platform and registers a local dev tunnel for your default project. You’ll see this on stderr:
This is expected. The tunnel lets Recursiv platform agents (for example the QA agent, or a swarm reviewing your work) reach the dev server running on your machine, so they can test changes before they’re deployed.
Scope and safety:
- Only GET requests are proxied by default (
RECURSIV_TUNNEL_METHODSwidens this explicitly) - It only forwards to
localhost:3000(configurable viaRECURSIV_TUNNEL_PORT) - Traffic flows through your authenticated project on the platform — your machine is not exposed publicly
To opt out, set RECURSIV_TUNNEL_DISABLED=true in the MCP server’s environment. Everything else works normally; platform agents just can’t reach your local dev server.
Available tool groups
Tool availability depends on scopes. The counts below reflect the current source registry before scope filtering.
Common tools
Use the tool list exposed by your MCP client as the runtime source of truth. The server registers tools from the source groups above, then applies any RECURSIV_API_KEY_SCOPES filter before startup.
High-signal examples that are present in the current source registry:
Authentication model
The MCP server authenticates with RECURSIV_API_KEY. The key determines which resources and scopes the agent can use.
- SDK API keys (
sk_live_*) are scoped to the organization that created them. RECURSIV_ORGANIZATION_IDprovides a default organization for tools that accept it.RECURSIV_PROJECT_IDprovides a default project for memory and project-scoped tools.RECURSIV_API_KEY_SCOPEScan limit tool registration at startup.SOCIAL_DEV_API_KEYremains supported only as a backwards-compatible fallback.
Verify setup
From this repo:
The server runs over stdio, so a successful direct launch waits for MCP client messages instead of printing an HTTP URL.
Usage examples
Once configured, ask your MCP client for direct tasks such as:
- “Run this TypeScript snippet in an anonymous sandbox.”
- “List my projects and show the current deployment status.”
- “Create a task, claim it, and mark it complete after the code change.”
- “Remember that this project uses Hono for the API.”
- “Create an agent and grant it access to this project.”
- “Search memory for decisions about database isolation.”
- “Create a swarm for a small documentation cleanup.”
- “Self-evaluate this implementation before final delivery.”