AI assistants (MCP)
Ask your AI assistant how your tracking is doing, what failed and what to fix. Pixelary's MCP server gives it read access to your sites and, if you allow it, lets it change triggers after you see a preview.
Set it up
- In the dashboard, open Account → AI assistants and press Create token. Name it after the assistant or computer it is for, and choose Read only or Can edit triggers. Read only is the default.
- Copy the token. It starts with
pxk_and is shown once. - Add the server to your client, as below. The address is
https://api.pixelary.app/mcp. - Ask: “List my Pixelary sites.”
Claude Code
claude mcp add --transport http pixelary https://api.pixelary.app/mcp \
--header "Authorization: Bearer pxk_your_token"
Run /mcp in Claude Code to check the connection. To share the setup with a project without sharing the
token, put this in .mcp.json and set PIXELARY_TOKEN in your shell:
{
"mcpServers": {
"pixelary": {
"type": "http",
"url": "https://api.pixelary.app/mcp",
"headers": { "Authorization": "Bearer ${PIXELARY_TOKEN}" }
}
}
} Cursor
Put this in ~/.cursor/mcp.json, or in .cursor/mcp.json for one project, and set PIXELARY_TOKEN in your environment:
{
"mcpServers": {
"pixelary": {
"url": "https://api.pixelary.app/mcp",
"headers": { "Authorization": "Bearer ${env:PIXELARY_TOKEN}" }
}
}
} VS Code
Put this in .vscode/mcp.json. VS Code asks for the token once and hides what you type:
{
"inputs": [
{ "type": "promptString", "id": "pixelary-token", "description": "Pixelary token", "password": true }
],
"servers": {
"pixelary": {
"type": "http",
"url": "https://api.pixelary.app/mcp",
"headers": { "Authorization": "Bearer ${input:pixelary-token}" }
}
}
} Windsurf
Put this in mcp_config.json (~/.config/devin/mcp_config.json on macOS and Linux) and set PIXELARY_TOKEN in your environment:
{
"mcpServers": {
"pixelary": {
"serverUrl": "https://api.pixelary.app/mcp",
"headers": { "Authorization": "Bearer ${env:PIXELARY_TOKEN}" }
}
}
} Claude apps and other clients
Connectors in the Claude apps (web, desktop, mobile) sign in with OAuth. Anthropic also has a Request headers
option for adding a custom connector with a fixed token, in beta for some organizations. If you see it, enter
Authorization and Bearer pxk_your_token. In a Team or Enterprise organization, everyone who
uses that connector shares the credential and acts as you, so use a read-only token there, or wait for OAuth.
Any other client that speaks Streamable HTTP and lets you set an Authorization header should work. We
have listed only the clients whose setup we checked in their own docs.
Tools
Every tool works on the sites you can open in the dashboard, with the role you have there.
| Tool | What it does |
|---|---|
| list_sites | Your own sites and the ones shared with you, with your role on each. |
| site_overview | The numbers the dashboard shows for 1, 7, 30 or 90 days: events, server-side deliveries, failures, recovered conversions, by platform, pixel and event. |
| recent_events | The event log, newest first, filtered by status and event name. Up to 50 at a time. |
| list_pixels | Platform, pixel ID, mode, whether it is on, and whether server-side delivery is set up. Never a token, not even part of one. |
| list_triggers | What each trigger fires on, what it sends and where. |
| audit_tracking | Checks a site and explains what to fix: no events in 24 hours, script not seen on a domain, duplicate install, old script version, delivery errors per pixel, low Meta match quality, no consent banner found, conversions missing a value, a Purchase trigger with no value. |
| create_trigger | Can edit triggers tokens only. Adds a trigger, after a preview. |
| update_trigger | Can edit triggers tokens only. Changes a trigger, after a preview. |
| set_trigger_enabled | Can edit triggers tokens only. Switches a trigger on or off, after a preview. |
Clients that show prompts also get audit_my_tracking and weekly_report, two ready-made requests.
No tool can reach access tokens, billing, the team, domains, consent settings or data export, delete anything, or show other people’s email addresses. Those stay in the dashboard.
What to ask
- “Audit the tracking on brightside.studio and tell me what to fix first.”
- “How many purchases did we send to Meta this week, compared with last week?”
- “Which events failed in the last day, and what did the platform say?”
- “Is any pixel still in test mode?”
- “Add a Lead trigger for the contact form on /contact.”
- “Switch off the Newsletter trigger.”
How changes work
A write tool works in two steps, on purpose. The first call checks the change with the same rules as the dashboard, changes nothing and returns a preview:
{
"status": "preview",
"applied": false,
"preview": "Create a form trigger on Brightside: sends Lead to every pixel when {\"selector\":\"form#contact\"} matches. It starts switched on, with no republish needed.",
"confirm_id": "pxc_…",
"expires_at": "2026-11-02T10:10:00.000Z",
"next_step": "Nothing has changed yet. Show this preview to the user…"
}
The assistant shows you the preview. Only after you agree does it call the tool again, with the same arguments plus
confirm_id. The change is saved at once and reaches your site without a republish.
A confirm_id works once, for 10 minutes, with the token that asked for it, on that site and for exactly
that change. A different payload, or a trigger that changed since the preview, is refused and nothing changes.
The change shows on the Triggers screen like any other.
Security
- A token acts as you. It has your role on each site: Owner, Editor or Viewer. If you lose access to a site, the token does too, at the next call.
- Treat it like a password. Keep it in an environment variable or your client’s secret prompt, not in a file you commit. Pixelary stores only a hash, so a lost token cannot be shown again: revoke it and create a new one.
- Revoke any time in Account → AI assistants. It stops working at once. Tokens do not expire on their own; the list shows when each was last used, so you can spot the ones nobody needs. Signing out of the dashboard does not revoke them.
- What your assistant sees goes to its provider. Stats, event names, page paths and trigger settings are sent to the AI service you connected, under your agreement with it. The event log holds no contact details or IP addresses, and addresses in page paths are masked.
- Log text is data, not instructions. Event names, page paths and platform messages come from website visitors and ad platforms. Pixelary cleans and caps them and marks them as untrusted, and the tools tell assistants not to follow them. A careful client still matters: this is why changes need a preview.
- Browsers are kept out. Requests from a web page on another site are refused with 403, as the MCP specification asks.
Limits
| What | Limit |
|---|---|
| Tokens per account | 5 |
| Requests per token | 120 a minute, then 429 with Retry-After |
| Events per call | 50; use next_before for the next page |
| Size of one answer | About 60 kB; a longer list is cut and marked truncated |
A preview’s confirm_id | 10 minutes, one use |
Troubleshooting
| You see | It means |
|---|---|
| 401 | No token was sent, or it was revoked. Check the Authorization: Bearer pxk_… header and create a new token if needed. A client that starts an OAuth sign-in here has not picked up the header. |
| 403 | The request came from a web page. Connect from the assistant, not from a browser tool. |
| 429 | Too many requests in this minute. Wait for the time in Retry-After. |
| “This token is read-only” | Create a token with Can edit triggers. A token’s access cannot be changed afterwards. |
| “Your role on this site is Viewer” | Ask the site owner for edit access. The token cannot do more than you can. |
For developers
The endpoint speaks Streamable HTTP
with one JSON response per POST: no sessions and no event stream, so GET and DELETE answer 405. It
supports protocol revision 2026-07-28 and, for clients that open with initialize, 2025-11-25, 2025-06-18 and
2025-03-26. It offers tools and prompts only.
Something here doesn’t match what you see? Write to hello@pixelary.app.