Skip to content
unfenced.ai

Claude Code integration

On this page

Claude Code can use Unfenced to read URLs and work with live browser pages while you build software. The connection uses remote MCP; you do not need a local browser server.

Before you start

Install Claude Code and sign in to Unfenced to create your agent's API key. Make UNFENCED_TOKEN available in the environment that launches Claude Code. Its value is your Unfenced key, not your Anthropic key.

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 configuration

Create or edit .mcp.json in your project. Merge this server into an existing mcpServers map rather than replacing your other servers:

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

The placeholder is intentional: Claude Code expands ${UNFENCED_TOKEN} from its environment. You can share the configuration without including the key. Keep the actual key out of Git and chat.

Start Claude Code in that project, approve the project MCP server when prompted, and run /mcp to inspect the connection.

Try your first fetch

Ask Claude Code:

Agent prompt
Use Unfenced fetch_page to read https://example.com.
Return the page title and a 2-sentence summary, with the source URL.

You should see an Unfenced tool call and a summary of the Example Domain page. A summary produced without a tool call does not verify the integration.

If it does not connect

  • Missing environment variable: set UNFENCED_TOKEN before starting Claude Code, then restart it.
  • Unauthorized: check that the key is active in Unfenced and belongs to the intended account.
  • No tools: inspect /mcp and approve the project server if it is pending.
  • A source website refuses access: read the failure-code reference; a working MCP connection does not guarantee every source is accessible.

What to try next

Read JavaScript websites or research several URLs. For client configuration details, see the official Claude Code MCP guide.

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

Request accessSign in