Skip to content
For LLMsView as Markdown·

Connecting Cursor

This guide walks through connecting Cursor to your OneHazel workflows over MCP. Cursor's Agent / Composer can then call any workflow you've exposed.

If you haven't already, see Connecting Claude Desktop first — Steps 1–3 (expose workflows, create an MCP-enabled API key, find your MCP URL) are identical and won't be repeated here.

Step 4 — Add OneHazel to Cursor's MCP settings

Cursor reads MCP servers from ~/.cursor/mcp.json (global) or .cursor/mcp.json at the project root (per-project).

Via the Cursor UI

  1. Open Cursor → SettingsFeaturesModel Context Protocol
  2. Click + Add new MCP server
  3. Fill in:
    • Name: onehazel
    • Type: http
    • URL: https://api.onehazel.com/mcp-server
  4. Add a header:
    • Key: Authorization
    • Value: Bearer oh_live_YOUR_KEY_HERE
  5. Save

Via mcp.json directly

Edit ~/.cursor/mcp.json (create if missing):

json
{
  "mcpServers": {
    "onehazel": {
      "type": "http",
      "url": "https://api.onehazel.com/mcp-server",
      "headers": {
        "Authorization": "Bearer oh_live_YOUR_KEY_HERE"
      }
    }
  }
}

Substitute oh_live_YOUR_KEY_HERE with your plaintext API key.

Backward compatibility

The legacy per-operator URL https://api.onehazel.com/mcp-server/<your_operator_id> still works. If your config already uses it, no change is required.

Per-project keys

For team setups, prefer per-project .cursor/mcp.json so each project gets its own least-privileged key. Don't commit the file with the bearer in plaintext — gitignore it and document the setup in your README instead.

Step 5 — Reload Cursor's MCP servers

In Settings → MCP, click the refresh icon next to onehazel. Cursor opens a connection and calls initialize. A green dot next to the entry means the handshake succeeded.

Step 6 — Verify

Open Cursor's Agent or Composer pane and ask:

"List the OneHazel tools you have access to."

The assistant calls tools/list and reports back. Each entry is one of your mcp_exposed workflows.

To exercise a tool:

"Run my refund_lookup workflow for customer cust_123 and tell me what came back."

Cursor's agent calls tools/call, OneHazel runs the workflow against your real connections, and the result lands in the chat.

Troubleshooting

Same error-code table as Claude Desktop — see Troubleshooting in the Claude Desktop guide and the error codes table.

Cursor-specific gotchas:

SymptomLikely causeFix
Server stuck on "Connecting…"Cursor caches old configQuit + reopen Cursor; settings reload isn't always enough
Tools show up but Agent never uses themAgent doesn't see a fitMention the tool name explicitly in your prompt, or reword the trigger schema's field descriptions to be more declarative
401 immediately after editing the keyStale connection on the old tokenHit refresh in Settings → MCP to reconnect

What's next

  • API Reference — what each JSON-RPC method does, request / response shapes
  • Security — auth model, allowlists, rate limits, audit