Agents

Cursor

The current XOROX integration for Cursor: setup, MCP activation, and what to expect.

Cursor is the current supported coding agent integration for XOROX. This page covers the details specific to it.

Setup

See Quickstart for the full flow. In short: create a project credential, run npm install @xorox-ai/agent in the project Cursor has open, add XOROX_PROJECT_ID and XOROX_TOKEN to .env, then reopen the project.

What installation configures

Installing the package writes two files Cursor reads when a project loads:

.cursor/hooks.json
{
  "version": 1,
  "hooks": {
    "beforeSubmitPrompt": [
      { "command": "node node_modules/@xorox-ai/agent/hooks/before-submit.js" }
    ]
  }
}
.cursor/mcp.json
{
  "mcpServers": {
    "xorox": {
      "command": "node",
      "args": ["node_modules/@xorox-ai/agent/mcp/server.js"]
    }
  }
}

Both are merged into any existing content in those files — other hooks or MCP servers you have configured are left alone.

Cursor reads these files when a project loads, not continuously. If Cursor was already open when you installed or updated the package, reopen the project.

Automatic Ruleset context

The beforeSubmitPrompt hook runs on every prompt you submit in that project. It starts (or reuses) a small local runtime process, which fetches your project's active Rulesets and the Specifications index from XOROX, and injects them into the prompt before the agent sees it — see Rulesets.

This fails open: if XOROX is unreachable, misconfigured, or your platform isn't supported, your prompt still goes through normally — it just won't carry XOROX context that time.

Enabling the MCP server

Cursor detects a project's declared MCP server from .cursor/mcp.json automatically, but it does not enable it for you. This is a one-time, per-project step:

  1. Open Cursor Settings → Tools & MCP.
  2. Find xorox in the list and enable it.
  3. Start a new Agent chat. A chat already open may still be using its old tool list.

Tool approval

The first time the agent actually calls a XOROX tool, Cursor shows its own permission prompt: Run or Always run. Run approves that one call; Always run stops it asking again for that tool in this project.

Specifications and Tasks

Unlike Rulesets, Specifications and Tasks aren't pushed automatically — the agent retrieves them by calling a XOROX MCP tool when it decides it needs to. See MCP tools for the exact tool names and arguments.

Supported platforms

  • macOS — Apple Silicon and Intel
  • Linux — x64 and arm64
  • Windows — x64 and ARM64