Skip to main content
Use n8n’s MCP Client Tool with an AI Agent. You need an n8n workflow, an AI Agent and a configured chat model. This connects n8n to Plainrouter; the MCP Server Trigger serves the opposite direction. You need a Plainrouter account and access to the intended workspace. The unauthenticated sandbox is retired; start with a Read key and verify the workspace result.

1. Create a workspace key

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.

2. Add Plainrouter to the client

Attach an MCP Client Tool to the AI Agent and configure it: Name the production node plainrouter, attach it to the AI Agent, and keep credentials in n8n’s credential store. Add other tools only as needed.

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.

Send conversions from a workflow

Conversion sending uses a separate HTTP request to POST https://plainrouter.com/api/v1/events, authenticated with a Server secret, not an MCP Workspace key. Map the Conversion API body from a real eligible website event. Preserve its event ID and original time on retries, and supply the required consent and visitor context. Start with the automation setup. An MCP read does not verify event delivery or attribution. Verify HTTP event acceptance and Meta delivery separately from the MCP connection.

4. Troubleshooting

  • Only an SSE Endpoint field appears: that is the older node shape. Use a current MCP Client Tool with HTTP Streamable support.
  • 401 on calls: use the raw Workspace key in Bearer Auth; do not double-prefix it or use a Server secret.
  • Agent never calls the tool: check the tool connection and selected-tool list, then inspect the workflow execution rather than trusting the chat summary.
References: n8n MCP Client Tool and current node configuration. Choose another client.