Help · Connect
Connect an AI tool (MCP)
Let your own AI tool read what Trailmaker knows about your ads. It can look, it cannot change anything.
What it is
Trailmaker offers a Model Context Protocol (MCP) server. An MCP-capable tool such as Claude, Cursor or your own script can call five tools to read your ad verdicts, your decision queue, your learnings and your margin figures, the same numbers you see in the app.
The server is read-only. It cannot pause an ad, change a budget, record a decision or edit anything in your account or in Meta. No language model runs on our side: every answer is a stored number or verdict.
Each connection reads exactly one workspace: you pick it when you approve the connection. Brands of your other workspaces stay invisible to it, and a brand id from someone else's workspace answers "not found or not accessible", exactly like an id that does not exist.
Endpoint
Streamable HTTP, no session. Use this address in the client:
https://trailmaker.app/api/mcpSigning in
You sign in with OAuth, no token to copy. The first time your AI tool connects, it opens a Trailmaker page in your browser: sign in, choose the workspace the tool may read, and approve. The tool then holds read-only access to that one workspace.
Access is renewed automatically while the connection stays approved. Your normal Trailmaker login token does not work here, on purpose.
To disconnect a tool, open Connected AI tools in Trailmaker (/oauth/connections) and remove it. It loses access immediately.
To keep the service fair, each account may send up to 60 requests per minute. One question in a chat is usually about three requests.
Set it up
Claude Code
claude mcp add --transport http trailmaker https://trailmaker.app/api/mcpAdd the server, then run /mcp in Claude Code and choose Authenticate.
Claude (desktop and web)
Settings, Connectors, Add custom connector. Paste the endpoint address above and sign in when Claude asks.
Cursor
Add this to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for all projects. Cursor opens the Trailmaker sign-in when you first use the server.
{
"mcpServers": {
"trailmaker": {
"url": "https://trailmaker.app/api/mcp"
}
}
}Other clients
Any client that speaks MCP over Streamable HTTP and supports MCP authorization (OAuth 2.1 with discovery) works: give it the endpoint address and it finds the sign-in on its own.
The tools
All five are read-only. Rows per call are capped at 200, and the answer says when it was cut.
- list_brands
- Lists the brands of the workspace this connection may read. Start here to get brand ids.
- Ask: "Which brands do I have in Trailmaker?"
- get_ad_diagnosis
- The verdict per Meta ad of a brand: state, recommended action with reasons, ROAS against break-even ROAS and the data range behind it. Most urgent states first, optionally filtered by state.
- Ask: "Which of my ads are losing money right now?" (get_ad_diagnosis with state LOSING)
- get_decision_queue
- Tests and drafts waiting for a decision, in the buckets of the Decision Queue, for all brands or one.
- Ask: "What is waiting for my decision?"
- get_learnings
- The active learnings recorded for a brand (angles, hooks, formats, audience and offer insights), highest confidence first.
- Ask: "What has Trailmaker learned about this brand so far?"
- get_economics
- Price, costs, contribution margin, break-even ROAS, target ROAS and maximum CPA of a brand. Says "not_entered" when the brand has no economics yet.
- Ask: "What is the break-even ROAS of this brand?"
If something does not work
- 401 Unauthorized
- The client is not signed in, or its access expired and could not be renewed (for example because you removed the connection or left the workspace). Reconnect from the client to sign in again.
- 429 Too many requests
- You passed the request limit. Wait the number of seconds in the Retry-After header.
- "Brand not found or not accessible"
- The brand id is wrong, or the brand belongs to another workspace than the one this connection was approved for. Call list_brands to see valid ids.
- Verdicts without money amounts
- On the Free plan the money part of a recommendation (percentage and budgets) is withheld, in the app and here. The verdict itself is shown and marked preview: true.