Skip to content
unfenced.ai

Cursor integration

On this page

Connect Cursor Agent to Unfenced when a task needs web content beyond your local repository. Remote MCP exposes the web tools without starting a browser on your computer.

Before you start

Install Cursor and sign in to Unfenced to create your agent’s API key. Set UNFENCED_TOKEN in the environment available to Cursor, then restart Cursor. A variable exported in an unrelated terminal may not reach a desktop-launched app.

Set UNFENCED_TOKEN in your terminal

Read your Unfenced key privately, then start your client from this same terminal. These variables last for the current terminal session. An app opened from the desktop may not inherit them.

Bash or Zsh

Terminal
read -r -s UNFENCED_TOKEN
export UNFENCED_TOKEN

PowerShell 7.1 or later

PowerShell
$env:UNFENCED_TOKEN = Read-Host -MaskInput "Unfenced API key"

Add the server

Edit ~/.cursor/mcp.json for a personal configuration, or .cursor/mcp.json in a project. Merge the server into any existing mcpServers map:

JSON
{
  "mcpServers": {
    "unfenced": {
      "type": "http",
      "url": "https://unfenced.ai/api/mcp",
      "headers": { "Authorization": "Bearer ${env:UNFENCED_TOKEN}" }
    }
  }
}

Cursor expands ${env:UNFENCED_TOKEN} in the header. Keep the actual key outside your repository. Remote servers use the app's environment; Cursor's envFile option is for stdio servers.

Save the file, restart Cursor, and check that Unfenced is enabled in its MCP settings.

Try your first fetch

Open an Agent conversation and ask:

Agent prompt
Use Unfenced fetch_page to read https://example.com.
Tell me the page title and summarize it, including its source URL.

Approve the tool call if requested. Check that Cursor used Unfenced and returned information from Example Domain.

If it does not connect

  • Missing tools: check the server toggle and restart Cursor after saving configuration.
  • Unauthorized: confirm Cursor can read UNFENCED_TOKEN and the key is active.
  • Unexpected server settings: a project configuration takes precedence over a global server with the same name.
  • Connection errors: inspect Cursor's MCP logs and check the endpoint includes /api/mcp.

What to try next

Use JavaScript page reading for external documentation or multi-URL research for comparisons. See Cursor's official MCP documentation for configuration details.

Configuration reviewed: 2026-10-04. Check the connection in your client before relying on it.

Request accessSign in