Connect an AI client
Add the Adrails MCP server to Claude, Claude Code, ChatGPT, Codex or another remote MCP client, step by step, then check the connection.
Every client uses the same server URL, https://adrails.ai/api/mcp, and the same sign-in: the client registers itself, you sign in to Adrails, then choose the workspace and the permissions on the consent screen. What the screen asks is explained in Permissions.
The MCP page in Adrails gives these steps too, with the URL and the commands ready to copy.
Claude
On claude.ai and in the Claude desktop app:
- Open Customize, then Connectors, choose Add, then Add custom connector.
- Name it
Adrailsand pastehttps://adrails.ai/api/mcpas the server URL. Under OAuth client, keep Use Claude's published identity, the recommended option: Adrails reads Claude's client details from the document Anthropic hosts. Register automatically works as well. - Add the connector, then connect it. Adrails opens: sign in, choose the workspace and the permissions, and choose Allow access.
- In a conversation, open the + menu, then Connectors, enable Adrails and ask your first question.
On a Claude Team or Enterprise plan, an owner of your Claude organization adds the connector first, under Organization settings, then Connectors.
When Claude asks you to allow a tool call, that is Claude's own setting. An advertising change still waits on its page in Adrails.
Claude Code
Run, from your project directory:
claude mcp add --transport http adrails https://adrails.ai/api/mcpThen, in Claude Code, run /mcp, select adrails and authenticate. Your browser opens Adrails for the sign-in and the consent screen; return to Claude Code once you have allowed access.
ChatGPT
- Open ChatGPT Plugins, choose the plus button, then Add custom MCP server. Enter
Adrailsandhttps://adrails.ai/api/mcpas the server URL. - Choose OAuth, review the connection notice and create the plugin. Complete the Adrails sign-in when prompted and select your workspace and read permission.
- Find Adrails in your personal plugins and install it.
- Start a new Work chat, type
@and select Adrails. Ask which accounts are available before requesting a performance comparison.
Custom-server access depends on your plan and workspace policy. If the option is unavailable, ask your workspace owner to check access. The OpenAI plugin quickstart documents this path. Adrails requires OAuth; do not select the no-authentication option shown for the public example server in that guide.
The Meta Ads and ChatGPT walkthrough includes a downloadable first-read checklist, an illustrative result and troubleshooting. The Google Ads and Claude walkthrough covers the same checks for Claude. Their worked results use synthetic data, not customer accounts.
Codex
Run:
codex mcp add adrails --url https://adrails.ai/api/mcp
codex mcp login adrails --scopes adrails:read,offline_access,adrails:actions:prepare,adrails:integrations:manage,adrails:workflows:manage,adrails:knowledge:write,adrails:campaigns:writeThe second command asks for every permission, so the consent screen offers them all. Only read access and Stay connected are selected at first: select the others you want, or remove them from --scopes so they are never offered.
Codex may ask you to allow a call that changes something, depending on its approval settings. Then start Codex and ask it to use the Adrails tools.
Another client
A client connects when it supports all of the following:
- Remote MCP over Streamable HTTP. Requests are
POST; there is no event stream. - OAuth with a client metadata document or dynamic client registration. Adrails gives out no client ID: a client either identifies itself with the HTTPS URL of its published metadata document, or registers at the endpoint the discovery document names.
- Authorization code with PKCE, method
S256, and theresourceparameter set tohttps://adrails.ai/api/mcp. - A callback Adrails accepts: an
httpsaddress on a public host; anhttpaddress onlocalhost,127.0.0.1or[::1]for an app on your computer; or a private scheme written as a reverse domain name with no host, such ascom.example.app:/callback. Registration refuses any other callback.
A client that runs in a web page on another site is refused unless Adrails allows that site. Desktop and command-line clients are not concerned.
In such a client, add a remote MCP server named Adrails with the server URL, choose Streamable HTTP and OAuth if it asks, and follow its sign-in link. The endpoints are listed in For client developers.
Check the connection
Ask your assistant:
- Which integrations are connected to my workspace?
- Compare campaign performance this week with last week.
- Prepare a daily budget increase for my best-performing campaign. With Prepare advertising changes, it returns a proposal and its approval link; nothing changes before you approve.
Your client now appears under Your connections on the MCP page in Adrails.
When it does not work
- The client says it needs authentication. The connection was revoked, or it expired without Stay connected. Connect again.
- A write tool is missing. The connection lacks its permission, or your role does not allow what the tool needs. Connect again and select the permission. If the consent screen never offers it, remove Adrails from your client and add it again, so the client asks for permissions afresh.
- The consent screen says the request expired or changed. Start again from your AI client.
- "Another call is running on this connection." The client sent two calls at once. Calls on one connection run one at a time; the second can simply be sent again.
If your connection can read but cannot prepare advertising changes, reconnect and select Prepare advertising changes (adrails:actions:prepare). The default consent selection is read-only. A direct write call on a read-only grant returns a tool result naming the missing permission; every proposed live change still needs browser approval.
MCP server
Connect Claude, ChatGPT or another AI assistant to your Adrails workspace through MCP, with OAuth sign-in and permissions for reads and proposed changes.
MCP tools reference
Explore every Adrails MCP tool, its inputs, read and write permissions, review requirements, rate limits and errors before connecting your AI assistant.