MCP client setup

Connect to the hosted server for normal use. Run the server locally over stdio when you are developing tools or the protocol integration itself.

Claude Desktop

{
  "mcpServers": {
    "fenceline": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.fenceline.ai/mcp/sse",
        "--header",
        "X-API-Key:YOUR_API_KEY"
      ]
    }
  }
}

Claude Desktop reads stdio server definitions from mcpServers and does not accept a bare URL entry, so the hosted connection goes through the mcp-remote bridge to the authenticated SSE endpoint. Requires Node.js for npx.

URL-capable clients

{
  "mcpServers": {
    "fenceline": {
      "url": "https://mcp.fenceline.ai/mcp",
      "headers": { "X-API-Key": "YOUR_API_KEY" }
    }
  }
}

Clients that accept a remote server URL (Cursor, VS Code, and similar) connect directly to the Streamable HTTP endpoint. Some take the URL and headers through a settings UI instead of JSON; consult your client's current documentation. Discovery works without a key; tools/list and tool calls require one. Keep API keys out of checked-in files.

Local development: the steps below require a local repository checkout and the server's environment dependencies. They are not a self-service customer setup flow.

1. Build the package

npm --prefix servers/mcp ci
npm --prefix servers/mcp run build

Review servers/mcp/env.example for variable names and supply credentials through an approved local secret mechanism.

2. Configure an stdio-capable client

{
  "mcpServers": {
    "fenceline-local": {
      "command": "node",
      "args": ["/absolute/path/to/fenceline/servers/mcp/dist/index.cjs"],
      "env": {
        "MCP_TRANSPORT": "stdio",
        "FENCELINE_CONTRACTOR_ID": "YOUR_CONTRACTOR_ID"
      }
    }
  }
}

Use an absolute path and keep secrets outside the checked-in JSON. Your client version may use a different settings workflow; consult its current documentation.

3. Verify the exact tool path

Start with tool discovery, then call only the tool you are developing. Registered agent, vendor, permit, and SEO tools can contain staged or fallback behavior; inspect the handler before using side effects.