PPactDocs
MCP & AI agents

Connect Windsurf

Add Pact as an MCP server in Windsurf's mcp_config.json so Cascade can query your CRM — consent-filtered and audited.

Windsurf's Cascade agent supports MCP servers over Streamable HTTP, so Pact's tools plug straight in. Every call is consent-filtered, tenant-scoped, and written to your Pact audit log.

Prerequisites

  • A scoped Pact API key (pact_live_* or pact_test_*), created at Settings → API keys, with the read scopes for the tools you want.
  • Windsurf with MCP support (any recent release).

1. Add the server

Open Windsurf Settings → Cascade → Model Context Protocol and choose Add serverAdd custom server, or edit the config file directly at ~/.codeium/windsurf/mcp_config.json:

json
{
  "mcpServers": {
    "pact": {
      "serverUrl": "https://api.pact.place/mcp/",
      "headers": { "Authorization": "Bearer pact_live_xxx" }
    }
  }
}

Replace pact_live_xxx with your key. Note Windsurf uses serverUrl (not url) for remote servers.

Warning

Keep the trailing slash on /mcp/ — the redirect from /mcp drops the Authorization header in most HTTP clients and reads as a 401.

2. Refresh

In the Cascade panel's MCP section, click Refresh. The pact server should list its tools. If you edited the file by hand, the refresh picks the change up without restarting Windsurf.

3. Verify

Ask Cascade:

Using the pact tools, list our top accounts by deal value.

You should see a query_accounts call in the tool activity, and the response reports any records hidden by consent (consent_filtered).

Troubleshooting

SymptomLikely cause
401 on every callMissing trailing slash, or a revoked key
Server listed but no toolsserverUrl typo — confirm https://api.pact.place/mcp/
Scope error on a specific toolThe key lacks that tool's scope — see the tool reference

Test any tool with real arguments — no LLM in the loop — in the tool sandbox before wiring up a client.