Connect Cursor to OrgRelay
Cursor reads MCP servers from an mcp.json file. Give it the company's OrgRelay address and an Authorization header, and the agent can look up company documents and data while you code.
You need a personal token from My account → MCP connections; see the MCP overview. Replace https://ai.example.com with your company's OrgRelay address.
Global configuration
Create or edit ~/.cursor/mcp.json:
{
"mcpServers": {
"orgrelay": {
"url": "https://ai.example.com/mcp",
"headers": {
"Authorization": "Bearer ${env:ORGRELAY_TOKEN}"
}
}
}
}Set the variable in your shell profile and restart Cursor so it inherits it:
export ORGRELAY_TOKEN=<your-token>Cursor resolves ${env:NAME} in url and headers, so the token never sits in the file.
Project configuration
The same JSON in .cursor/mcp.json inside a repository applies to that project only. It is a good fit for a repository that implements a connector, where the agent needs both the code and company context. Commit the file only with ${env:...} references, never with a token.
Local bridge
If OrgRelay is reachable only from the Mac mini, use the stdio bridge OrgRelay serves:
{
"mcpServers": {
"orgrelay": {
"type": "stdio",
"command": "node",
"args": ["${userHome}/orgrelay-mcp.mjs"],
"env": {
"ORGRELAY_URL": "http://127.0.0.1:8686/mcp",
"ORGRELAY_TOKEN": "${env:ORGRELAY_TOKEN}"
}
}
}
}Download the bridge first with curl -fsSL https://ai.example.com/mcp/orgrelay-mcp.mjs -o ~/orgrelay-mcp.mjs. It needs Node.js 18 or later.
Checking it
Servers can be switched on and off from Customize in Cursor's sidebar. When something is wrong, open the Output panel (Cmd+Shift+U) and choose MCP Logs. Common messages:
| In MCP Logs | Fix |
|---|---|
| 401 | Token wrong, expired or revoked, or ORGRELAY_TOKEN not set in the environment Cursor started from |
| Connection refused or timeout | Address unreachable from this network; Cloudflare Access not bypassed for /mcp |
| Tools listed, then calls fail with 429 | More than 60 calls per minute on one token |
Then ask the agent: "Use orgrelay to find how payment terms are written in our recent quotations, with sources." File names and locations in the answer mean it works.
Rules for the agent
Cursor supports project rules. Add OrgRelay's recommended system prompt as a rule so the agent cites sources, computes numbers with query_table and proposes changes only through create_approval_request.
Cursor while building a connector
Point a second entry at your local connector to try its tools as you write them:
{
"mcpServers": {
"sample-erp": {
"url": "http://127.0.0.1:8787/mcp",
"headers": { "Authorization": "Bearer ${env:SAMPLE_ERP_TOKEN}" }
}
}
}The quickstart starts a template on that port. The MCP transport spec and the self-test tool cover correctness.
Common questions
Global or project file? Global for personal use; project only with ${env:...}.
Where are errors? Output panel, MCP Logs.
Need the bridge? Only when OrgRelay is reachable from the Mac mini alone.
Next
- Other clients: Claude Code, Codex, Claude Desktop.
- What the agent can and cannot do with company data: enterprise MCP patterns.
- Vendor servers that can sit behind OrgRelay: official MCP servers.
- The business view of staff using their own AI tools is on orgrelay.com/security.
- Why approvals stay in OrgRelay: human-in-the-loop.
- Company skills over MCP: Agent Skills.
- Systems you can reach once connected: whichever ones the owner has bound in OrgRelay.
- Rules connected systems follow: security requirements and approvals and write tools.
- Prefer the terminal? Claude Code works the same way.
- Building a connector to test from Cursor: code templates and the connector spec.