Skip to content

Cursor

Wire Cursor to agentry so the Cursor agent can create sandboxes, write files, run commands, and ship apps on your server.

You'll need

Add agentry as an MCP server

Cursor reads MCP config from ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project).

Open or create ~/.cursor/mcp.json and add:

json
{
  "mcpServers": {
    "agentry": {
      "command": "agentry",
      "args": ["mcp"]
    }
  }
}

Save the file.

Per-project config

If you'd rather scope agentry to a single project, create .cursor/mcp.json inside that project's folder with the same content. Cursor merges per-project and global servers.

Restart Cursor

Quit and relaunch.

Verify

Open the chat panel (Cmd-L) and type:

List the agentry tools available to you.

You should see tools like sandbox_create, app_probe, command_run, file_write, port_wait. If those show up, you're wired.

If not, see MCP wiring troubleshooting.

Try it

Use agentry to build a hello-world homepage — a single page that says "Hello from agentry". Start the dev server.

Cursor should call sandbox_create, scaffold the page, run the dev server, and report the port it's listening on. It won't hand you a public link — open the sandbox in the dashboard and click Share for a *.agentry.live preview URL.

Path issues

If Cursor can't find agentry, use the full path:

bash
which agentry

Then in ~/.cursor/mcp.json:

json
{
  "mcpServers": {
    "agentry": {
      "command": "/Users/you/.local/bin/agentry",
      "args": ["mcp"]
    }
  }
}

This is the most common cause of "Cursor lists 0 agentry tools".

Pin a server

Same as Claude Code — pass --server <name> to agentry mcp:

json
{
  "mcpServers": {
    "agentry": {
      "command": "agentry",
      "args": ["mcp", "--server", "homelab"]
    }
  }
}

Common gotchas

Tools don't appear after editing config

  • Cursor's MCP server reload is best-effort. Quit fully (Cmd-Q), relaunch.
  • Bad JSON breaks the whole MCP block. Validate with cat ~/.cursor/mcp.json | python3 -m json.tool.

"agentry mcp" exits immediately

Run it in a terminal: agentry mcp. If it errors with "not logged in", run agentry login and try again.

Switch between models with OpenRouter

To A/B different models from Cursor without juggling keys, configure Cursor to call OpenRouter. OpenRouter is OpenAI-API-compatible and fronts ~200 models — Claude, GPT, Gemini, Llama, DeepSeek, Qwen — behind one key.

In Cursor → Settings → Models, set the base URL to https://openrouter.ai/api/v1, paste your OpenRouter key, and use model strings like anthropic/claude-3.5-sonnet, openai/gpt-4o, or meta-llama/llama-3.3-70b-instruct. Switch models by changing the string. agentry doesn't care which one you use.

Next

  • Prompting — get Cursor to follow the right patterns.
  • Ship an app — go from prototype to production URL.

agentry — run AI-built apps on your own hardware.