Skip to main content
Use Cursor Agent with Plainrouter over Streamable HTTP. Sign in with OAuth or supply a Workspace key. You need Cursor with remote MCP support and an enabled Agent chat. You need a Plainrouter account and access to the intended workspace. The unauthenticated sandbox is retired; start with Read access and verify the workspace result.

1. Add Plainrouter to Cursor

Add this server to your user-level ~/.cursor/mcp.json, merging it with any existing mcpServers entries:
Project-specific setup can use .cursor/mcp.json instead. Keep the production URL the same.

2. Choose authentication

Sign in with OAuth

Open Customize → MCPs, enable Plainrouter and follow Cursor’s authentication prompt. Sign in to Plainrouter, select the intended workspace and Meta ad account, and review the requested access. Choose Read for analysis; Write is required for previews and proposals. Cursor handles OAuth client registration; you do not need to paste a Workspace key or configure a static client secret. When switching from a key, remove the Plainrouter entry’s Authorization header before signing in with OAuth. Keep other servers unchanged. After sign-in, verify the connection.

Use a Workspace key instead

In Plainrouter, select your workspace and open Settings → Workspace keys. Create a Read key for analysis; use Write for Actions previews and proposals. A new Read key can also inspect Actions records and policy. Copy it once into your protected credential configuration. Select the intended workspace under Workspaces. A key can cover a fixed set of workspaces; for more than one, call list_workspaces and pass workspace_id on later tool calls. Workspace selection. Never put keys in prompts or source control. Key permissions and replacement. Replace only the plainrouter entry inside mcpServers with:
Supply the variable to Cursor through your system environment or secret manager, then restart Cursor. This snippet is an entry inside mcpServers, not a replacement for the whole file.

3. Verify the connection

Start with this read-only request:
Check the tool result, not just the assistant’s summary: the workspace must be yours and the call must succeed. This workspace-only read works before connecting Meta. For account diagnostics, connect Meta and verify the selected account. Agent replies can vary. In Ask, changes wait for approval. Auto can run enabled agent action types without individual approval; Full can run admitted agent actions without individual approval. Policy blocks remain effective in every mode. A client’s tool confirmation is separate from Plainrouter’s execution controls.

4. Troubleshooting

  • OAuth does not complete: check that the Plainrouter entry has no stale Authorization header, then restart sign-in from Cursor. Review the workspace, account and access on the consent screen again.
  • 401 with a Workspace key: confirm Cursor inherited the key environment variable. A terminal variable does not necessarily reach an already-running desktop app.
  • Invalid config: preserve the outer mcpServers object and existing entries.
  • Tools are unavailable: check that the server and tools are enabled. Remote servers do not support envFile; use ${env:…} interpolation.
Reference: Cursor MCP configuration and environment variables. Choose another client.