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
read -r -s UNFENCED_TOKEN
export UNFENCED_TOKENPowerShell 7.1 or later
$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:
{
"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:
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_TOKENand 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.