MCP server reference
The endpoint, OAuth and agent keys, every tool, the confirmation protocol, errors and limits for Benson's remote MCP server.
Jump to a section
Benson runs a remote MCP server, so an AI agent can work in your Benson account: set up a store, read its numbers and make changes after you confirm each one. This page is for developers and for anyone setting up a client by hand. For one-click installs, see the MCP server page.
Clients#
It works with any MCP client that speaks Streamable HTTP and OAuth. These have step-by-step setup:
Endpoint#
https://api.trybenson.com/mcp- Transport: Streamable HTTP. Send JSON-RPC as
POST; responses are JSON.GETandDELETEreturn405. - No session state. Each request stands alone, so there's nothing to resume after a dropped connection.
- Spec versions: clients on the current MCP spec and on the 2025 versions both work.
Authentication#
There are two ways in: OAuth for agents a person signs in to, and agent keys for agents that run on their own.
OAuth#
Add the endpoint to your client and it finds everything else. A request without a token gets 401 with a WWW-Authenticate header that names the protected resource metadata. From there the client reads the authorization server's metadata and starts the sign-in.
| Document | URL |
|---|---|
| Protected resource metadata | https://api.trybenson.com/.well-known/oauth-protected-resource/mcp |
| Authorization server (issuer) | https://app.trybenson.com/api/auth |
| Authorization server metadata | https://app.trybenson.com/.well-known/oauth-authorization-server/api/auth |
- OAuth 2.1 with PKCE. Only
S256code challenges are accepted. - Client registration: client ID metadata documents (preferred), or dynamic client registration for clients that don't support them yet.
- Public clients. No client secret is needed (
token_endpoint_auth_methods_supportedincludesnone). - Tokens: the access token's audience is the endpoint above. Refresh tokens rotate.
The person signs in to Benson with any of their usual methods, then sees a consent page that names the client and asks for two things: which organization, and what the connection may do.
Scopes#
| Scope | On the consent page | Covers |
|---|---|---|
benson:read | Read your store's data | Stores, install status, analytics, extensions, orders, insights, rules and team. |
benson:write | Make changes, after you confirm each one | Set up stores, change blocking rules and checkout policy, edit and publish offers, and invite teammates. |
A member of the organization can only grant benson:read. Owners and admins can grant both. A connection with benson:read alone sees only the reading tools.
One organization per connection#
Each grant is bound to the one organization picked on the consent page, and no tool takes an organization argument. To work in another organization, connect again and pick it. Agencies connect once for each client.
The connection acts as the person who connected it. Their role is checked again on every call, so a member who is removed is cut off on their next call.
Agent keys#
For agents that can't open a browser, like CI jobs, scripts and agent backends, create a key in Settings → AI agents → Agent keys.
- A key starts with
bnk_and is shown once. Benson keeps only its hash. - It works in one organization, with read or read-and-change access, and can expire after 30, 90 or 365 days, or never.
- It acts as the person who created it, with their role checked on every call. It stops working when it's revoked or expires, or when that person leaves the organization.
- Members can create read keys. Owners and admins can create keys that make changes.
Send it as a bearer token to the same endpoint. It's never accepted in a query string, and it doesn't work on Benson's other APIs.
{
"mcpServers": {
"benson": {
"type": "http",
"url": "https://api.trybenson.com/mcp",
"headers": {
"Authorization": "Bearer ${BENSON_AGENT_KEY}"
}
}
}
}A headless agent gets the same previews as everyone else. Show the preview to a person, or decide in your own code, before you send the confirmation back.
Tools#
The server lists the tools a connection may use: reading tools for everyone, and the tools that make changes only with benson:write and a role that allows them. Reads change nothing. Asks first tools follow the confirmation protocol below. A plan name means the change needs that plan; reads follow your plan too, and say which plan includes what you asked for.
Each tool takes an optional site (a site ID or a domain). With one store in the organization you can leave it out. Each tool's exact arguments are in its schema in tools/list.
| Tool | What it does | Access | Lowest role |
|---|---|---|---|
| Account and stores | |||
get_account | Who you are, the organization this connection acts for, its plan, its stores and what this connection may do. | Reads | Member |
create_site | Add a store to Benson and get its install snippet. | Asks first | Admin |
update_site | Rename a store, change its domain or timezone, or pause and resume tracking. | Asks first | Admin |
| Install and set up | |||
get_install | Install status, the snippet and the steps for the store's platform. | Reads | Member |
check_install | Check the storefront now and report whether Benson is live on it. | Reads | Member |
send_install_instructions | Email the install steps to a developer. | Asks first | Admin |
start_test_session | Get a link that shows Benson catching a simulated coupon pop-up on your own store, live in the dashboard. | No changes | Member |
get_setup | The setup checklist and the setup Benson recommends for the store. | Reads | Member |
apply_setup | Apply the recommended setup, or the parts of it you choose. | Asks first | Admin |
| Measure | |||
get_analytics | Sessions, extension share, conversion, order value and revenue for a date range, as a summary, a trend or a breakdown. | Reads | Member |
list_extensions | Which coupon and cashback extensions your shoppers run, how often, and what they cost. | Reads | Member |
get_store_audit | Your discount numbers from recent orders: how much went on codes, and which codes. | Reads | Member |
get_orders | Order totals, attribution coverage and the discount codes used, extension sessions marked. | Reads | Member |
get_value | What Benson has protected for the store, measured against the holdout. | Reads | Member |
get_ai_agents | AI shopping agents and automation on the store, and the policy they get. | Reads | Member |
get_attribution | Affiliate and UTM overwrites by extensions, and the commission they redirect. | Reads | Member |
get_live | Who is on the store right now, and which extensions are active. | Reads | Member |
| Insights | |||
list_insights | Open insights for the store, each with the action Benson recommends. | Reads | Member |
act_on_insight | Apply an insight's recommended action, or dismiss, snooze or reopen it. | Asks first | Admin |
| Block | |||
get_protection | The blocker's mode, rules and holdout, and the checkout code policy. | Reads | Member |
simulate_blocker | See which pop-ups the current rules would hide for a given visitor, changing nothing. | Reads | Member |
set_blocker_mode | Switch the blocker between observe and block, and start or stop its holdout. | Asks firstStop plan | Admin |
save_block_rule | Create a blocking rule, from scratch or a preset, or change an existing one. | Asks first | Admin |
delete_block_rule | Delete a blocking rule. | Asks first | Admin |
update_checkout_policy | Change the checkout code policy: its mode, the message shoppers see, and allowed codes. | Asks first | Admin |
| Offers and tests | |||
list_campaigns | Your on-site offer campaigns, with status, codes and performance. | Reads | Member |
save_campaign | Create a draft offer campaign or edit one. Drafts never show to shoppers. | Asks first | Admin |
set_campaign_status | Publish, pause or resume an offer campaign on the storefront. | Asks firstOwn plan | Admin |
list_discount_codes | The store's discount codes Benson knows about, and which are public or private. | Reads | Member |
list_experiments | A/B experiments and their results. | Reads | Member |
| Team | |||
list_team | Members, their roles, and pending invitations. | Reads | Member |
invite_teammate | Invite someone by email to join as an admin or a member. | Asks first | Admin |
cancel_invitation | Cancel a pending invitation. | Asks first | Admin |
| Playbooks and guides | |||
list_playbooks | Playbooks for the store, with progress and the next step. | Reads | Member |
search_guides | Search Benson's guides and docs for how to do something. | Reads | Member |
Prompts#
Prompts are ready-made starts that name the tools to use in order. Claude Code and Claude Desktop show them as slash commands.
| Prompt | In Claude Code | What it does |
|---|---|---|
set_up_store | /mcp__benson__set_up_store | Add the store, install Benson, check it's live and apply the recommended setup. |
weekly_review | /mcp__benson__weekly_review | What changed this week: extension traffic, its cost, new insights and what to do next. |
stop_coupon_popups | /mcp__benson__stop_coupon_popups | Measure first, then block the extensions that cost the most, with a holdout to prove it. |
Confirmation#
Every tool marked Asks first changes nothing on its first call. It answers with a preview and a single-use confirmation token instead:
// tools/call set_blocker_mode (illustrative arguments)
{ "site": "mystore.com", "mode": "block" }
// structuredContent of the result
{
"status": "needs_confirmation",
"preview": { /* what changes, on which store, from → to, and who it affects */ },
"confirmation_token": "cfm_…",
"expires_at": "2026-10-05T14:10:00Z"
}
The text of the result starts with "Nothing has changed yet." and then describes the change. Your agent shows the person the preview in its own words. Only after they say yes does it call again, with the same arguments and the token:
// tools/call set_blocker_mode, after the person says yes
{ "site": "mystore.com", "mode": "block", "confirmation_token": "cfm_…" }
- The token works once, for the same tool, arguments, connection and organization. Different arguments, an expired token or another connection's token all fail with "Ask again: the change wasn't confirmed."
- Retries are safe. If the confirmed call is retried, it returns the first result without acting twice.
- Plan problems show up front. If the change needs a plan you don't have, the preview says so and no token is issued.
- Clients that support forms may show a Confirm form instead of the token round trip. It's the same rule: nothing changes without a yes.
start_test_session is the one tool that makes something without asking: a short-lived test link. It changes nothing in your store.
What stays in the dashboard#
These never go through the MCP server. Tools that lead there answer with a link to the right dashboard page.
- Billing: choosing a plan, checkout, cancelling
- Deleting a store, purging its data, or deleting the organization
- Rotating site keys, policy keys or edge secrets
- Removing members, changing roles or transferring ownership
- Connecting integrations that need a secret (email platforms, Slack)
- Exporting all of the organization's data
Errors#
Problems with a call come back as a normal tool result marked isError, with a message that says what to do next. Protocol errors are only for unknown tools and malformed requests.
| Situation | What your agent is told |
|---|---|
| The plan doesn't include it | Which plan does, with a link to upgrade in the dashboard |
| Your role can't do it | "Your role can't do this. Ask an owner or admin." |
| Updated terms to accept | "Sign in to Benson to accept the updated terms." |
| No such store | The stores in the organization to choose from |
| Invalid arguments | The fields that need fixing |
| Too many calls | How many seconds to wait |
| Not a member of the organization | "Reconnect Benson and pick an organization you belong to." |
| Not available for the organization yet | "This isn't available for your organization yet." |
Limits#
| Limit | Value |
|---|---|
| Tool calls | 120 a minute for each connection or agent key |
| Confirmation token | Works once, for 10 minutes |
| Access token | Lasts 15 minutes; refresh tokens rotate. Each call also checks the connection still exists. |
| Text in a result | Up to 24,000 characters |
| Lists | 25 items a page by default, up to 100 |
Untrusted data#
Some values in results come from shoppers or store staff: UTM values, referrers, page paths, campaign names and copy, discount codes, and member names. In the text of a result they sit inside <untrusted-data> and </untrusted-data>, and long values are clipped. The server's instructions tell agents to treat anything inside as data, never as instructions.
That lowers the risk; it can't remove it. Keep changes behind the confirmation step, and read previews before you say yes.
Revoking access#
- A connection: Settings → AI agents → Disconnect. It stops on its next call.
- An agent key: Settings → AI agents → Agent keys → Revoke. It stops on its next call.
- A person: removing them from the organization stops their connections and keys on the next call.
Owners and admins see every connection in the organization; members see their own. The page also lists each connection's recent tool calls, and changes made through an agent show in your audit log as made "via" that client.
Troubleshooting#
Sign-in loops, or 401 errors#
The connection was disconnected, or its sign-in expired. Reconnect from your client (see below) and finish the consent page; closing it early leaves the client without a token.
No tools, or only reading tools#
The connection can only read. Either "Make changes" was off when you connected, or your role in that organization is Member. Reconnect and allow changes, or ask an owner to change your role.
The wrong organization#
A connection stays with the organization picked when it was made. Disconnect, connect again and pick the other one.
A change didn't happen#
Confirmation tokens last 10 minutes and work once, with the same arguments. Ask your agent to make the change again, and say yes to the new preview.
Reconnecting in each client#
| Client | How to reconnect |
|---|---|
| Claude | Customize → Connectors → Benson: disconnect, then connect again |
| ChatGPT | Settings → Apps & Connectors → Benson: disconnect, then connect again |
| Cursor | In Cursor's MCP settings, log out of Benson, then log in again |
| VS Code | Run MCP: List Servers, choose benson and restart it |
| Claude Code | Run /mcp, choose benson and authenticate again |
| Codex | codex mcp logout benson, then codex mcp login benson |
| Gemini CLI | /mcp auth benson |
| Any MCP client | Remove the server, add it again and sign in |
Stuck? Email [email protected].

