1. Add Plainrouter to Cursor
Add this server to your user-level~/.cursor/mcp.json, merging it with any existing mcpServers entries:
.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’sAuthorization 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, calllist_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:
mcpServers, not a replacement for the whole file.
3. Verify the connection
Start with this read-only request:4. Troubleshooting
- OAuth does not complete: check that the Plainrouter entry has no stale
Authorizationheader, 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
mcpServersobject and existing entries. - Tools are unavailable: check that the server and tools are enabled. Remote servers do not support
envFile; use${env:…}interpolation.