Connect Agent Planners to Claude, Codex, Grok and Muse
Agent Planners connects to Claude, Codex, Grok and Muse through one MCP server, https://www.agentplanners.com/api/mcp, with OAuth sign-in or an API key. It is not listed in any app directory yet, so you add it by hand: each section below gives the exact steps for one agent — Cursor, VS Code, Windsurf, Gemini CLI and ChatGPT included — how it was checked against the vendor's documentation, how to verify the connection and what to do when a step fails.
Before you start
The server URL is the same for every assistant: https://www.agentplanners.com/api/mcp (MCP over Streamable HTTP). Agent Planners is not listed in the Claude, ChatGPT or Codex directories (or any other app directory), so you add it by this URL, by hand, as each section shows. There are two ways to sign in, and both reach the same tools, approvals and audit trail:
- Sign in from the agent (OAuth) — for assistants that support MCP authorization. You add the URL, the assistant opens the Agent Planners sign-in page, you sign in, pick the workspace and choose what it may do. Nothing to copy, nothing to register: the assistant handles the sign-in itself.
- An API key — for agents that only send a fixed header, and for scripts. A workspace admin or editor creates it on API & MCP (New key); a key with platform tools (tools mode) needs a workspace admin and a paid plan. It looks like
ap_live_followed by 32 hexadecimal characters and is sent asAuthorization: Bearer <key>. Keep it in an environment variable (the snippets useAGENTPLANNERS_API_KEY), never in a file you commit — and never paste it into a chat. - Chat assistants or agents with a shell. claude.ai, Claude Desktop and ChatGPT cannot install anything from inside a chat: you add the connector in the app's settings yourself, and they connect with sign-in only — never with a key. Coding agents with a shell (Claude Code, Codex, Cursor's agent, Copilot in VS Code, Windsurf, Gemini CLI) can run the setup commands themselves; they read a key only from an environment variable you set, never ask for it in the chat and never print it.
- Simplest with a coding agent (Claude Code, Codex, Cursor, Windsurf): an API key in an environment variable. Create a key on API & MCP (New key), pick your agent beside it, select Copy setup prompt and paste it to the agent; select Copy key when it asks. The agent saves the key in
AGENTPLANNERS_API_KEYfor your user from the clipboard — never showing it — and registers the server: no browser sign-in, and the key never enters the chat. - Use exactly the www URL. The address without www redirects to it, and strict clients (Codex) refuse a redirect to another origin during the sign-in ("OAuth discovery redirect to non-same-origin URL rejected").
- One connection, one workspace. A sign-in reaches the workspace you pick on the consent page; a key reaches the workspace it was created in. To use several workspaces, add one entry per workspace with a distinct name — see Add another workspace below.
- Writes differ by credential. With OAuth sign-in, each change waits for an admin or editor to approve it by default (an admin can choose Apply ordinary changes at once when connecting). With an API key, ordinary writes apply at once inside the workspace's guardrails by default, unless the key was created with Require approval for this key's write tools. Deletes and other changes a platform marks as a person's decision always wait for a person, and raw writes are queued for one.
- Agent mode or tools mode. Agent mode (any plan) lets the assistant hand Agent Planners a goal and follow the task. Tools mode (a paid plan, granted by a workspace admin) lets it call the platform tools directly — reports, settings, changes. Raw platform API access is ticked by default on the sign-in page. describe_permissions tells the assistant which it has, and whether its calls are recorded in the audit log (the connection's Record tool and API calls switch, on by default).
- Your accounts stay connected in Agent Planners. The assistant never receives a Google, Meta or store credential; it gets results.
- Cloud assistants reach the server over the internet. claude.ai, grok.com, the xAI API and Grok Bot call the server from their own cloud, which is why it is a public https URL. A server on localhost or a private network cannot be added to them.
| Assistant | How it connects | Sign-in | Checked |
|---|---|---|---|
| Claude (claude.ai, Desktop, mobile) | Custom connector — you add it in Claude's settings | Sign-in only (never a key in a chat app) | Verified |
| Claude Code | claude mcp add --transport http | Sign-in (/mcp) or --header from an environment variable | Verified and tested |
| Codex (CLI, IDE extension, Codex app) | codex mcp add --url, or config.toml | Sign-in (codex mcp add starts it) or bearer_token_env_var | Verified and tested |
| Cursor | ~/.cursor/mcp.json | Sign-in, or a header read from ${env:…} | Verified |
| VS Code (GitHub Copilot) | .vscode/mcp.json or the user configuration | Sign-in, or a password prompt VS Code keeps | Verified |
| Windsurf / Devin Desktop | mcp_config.json | Sign-in, or a header read from ${env:…} | Verified |
| Gemini CLI | gemini mcp add --transport http | Sign-in (/mcp auth), or a header you write in yourself | Verified |
| ChatGPT | Plugins → Add custom MCP server | Sign-in only | Not re-checked here |
| Any other MCP client | The URL over Streamable HTTP, or the mcp-remote bridge | Sign-in, or a header from an environment variable | Verified |
| Grok on grok.com | New Connector → Custom | Whatever sign-in the server asks for (OAuth here) | Verified |
| Grok Build | grok mcp add --transport http | OAuth on first use, or --header | Verified |
| Grok through the xAI API | A tools entry of type mcp | An API key in headers (no sign-in flow) | Verified |
| Grok Bot | Plugins only — no field for a server URL | A team admin's route, or the REST API | Partly verified |
| Meta Muse (the app) | No documented MCP setting | The REST API through a custom connector | Partly verified |
| Muse Code | mcp_servers in settings.json | OAuth (muse mcp login) or headers | Verified |
Claude Desktop: the Agent Planners extension (API key, no connector)
Partly verified on 2026-10-15 against the official documentation: github.com/modelcontextprotocol/mcpb. The bundle follows the MCPB 0.3 spec and its bridge was tested against the Agent Planners server; the install inside Claude Desktop is yours to run.
Like Codex, the Claude Desktop app can take Agent Planners as a file plus an API key instead of a custom connector: download https://www.agentplanners.com/downloads/agent-planners.mcpb and install it. Claude Desktop asks for the key in its own settings and keeps it in your system keychain — it never goes into a chat.
- 1Create an API key on Agent Planners → API & MCP (New key) and keep the box open.
- 2Download the Agent Planners extension for Claude Desktop (agent-planners.mcpb).
- 3Open it with Claude Desktop — double-click the file, or drag it into Claude Desktop's Settings → Extensions — and select Install.
- 4When Claude Desktop asks for the Agent Planners API key, paste the key there — in Claude Desktop's settings, never in a chat. Claude Desktop keeps it in your system keychain.
- 5Start a new chat: the Agent Planners tools are on (check Search and tools). Send the check below to see which workspace it reaches.
Claude: claude.ai, Claude Desktop and the mobile apps
Verified on 2026-10-11 against the official documentation: support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp. Claude connects from Anthropic's cloud, and Claude Desktop and the mobile apps use the connectors of the claude.ai account they are signed in to.
These steps are for you, not for Claude: Claude cannot add a connector from inside a chat, and the chat's own tools may not reach agentplanners.com — so pasting setup text into a chat makes Claude tell you to add it yourself. Add it in Claude's settings:
- 1On Pro or Max, open Customize → Connectors, select + Add and choose Add custom connector (direct link: https://claude.ai/customize/connectors). On a Team or Enterprise plan an Owner adds it first under Organization settings → Connectors; each member then connects with their own account. The Free plan allows one custom connector.
- 2Name it Agent Planners — or Agent Planners – <workspace name> if you will add more than one workspace — and enter the server URL https://www.agentplanners.com/api/mcp. Select Continue.
- 3Claude shows the sign-in it detected. Under Authentication choose Sign in now (or Sign in when needed), leave OAuth client on Use Claude's published identity (Recommended) and select Add — the consent page will show Sends you back to Claude.
- 4Connect: the Agent Planners consent page opens. Sign in, pick the workspace, review what Claude may do and select Allow access.
- 5In a new chat, turn it on from + → Connectors and send the check: “Use the Agent Planners connector. Call describe_permissions, then list_accounts, and tell me in a few lines: the workspace (organization name and id) this connection reaches, its scopes, whether its changes apply at once or wait for approval, whether raw API access and call logging are on, and each connected platform with its number of accounts. Change nothing, and do not try to open or test the server's web address yourself — use the connector's tools.”
ChatGPT
Not re-checked on this page — the steps are OpenAI's own (https://developers.openai.com/apps-sdk/deploy/connect-chatgpt, read 2026-10-14), not run by us, and ChatGPT renames its menus from time to time. Like Claude's apps, ChatGPT cannot add a connector from inside a chat and connects with sign-in only — never with a key; your account or workspace policy must allow custom MCP servers.
- 1Open ChatGPT Plugins (https://chatgpt.com/plugins), select + and choose Add custom MCP server.
- 2Name it Agent Planners (or Agent Planners – <workspace name>) with a short description; under Connection choose Public endpoint and enter https://www.agentplanners.com/api/mcp; choose OAuth as its authentication.
- 3Read the risk warning, select I understand and want to continue, then Create as a plugin — ChatGPT lists the tools it found. Install the plugin; when the Agent Planners consent page opens, sign in, pick the workspace and select Allow access.
- 4Start a new conversation, type @, pick Agent Planners and send the check prompt from the Claude section above.
Claude Code
Verified and tested on 2026-10-11 against the official documentation: code.claude.com/docs/en/mcp. Tested with Claude Code 2.1.258: both commands below write the server to the chosen scope and claude mcp list shows its health (claude mcp get prints the Authorization header in full — never run it for a server added with a key).
Claude Code runs these commands itself — paste the Claude Code setup prompt from API & MCP into Claude Code (or Claude Desktop's Code tab), or run them in a terminal. With sign-in, the agent adds the server and opens the sign-in in a new terminal window (it needs an interactive terminal, which Claude Code's own shell tool does not have) — or run /mcp in Claude Code and choose agent-planners: the browser opens the consent page and Claude Code stores and refreshes the tokens. Add --scope user to use it in every project, or --scope project to share it through the repository's .mcp.json — a project server shows as Pending approval until you approve it when Claude Code starts.
With a key, the setup prompt lets Claude Code put it in for you: you click Copy key on API & MCP and the agent runs one command that moves the clipboard into AGENTPLANNERS_API_KEY and adds the server — the key never appears in the chat (or set AGENTPLANNERS_API_KEY yourself first: the command below reads it from the variable). Check the connection with claude mcp list — claude mcp get prints the Authorization header, the key included. In a shared .mcp.json, write the header as Bearer ${AGENTPLANNERS_API_KEY} so the key stays in each person's environment. In Windows PowerShell, write $env:AGENTPLANNERS_API_KEY and put the key command on one line without the backslash.
# Sign in (then /mcp in Claude Code)
claude mcp add --transport http agent-planners https://www.agentplanners.com/api/mcp
# Or with an API key read from the environment variable
claude mcp add --transport http agent-planners https://www.agentplanners.com/api/mcp \
--header "Authorization: Bearer $AGENTPLANNERS_API_KEY"Codex: sign in with OAuth
Verified and tested on 2026-10-11 against the official documentation: developers.openai.com/codex/mcp. Tested with codex-cli 0.128.0 in an empty CODEX_HOME and with the Codex app's bundled codex 0.162.0-alpha (2026-10-13).
The Codex CLI, the Codex IDE extension and the Codex app share one MCP configuration: ~/.codex/config.toml (%USERPROFILE%\.codex\config.toml on Windows). codex mcp add detects that Agent Planners supports sign-in and starts it at once: open the URL it prints, sign in, pick the workspace and select Allow access — keep the terminal open until the browser says you can close it. Do not run codex mcp login right after it — that signs in again and creates a second connection. Then codex mcp list shows the server with Auth OAuth, and /mcp in the Codex terminal UI lists its tools.
Or write the entry yourself — [mcp_servers.agent-planners] with url = "https://www.agentplanners.com/api/mcp" — and run codex mcp login agent-planners. Run codex mcp login later too when the tokens are missing or the connection ended. Newer Codex identifies itself with its published client id, so the consent page names it Codex and there is no registration step.
codex mcp add agent-planners --url https://www.agentplanners.com/api/mcp
# later, only if tokens are missing: codex mcp login agent-plannersCodex: with an API key
Verified and tested on 2026-10-11 against the official documentation: developers.openai.com/codex/mcp. Tested with codex-cli 0.128.0: the add command writes exactly the config.toml entry below, and codex mcp list reports Bearer token.
Codex reads the key from an environment variable (bearer_token_env_var), so the key never sits in a config file — and an entry with bearer_token_env_var uses the key INSTEAD of the sign-in. The variable must be set in the environment Codex itself starts from — the Codex setup prompt on API & MCP lets Codex do it from your clipboard (you click Copy key; the key never enters the chat), then you restart Codex; or on Windows run setx and then restart Codex or open a new terminal; for the Codex app on macOS, run launchctl setenv after the export. If it is not set, the server answers 401 and codex mcp list shows the server as not authenticated (Auth Unknown, or Not logged in). To switch to the sign-in, remove the bearer_token_env_var line and run codex mcp login agent-planners.
# macOS / Linux (add the line to ~/.zshrc or ~/.bashrc to keep it)
export AGENTPLANNERS_API_KEY=ap_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# the Codex app on macOS, after the line above
launchctl setenv AGENTPLANNERS_API_KEY "$AGENTPLANNERS_API_KEY"
# Windows (PowerShell or cmd), then restart Codex or open a new terminal
setx AGENTPLANNERS_API_KEY "ap_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
codex mcp add agent-planners --url https://www.agentplanners.com/api/mcp --bearer-token-env-var AGENTPLANNERS_API_KEY
# …which writes this to ~/.codex/config.toml:
[mcp_servers.agent-planners]
url = "https://www.agentplanners.com/api/mcp"
bearer_token_env_var = "AGENTPLANNERS_API_KEY"Cursor
Verified on 2026-10-11 against the official documentation: cursor.com/docs/mcp.
Add the server to ~/.cursor/mcp.json in your home directory (%USERPROFILE%\.cursor\mcp.json on Windows) — inside "mcpServers" if the file already has one; Cursor's agent can make the change itself. With the url alone, Cursor's MCP settings show agent-planners as needing a login: select it and sign in. With a key, the header below reads it from AGENTPLANNERS_API_KEY (${env:…}), so the key is not in the file; Cursor must be started after the variable is set (on macOS an app started from the Dock does not read ~/.zshrc — use launchctl setenv). A project's .cursor/mcp.json works too; if a key is ever written into one, keep that file out of git.
{
"mcpServers": {
"agent-planners": {
"url": "https://www.agentplanners.com/api/mcp",
"headers": {
"Authorization": "Bearer ${env:AGENTPLANNERS_API_KEY}"
}
}
}
}VS Code (GitHub Copilot)
Verified on 2026-10-12 against the official documentation: code.visualstudio.com/docs/copilot/customization/mcp-servers, code.visualstudio.com/docs/agents/reference/mcp-configuration.
Add the server to .vscode/mcp.json in a project, or run MCP: Open User Configuration from the Command Palette to use it in every workspace (merge into "servers" if the file already has one). Run MCP: List Servers and start agent-planners: VS Code opens the Agent Planners consent page — sign in, pick the workspace and approve — and Copilot Chat in agent mode can use the tools. With a key instead, add an "inputs" entry of type promptString with "password": true and the header Bearer ${input:<id>}: VS Code asks for the key in a password box the first time the server starts and stores it securely, so the file never holds it.
{
"servers": {
"agent-planners": {
"type": "http",
"url": "https://www.agentplanners.com/api/mcp"
}
}
}Windsurf / Devin Desktop
Verified on 2026-10-12 against the official documentation: docs.devin.ai/desktop/cascade/mcp.
Edit mcp_config.json — ~/.config/devin/mcp_config.json on macOS and Linux, %APPDATA%\devin\mcp_config.json on Windows (older Windsurf versions: ~/.codeium/windsurf/mcp_config.json) — and add the server inside "mcpServers". The app supports OAuth for remote servers; with a key, the header below reads it from AGENTPLANNERS_API_KEY (${env:…}), so set the variable and restart the app (on macOS: launchctl setenv AGENTPLANNERS_API_KEY "$AGENTPLANNERS_API_KEY", then reopen it). Leave out "headers" to sign in instead. Then refresh the MCP servers: agent-planners should be listed with its tools.
{
"mcpServers": {
"agent-planners": {
"serverUrl": "https://www.agentplanners.com/api/mcp",
"headers": {
"Authorization": "Bearer ${env:AGENTPLANNERS_API_KEY}"
}
}
}
}Gemini CLI
Verified on 2026-10-12 against the official documentation: geminicli.com/docs/tools/mcp-server/.
Run the command below (or add the same server to ~/.gemini/settings.json under "mcpServers" — Streamable HTTP is "httpUrl"), then /mcp auth agent-planners in Gemini CLI: it opens your browser on the Agent Planners consent page (it needs a local browser). Gemini CLI documents environment variables only in a server's env block, not in headers, so a key would be written into ~/.gemini/settings.json — by you, in your home directory, never in a project's .gemini/settings.json and never in git. Prefer the sign-in.
gemini mcp add --transport http --scope user agent-planners https://www.agentplanners.com/api/mcpOther MCP clients and the mcp-remote bridge
Verified on 2026-10-12 against the official documentation: github.com/geelen/mcp-remote.
Any client that speaks MCP over Streamable HTTP (JSON-RPC over POST) takes the URL https://www.agentplanners.com/api/mcp and signs in by itself: a request without a credential answers 401 with a WWW-Authenticate header naming the server's metadata, and the client opens the consent page with PKCE. A client without sign-in support sends an API key as Authorization: Bearer, read from AGENTPLANNERS_API_KEY or the client's secret store. A client that only starts local (stdio) servers is bridged with mcp-remote (needs Node.js), which runs the same sign-in in your browser on its first start:
{
"mcpServers": {
"agent-planners": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://www.agentplanners.com/api/mcp"
]
}
}
}Grok on grok.com: a custom connector
Verified on 2026-10-11 against the official documentation: docs.x.ai/grok/connectors, docs.x.ai/grok/connector-management, docs.x.ai/grok/connectors/custom-mcp-tunneling. xAI's page says connectors are available to all Grok users and does not name a plan for custom connectors; third-party guides say custom connectors need a paid plan — unverified.
- 1Go to grok.com/connectors, select New Connector, then Custom.
- 2Enter the server URL https://www.agentplanners.com/api/mcp and complete the authentication it asks for: the Agent Planners consent page opens — sign in, pick the workspace and select Allow access.
- 3Grok discovers the tools and offers them in conversations. Ask, for example, “Use Agent Planners: call describe_permissions and list my ad accounts.”
- 4On Grok Business or Enterprise, a team admin first adds it in the xAI console (console.x.ai → the team → Grok Business → Connectors → + Add Connector → Other → the server URL); members then connect their own accounts at grok.com/connectors.
Grok Build: xAI's terminal agent
Verified on 2026-10-11 against the official documentation: docs.x.ai/build/features/mcp-servers. Not tested here: the grok CLI is not installed on our test machine.
grok mcp add writes the server to ~/.grok/config.toml (or .grok/config.toml with --scope project). An OAuth server opens a browser sign-in on first use; grok mcp doctor agent-planners checks the configuration and the connection. Grok Build also reads servers from ~/.claude.json, .cursor/mcp.json and a project .mcp.json, so a server you already added for Claude Code or Cursor may already be there — grok inspect shows where each one came from.
# Sign in with OAuth on first use
grok mcp add --transport http agent-planners https://www.agentplanners.com/api/mcp
# Or with an API key (Grok expands ${VAR} in headers)
grok mcp add --transport http agent-planners https://www.agentplanners.com/api/mcp --header "Authorization: Bearer ${AGENTPLANNERS_API_KEY}"Grok through the xAI API: Remote MCP Tools
Verified on 2026-10-11 against the official documentation: docs.x.ai/developers/tools/remote-mcp. Not tested end to end here (it needs an xAI API key).
For your own app on the xAI Responses API (https://api.x.ai/v1/responses, the OpenAI-compatible endpoint, or xAI's SDK): add Agent Planners as a tool of type mcp with server_url and server_label. xAI's servers call it, over Streamable HTTP or SSE only. There is no sign-in flow here, so send an Agent Planners API key — in headers as below, read from your own secret store (xAI also accepts an authorization field, a token for the Authorization header; headers says the Bearer prefix explicitly). In xAI's SDK the fields are allowed_tool_names and extra_headers.
xAI does not support require_approval: the model calls the tools without asking. Use a key that can only read, or a key whose writes wait for approval in Agent Planners (a write then answers with a requestId and changes nothing until a person approves it). allowed_tools limits what is offered, but with on-demand listing the platform tools sit behind search_tools / call_tool — narrow the key's platforms and scopes in Agent Planners instead.
POST https://api.x.ai/v1/responses
Authorization: Bearer $XAI_API_KEY
Content-Type: application/json
{
"model": "grok-4.7",
"input": [
{
"role": "user",
"content": "Call describe_permissions, then list my connected ad accounts."
}
],
"tools": [
{
"type": "mcp",
"server_url": "https://www.agentplanners.com/api/mcp",
"server_label": "agent-planners",
"server_description": "Agent Planners: this workspace's ad, analytics and store accounts",
"headers": {
"Authorization": "Bearer ap_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
]
}Grok Bot: xAI's agent on your Cursor account
Partly verified on 2026-10-11 against the official documentation: docs.x.ai/grok-bot/computer-and-apps, docs.x.ai/grok-bot/teams-and-enterprises, cursor.com/help/grok-bot/connect-plugins, cursor.com/docs/mcp, cursor.com/help/grok-bot/secrets. Grok Bot adds services as plugins from its Plugins (Connect apps) marketplace; its documentation shows no field where a person pastes an MCP server URL.
- On a Cursor team (documented by Cursor and xAI; not tested with Grok Bot): a Cursor team admin adds Agent Planners as a Team MCP server under Cursor's Dashboard → Plugins & MCPs (server URL above) and, under Team MCP Servers, selects Add to Team Marketplace. xAI's docs say Grok Bot inherits the team's Cursor connector policy and shows connectors as plugins; a member then adds it from Plugins and selects Authorize to sign in. An Enterprise MCP allowlist must include the URL, or the plugin shows Disabled by team admin.
- Asking the bot in chat to add the server: third-party guides say Grok Bot can register an MCP server that way — unverified; xAI's documentation does not describe it.
- The REST API (works without a plugin): Grok Bot has its own computer with a shell. Save an Agent Planners API key on the Bot under Secrets (Add secret, with an environment variable name such as AGENTPLANNERS_API_KEY) — never paste it into chat — and ask the Bot to call https://www.agentplanners.com/api/v1: GET /me first, then GET /tools?q= to find a tool and POST /tools/{name} to run it. The REST API guide lists every endpoint; writes wait for a person unless the key applies them at once.
Meta Muse: the app
Partly verified on 2026-10-11 against the official documentation: www.meta.com/help/artificial-intelligence/1687253048996149/. Meta's help center describes custom connectors you build by asking Muse in chat (it may retrieve the service's API information and keeps keys in its Secure Credentials Store) and does not mention MCP. Meta does not review custom connectors.
- The documented route: ask Muse to create a custom connector for Agent Planners' REST API — base URL https://www.agentplanners.com/api/v1, OpenAPI description https://www.agentplanners.com/api/v1/openapi.json, an Agent Planners API key sent as Authorization: Bearer and kept in Muse's credentials store, never typed into the chat. Not tested with Muse. A read-only key, or one whose writes wait for approval, is the safe start.
- Adding the MCP server by URL: some third-party guides say Settings → Connectors → Add custom connector takes an MCP server URL, or that Muse adds one when you describe it in chat; another says the app has no custom MCP setting. Meta's documentation confirms none of these — unverified. If your app shows such a field, the server URL and the OAuth sign-in above are what it needs.
- For MCP today, use Muse Code (next section): Meta documents remote MCP servers with OAuth sign-in there.
Muse Code: Meta's terminal coding agent
Verified on 2026-10-11 against the official documentation: dev.meta.ai/docs/muse-code/extending, dev.meta.ai/docs/muse-code/configuration. Not tested here: Muse Code is not installed on our test machine.
Add the server to the mcp_servers block of ~/.config/muse/settings.json — keep the keys already in the file; the file must contain "schema_version": 1 or every command fails. Servers load when a session starts, so start a new one. Then sign in with muse mcp login agent-planners (OAuth 2.1; Muse Code keeps and refreshes the tokens, and a 401 tells you the command to run). /mcp in a session lists the connected servers and their tools.
With an API key instead, add "headers": { "Authorization": "Bearer ${AGENTPLANNERS_API_KEY}" } to the entry — Muse Code expands ${VAR}. "mode": "optional" lets Muse Code start with a warning when the server cannot be reached; without it a server is required and the run stops. MCP tools run outside Muse Code's sandbox, and Agent Planners' approvals still hold its writes.
{
"schema_version": 1,
"mcp_servers": {
"agent-planners": {
"transport": "streamable_http",
"url": "https://www.agentplanners.com/api/mcp",
"mode": "optional"
}
}
}Verify the connection
Once the server is added — in a new session or chat with the connector turned on — check four things before you rely on it:
- 1Authentication: call describe_permissions. It answers with the connection's mode, scopes and organization; an error asking you to sign in means the sign-in (or the key) did not take.
- 2The workspace and its platforms: describe_permissions names the organization (name and id) and the connected platforms; list_accounts lists the accounts (platform, name, accountId) — the accountIds the tools take.
- 3The permissions: the scopes; whether writes apply at once inside the guardrails or wait for a person; raw API access (rawApi); and whether the connection's calls are recorded in the audit log.
- 4The tools: when the list is loaded on demand, search_tools finds a tool by what you want to do and describe_tool returns its arguments; with 100 platform tools or fewer the family__tool tools are listed directly. An agent-mode connection has list_accounts, create_task and get_task instead.
How the assistant finds and calls the tools
- describe_permissions first. It says the connection's workspace, mode (agent or tools), scopes, platforms, how writes are handled, whether raw API access and call logging are on, and how tools are listed.
- Agent mode: list_accounts, create_task with a concrete goal, then get_task until the task completes. The task's changes wait for approval in Agent Planners unless the task was started with autoApprove — which create_task accepts only when this connection's changes may apply at once (an API key not set to require approval, or a sign-in connection whose admin chose to apply ordinary changes at once); otherwise it refuses with the reason.
- Tools mode, up to 100 platform tools: the assistant sees every platform tool it may call, named family__tool (for example google_ads__get_account_health).
- Tools mode, more than 100 platform tools (or 64 KB of descriptions): the list is loaded on demand — search_tools finds a tool by what you want to do, describe_tool returns its arguments and whether this connection may call it, and call_tool runs it. Every tool stays callable directly by name. This keeps a fully connected workspace's roughly a thousand tools out of the assistant's context and inside tool-count limits.
- The connection's platforms: a key or connection can expose every connected platform (including ones connected later) or only the ones ticked. A platform left out is the key's choice — its tools answer that they are not exposed, not that nothing is connected.
- Writes: a sign-in connection's writes wait on API & MCP → Write approvals by default (an admin may have chosen to apply ordinary changes at once); an API key's ordinary writes apply at once inside the workspace's guardrails by default, unless the key requires approval. describe_permissions says which. A waiting write returns a requestId; raw_request_status tells the assistant the decision. An unanswered request expires after 24 hours, and at most 50 writes can wait per workspace. Deletes and other changes a platform marks as a person's decision always wait for a person.
- Retries: pass an idempotencyKey with every write. The same key with the same arguments within 24 hours returns the first answer (a queued write: the same requestId) instead of writing twice; a write that failed runs again; other arguments are a new write. Wait for the first answer before retrying. One exception: the raw tools (<family>__raw_request) do not list idempotencyKey in their MCP input schema, so pass it there only if your client allows an extra argument (a strict client refuses one); over REST the Idempotency-Key header always works.
- Raw API requests: with tools:raw (ticked by default on the sign-in page), <family>__raw_request (for example meta_ads__raw_request) calls a platform's own API through the workspace's connected account — the platform token is injected by Agent Planners and never returned. Call describe_raw_api first for the hosts, paths and rules, then send { accountId, method, host?, path, query?, body? } — for example GET act_<ad account id>/campaigns with query fields=id,name,status. Reads run at once; a raw write waits for a person unless an admin pre-authorized the API key (Execute raw writes immediately) — over a sign-in connection it always waits — and a permanent delete or archive always waits.
- Credits: every call that runs is billed in the workspace's credits; a result may end with a “Low credits” line the assistant should pass on.
Add another workspace
Each connection reaches exactly one workspace. To work in several, add one entry per workspace — the same URL, a distinct name — and sign each one in to its own workspace on the consent page. Then ask the assistant to call describe_permissions on each server to learn which workspace it reaches, and to name the workspace in every answer that spans workspaces.
- Codex (verified 2026-10-13: two entries with the same URL, each signed in to its own workspace, both show Auth OAuth, and describe_permissions names a different workspace on each): [mcp_servers.agent-planners] and [mcp_servers.agent-planners-acme] with the same url; sign the second one in with codex mcp login agent-planners-acme and pick that workspace. With keys: bearer_token_env_var = "AGENTPLANNERS_API_KEY_ACME" in the second entry.
- Claude Code: claude mcp add --transport http agent-planners-acme https://www.agentplanners.com/api/mcp, then /mcp → agent-planners-acme → sign in and pick the workspace. Not yet verified by us with two workspaces.
- claude.ai / Claude Desktop and ChatGPT: add one more custom connector per workspace with a distinct name (Agent Planners – Acme) and the same URL, then pick that workspace when you connect it. Not yet verified by us with two workspaces.
- Cursor, VS Code, Windsurf, Gemini CLI: a second entry under "mcpServers" (VS Code: "servers") named agent-planners-acme with the same URL, signed in separately.
- API keys: one key per workspace (create it on API & MCP with that workspace selected), each in its own environment variable — AGENTPLANNERS_API_KEY_ACME, AGENTPLANNERS_API_KEY_FIVESTONES … — referenced by that workspace's entry.
Connection test
Run these in a terminal (bash or zsh; Git Bash on Windows, or curl.exe in PowerShell). Each step names the answer that proves it — a chat assistant cannot run them, so for claude.ai or ChatGPT use the check prompt instead.
- 1The server answers and asks for a sign-in (command 1 below). Expected: HTTP 401 and a WWW-Authenticate header with resource_metadata="https://www.agentplanners.com/.well-known/oauth-protected-resource/api/mcp" — the start of the sign-in, not an error.
- 2The sign-in metadata names this server: curl -s https://www.agentplanners.com/.well-known/oauth-protected-resource/api/mcp. Expected: "resource":"https://www.agentplanners.com/api/mcp".
- 3With an API key: the variable is set (the check prints only set or missing, never the value), and describe_permissions answers with your workspace — both commands below. A 401 means the variable is empty where you ran it, or the key was revoked.
- 4The client lists the server: codex mcp list → agent-planners with Auth OAuth (Bearer token with a key); /mcp in Claude Code shows it connected; Cursor, VS Code, Windsurf and Gemini CLI show it in their MCP list.
- 5In a new session: describe_permissions names your workspace, list_accounts lists its accounts, and one read (google_ads__get_account_health with an accountId) answers a verdict — nothing changes.
# 1) No credential: 401 + WWW-Authenticate (the sign-in starts here)
curl -si -X POST https://www.agentplanners.com/api/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
# 2) The protected-resource metadata
curl -s https://www.agentplanners.com/.well-known/oauth-protected-resource/api/mcp
# 3) With an API key in the environment variable (never typed into a command)
# bash / zsh — prints only whether it is set, never the value
[ -n "$AGENTPLANNERS_API_KEY" ] && echo "AGENTPLANNERS_API_KEY is set" || echo "AGENTPLANNERS_API_KEY is missing"
# Windows PowerShell
if ($env:AGENTPLANNERS_API_KEY) { "AGENTPLANNERS_API_KEY is set" } else { "AGENTPLANNERS_API_KEY is missing" }
curl -s -X POST https://www.agentplanners.com/api/mcp \
-H "Authorization: Bearer $AGENTPLANNERS_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"describe_permissions","arguments":{}}}'A first prompt to paste
Paste this into the assistant once the server is connected (it is the same prompt the API & MCP page copies for a sign-in connection):
You are connected to Agent Planners over MCP. It holds my workspace's ad, analytics and store connections and runs every call under the workspace's permissions, guardrails and audit trail.
How to work with it:
1. Call describe_permissions first and tell me in two lines what this connection may do: the workspace (organization name and id), mode, scopes, platforms, how writes are handled, and whether raw API access and call logging are on.
2. If describe_permissions shows no platform tools (agent mode), work through list_accounts, create_task with a concrete goal, and get_task (poll it until the task is completed) instead.
3. Never guess a tool name: when search_tools is available, call it with what you want to do; otherwise pick from the family__tool tools you were given. describe_tool shows a tool's arguments and whether this connection may call it.
4. Call list_accounts and pass the accountId of the account I mean. If more than one account could match, ask me which.
5. Read before you write: check the current state first, then show me the exact change (account, object, current value → new value) and wait for my yes before you call any write tool.
6. Over a sign-in connection a write waits for an admin or editor to approve it in Agent Planners by default, unless an admin chose to apply ordinary changes at once when connecting — describe_permissions says which. A permanent delete or another change a person must decide always waits. A write that waits says it is queued and gives a requestId: tell me, and check raw_request_status with it before you call the change done.
7. Pass an idempotencyKey that names the change with every write, and reuse it if you retry: the same key with the same arguments returns the first answer (a queued write: the same requestId) instead of writing twice. Wait for the first answer before retrying. (The raw tools do not list idempotencyKey in their schema: pass it there only if your client accepts an extra argument.)
8. If describe_permissions shows raw API access (on by default for a sign-in), these rules apply to it:
9. Raw API access (<family>__raw_request) calls a platform in ITS OWN request format when no tool fits: call describe_raw_api first for the family's hosts, documentation and account-binding rule.
10. Every raw path must name the connected account from list_accounts (or one object of it); credentials are injected — never put a token, a secret or another account's id in a path, query or body.
11. On the raw lane fields, units and paging are the platform's own: money is the platform's unit (Google Ads micros, Meta minor units, Reddit / Pinterest / Snapchat micro-currency, LinkedIn major units), not the typed tools' conversion.
12. Raw creates are paused by default on Meta, TikTok, Reddit, Pinterest, Snapchat and LinkedIn; on Google Ads, Microsoft, DV360, CM360 and Search Ads 360 send a paused status yourself. Set a live status only when I asked for it. Upload personal data and send conversions with the typed tools (they hash and validate); on Reddit, Pinterest, Snapchat and LinkedIn those and lead forms are not reachable raw.
13. HubSpot, Shopify, SHOPLINE, Stripe, Klaviyo, X Ads, Spotify Ads and BigQuery have no raw lane: their gateway tools take the platform's own request shape (search_tools "<platform> raw api").
14. Over a sign-in connection a raw write always waits for a person.
15. The full guide: https://www.agentplanners.com/docs/platform-api.
16. Never ask me for an API key or a token in this chat, and never print, log or echo one. Do not try to open or fetch the server's web address yourself — use the Agent Planners tools.
17. If you have more than one Agent Planners server (one per workspace), call describe_permissions on each to learn which workspace it reaches, say which workspace every answer is about, and never mix accounts between them.
18. Every call spends this workspace's credits. If a result ends with a "Low credits" line, pass it on to me.
Start with one of these:
- Which of my campaigns spent the most in the last 7 days, and what did each pay per conversion?
- Check every connected ad account's health: suspensions, disapproved ads, verification requests and billing holds.
- Find Google Ads search terms that spent money with no conversions in the last 30 days and list the negatives you would add — don't add them yet.When a change waits for approval
Three settings decide it, and they stack. An action that can't be undone waits for a person until an admin says otherwise, even when "Require approval" is off.
- Require approval for this key's write tools, off (the default): ordinary changes apply at once, inside your guardrails and spend cap.
- The same box, on: ordinary changes join the approval queue too, for an admin or editor to decide.
- Changes that can't be undone (a delete, a public upload or post, code for your site, an activation) wait for a person on every key, with an email. The call answers with reviewUrl, the link to decide it on, and raw_request_status reports the outcome. A public YouTube upload works this way, and so does making a video public later.
- To skip that too: an admin sets the key's "Changes that can't be undone" to "apply without asking" on API & MCP. API keys only, off by default. An agent holding that key can then delete and publish with no person checking, so treat it like your own login; changes past a guardrail still wait. A sign-in connection (Claude, ChatGPT, Codex) always asks, unless it is your workspace's own app.
- A change past a guardrail (a budget raise over the cap, a change to a protected campaign) waits for a person too, on every key, instead of being refused. Approving it applies it.
- Still refused on every setting: anything no route applies (moving money through Stripe, for example), Forbidden Rules, the monthly spend cap, and a call with bad arguments.
Share skills and memory with your team
Skills and memory belong to the workspace, not to one person's computer. Once connected, anyone's agent can read what a teammate sent, and a person can send their own skills up in one step.
- Send your skills up: ask your agent to run internal__sync_skills with your SKILL.md files (up to 50 in one call). dryRun:true shows what would change first. Each skill answers created, updated, unchanged, conflict or refused.
- A teammate's edit is never overwritten by accident. A skill someone else changed comes back as a conflict. Read it, merge, and send it again with its contentHash as baseHash, or pass overwrite:true to replace it.
- Read them: internal__list_skills and internal__get_skill work from any connection. Hosts that support MCP prompts also offer the workspace's own enabled skills as prompts, for example /mcp__agent-planners__<skill> in Claude Code.
- What you send reaches every plan. An enabled skill is read by the agent on later tasks in this workspace, so text that tells it to skip approvals or override its rules is refused. On a connection that waits for approval, the sync waits for an admin or editor like any other change.
- Memory: internal__search_memory, internal__save_memory, internal__update_memory and internal__delete_memory read and edit what the workspace remembers. A key narrowed to some platforms only sees and changes memory about those platforms.
- Sharing with other workspaces stays a person's choice on the Skills page. An agent or a key cannot publish a skill outside this workspace.
Troubleshooting
| What you see | What it means | What to do |
|---|---|---|
| A chat assistant says it cannot connect the server, or cannot reach agentplanners.com | claude.ai, Claude Desktop and ChatGPT cannot add a connector from inside a chat, and their sandbox may not reach the site. | Add the connector yourself in the app's settings (the Claude or ChatGPT section above) and turn it on in the chat. Do not ask the assistant to test the URL. |
| An API key was pasted into a chat or committed to a repository | Anyone who reads that chat or repository can use it. | Revoke it on API & MCP (Revoke) and create a new one; keep the new one in an environment variable. |
| 401 with a WWW-Authenticate header (error="invalid_token" when a credential was sent) | No credential, or the token or key is invalid, expired or revoked. Without any credential this is how the sign-in starts. | Sign in again (/mcp in Claude Code, codex mcp login agent-planners, muse mcp login, or reconnect the connector). With a key: check that AGENTPLANNERS_API_KEY is set in the environment the client starts from and that the header reads Authorization: Bearer <key>. |
| 401 with code "wrong_resource" on the REST API | An OAuth token issued for the MCP server (no resource, or resource=https://www.agentplanners.com/api/mcp) was sent to /api/v1. | Authorize again with resource=https://www.agentplanners.com/api/v1, or the origin for both surfaces — a refresh cannot change it. |
| 401 with the wrong_resource hint on the MCP server | A token issued for the REST API (resource=https://www.agentplanners.com/api/v1) was sent to /api/mcp. The hint is in WWW-Authenticate and in the JSON-RPC error's data (code wrong_resource, resource, tokenResource). | Sign in again for the MCP server (resource=https://www.agentplanners.com/api/mcp, or the origin for both surfaces). |
| Codex: “Protected resource metadata missing required resource field” | An Agent Planners server older than 2026-10-13 (fixed since), or a URL that is not the MCP endpoint. | Use exactly https://www.agentplanners.com/api/mcp. |
| Codex: “OAuth discovery redirect to non-same-origin URL rejected” | The URL without www: it redirects, and Codex refuses a redirect to another origin. | Use https://www.agentplanners.com/api/mcp. |
| The browser shows “127.0.0.1 refused to connect” after you approve (Codex) | The codex mcp login (or codex mcp add) process was closed before you approved. | Run codex mcp login agent-planners again and approve while it waits. |
| Codex: codex mcp login ends with “deadline has elapsed” | It waits only a few minutes for the approval in the browser. | Run codex mcp login agent-planners again and approve promptly. |
Codex: codex mcp list fails with “unknown variant priority, expected fast or flex” | An older Codex CLI is reading a config.toml the Codex app wrote. | Update the Codex CLI. |
| Codex: Auth Unknown or Not logged in on an entry with bearer_token_env_var | AGENTPLANNERS_API_KEY is not set in the environment Codex starts from, so the server answers 401. | Windows: setx, then restart Codex or open a new terminal. macOS app: launchctl setenv. Or switch to the sign-in: remove bearer_token_env_var and run codex mcp login agent-planners. |
| Codex: codex exec in a script waits with “Reading additional input from stdin” | codex exec reads more input from stdin while it is open. | Close stdin: codex exec … < /dev/null. |
| “missing the required scope” (MCP) or 403 insufficient_scope (REST) | The connection was not granted that permission. | Connect again and allow it, or use a key with that scope. Platform tools need a workspace admin and a paid plan. |
| A platform's tools are missing, or a call says the platform is not exposed | The key or connection exposes only some platforms — or this is another workspace than you meant. | Check the workspace with describe_permissions; change the key's platforms on API & MCP, or connect again and choose the platforms. A narrowed key picks up a later-connected platform only if it was ticked. |
| Error (402) with the credits the call needs | The workspace is out of credits. | An admin tops up on Billing; the call can then be retried. |
| 429 with Retry-After | Too many requests from this connection (60 per 60 s), too many tool calls from the workspace (120 per 60 s), or 50 writes already waiting for approval in the workspace. | Wait the number of seconds Retry-After says, then retry with the same idempotencyKey. |
| 429 “Too many failed authentication attempts” | 20 failed sign-ins from one address within 5 minutes — an authentication failure, not a rate limit (only unknown or malformed keys and tokens count — an expired, withdrawn or other-surface token Agent Planners issued answers 401 invalid_token and is not counted). | Fix the key or token (sign in again), then wait before retrying. |
| 503 with Retry-After | Something the call depends on — the database, the workspace's plan or the connection's policy — could not be read right now; the call is refused rather than half-run (while the database is unreachable, REST answers code "database-unavailable", retryable: true). | Retry after the seconds Retry-After says. |
| A write answered with a requestId instead of a result | It waits for a person in Agent Planners. | Approve it on API & MCP → Write approvals; raw_request_status reports the decision. An unanswered request expires after 24 hours. |
| create_task refuses autoApprove (“Error (403): …”) | This connection's changes may not apply at once: an API key set to require approval, or a sign-in connection that waits for approval. No task was created. | Start the task without autoApprove; its changes then wait for approval on the task page. |
| create_task answers “Error (409): …” | The idempotencyKey was already used by this connection for a task with another goal. | Use a new idempotencyKey for a new goal; the same key and goal return the task already started. |
| The assistant cannot reach the server | Cloud assistants need a public https URL, and the transport must be Streamable HTTP. | Use exactly https://www.agentplanners.com/api/mcp. Choose the http / streamable_http transport, never a local command. A request without a credential answers 401 with WWW-Authenticate (that is the sign-in starting); with a credential, a GET asking for an event stream answers 405 — there is no server-sent-events stream. The server speaks MCP protocol versions 2025-06-18, 2025-03-26 and 2024-11-05 (another requested version is answered with 2025-06-18), and answers CORS, so a browser-based host works after the sign-in. |
| The server is missing after you added it | Clients load MCP servers when a session starts; some skip a misspelt entry without an error. | Start a new session and check the entry's name (agent-planners, or agent-planners-<workspace>). |
| The assistant has too many tools | Some hosts cap the tools they load (third-party guides cite 128 for Grok's API — unverified). | Leave the key's tool listing on auto (on demand above 100 platform tools) and narrow its platforms. |
| Claude Code shows Pending approval | A project-scoped server waits for you to approve it. | Start claude in that project and approve agent-planners. |
Frequently asked questions
- Do I need an API key to connect Claude, Codex, Grok or Muse Code?
- No, when the assistant supports MCP sign-in: claude.ai, Claude Code, Codex, Cursor, VS Code, Gemini CLI, grok.com, Grok Build and Muse Code open the Agent Planners consent page and you approve the connection there. Chat apps (claude.ai, Claude Desktop, ChatGPT) never take a key. The xAI API has no sign-in flow, so it needs a key, and so does a script — kept in an environment variable, never pasted into a chat.
- Is Agent Planners listed in the Claude, ChatGPT or Codex app directory?
- Not yet. You add it by hand: its URL, https://www.agentplanners.com/api/mcp, as a custom connector (claude.ai, ChatGPT) or an MCP server entry (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI), as each section above shows.
- Claude says "This app is not recognised … Unsupported grant_types: urn:ietf:params:oauth:grant-type:jwt-bearer". What now?
- That was Agent Planners refusing Claude's own app description, which also lists a sign-in method Agent Planners does not use; it is fixed (14 October 2026). Remove the connector in Claude and add it again with the same URL, keeping OAuth client on Use Claude's published identity. With a coding agent you can skip the sign-in entirely: use an API key in an environment variable (see Before you start).
- Which URL do I add?
- https://www.agentplanners.com/api/mcp — the same for every assistant and every workspace, always with www (the address without www redirects, and strict clients refuse that). You choose the workspace on the consent page, or by which workspace the API key belongs to.
- Can I connect more than one workspace?
- Yes: one connection per workspace. Add a second entry with a distinct name (agent-planners-acme) and the same URL, and sign it in to the other workspace — verified with Codex; for Claude and ChatGPT add one connector per workspace with a distinct name (not yet verified by us). describe_permissions tells the assistant which workspace each server reaches.
- Can Grok Bot or the Muse app use Agent Planners?
- Neither documents a field for an MCP server URL today. Grok Bot can get it from a Cursor team admin's Team MCP server, or call the REST API with a key saved as a Bot secret; the Muse app can call the REST API through a custom connector you ask Muse to build. Muse Code supports the MCP server directly.
- Will the assistant change my campaigns without asking?
- It depends on how it connected. Signed in with OAuth, by default each change waits for an admin or editor on API & MCP → Write approvals, unless a workspace admin chose Apply ordinary changes at once when connecting. With an API key, ordinary writes apply at once inside the workspace's guardrails by default, unless the key was created with Require approval for this key's write tools (a key without tools:write cannot write at all). Either way deletes and other person-class changes always wait for a person, raw writes are queued for one, and the guardrails apply.