MCP server reference

The endpoint, OAuth and agent keys, every tool, the confirmation protocol, errors and limits for Benson's remote MCP server.

Reference
Updated 5 October 20266 min
Keep it useful

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. GET and DELETE return 405.
  • 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.

DocumentURL
Protected resource metadatahttps://api.trybenson.com/.well-known/oauth-protected-resource/mcp
Authorization server (issuer)https://app.trybenson.com/api/auth
Authorization server metadatahttps://app.trybenson.com/.well-known/oauth-authorization-server/api/auth
  • OAuth 2.1 with PKCE. Only S256 code 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_supported includes none).
  • 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#

ScopeOn the consent pageCovers
benson:readRead your store's dataStores, install status, analytics, extensions, orders, insights, rules and team.
benson:writeMake changes, after you confirm each oneSet 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.

ToolWhat it doesAccessLowest role
Account and stores
get_accountWho you are, the organization this connection acts for, its plan, its stores and what this connection may do.ReadsMember
create_siteAdd a store to Benson and get its install snippet.Asks firstAdmin
update_siteRename a store, change its domain or timezone, or pause and resume tracking.Asks firstAdmin
Install and set up
get_installInstall status, the snippet and the steps for the store's platform.ReadsMember
check_installCheck the storefront now and report whether Benson is live on it.ReadsMember
send_install_instructionsEmail the install steps to a developer.Asks firstAdmin
start_test_sessionGet a link that shows Benson catching a simulated coupon pop-up on your own store, live in the dashboard.No changesMember
get_setupThe setup checklist and the setup Benson recommends for the store.ReadsMember
apply_setupApply the recommended setup, or the parts of it you choose.Asks firstAdmin
Measure
get_analyticsSessions, extension share, conversion, order value and revenue for a date range, as a summary, a trend or a breakdown.ReadsMember
list_extensionsWhich coupon and cashback extensions your shoppers run, how often, and what they cost.ReadsMember
get_store_auditYour discount numbers from recent orders: how much went on codes, and which codes.ReadsMember
get_ordersOrder totals, attribution coverage and the discount codes used, extension sessions marked.ReadsMember
get_valueWhat Benson has protected for the store, measured against the holdout.ReadsMember
get_ai_agentsAI shopping agents and automation on the store, and the policy they get.ReadsMember
get_attributionAffiliate and UTM overwrites by extensions, and the commission they redirect.ReadsMember
get_liveWho is on the store right now, and which extensions are active.ReadsMember
Insights
list_insightsOpen insights for the store, each with the action Benson recommends.ReadsMember
act_on_insightApply an insight's recommended action, or dismiss, snooze or reopen it.Asks firstAdmin
Block
get_protectionThe blocker's mode, rules and holdout, and the checkout code policy.ReadsMember
simulate_blockerSee which pop-ups the current rules would hide for a given visitor, changing nothing.ReadsMember
set_blocker_modeSwitch the blocker between observe and block, and start or stop its holdout.Asks firstStop planAdmin
save_block_ruleCreate a blocking rule, from scratch or a preset, or change an existing one.Asks firstAdmin
delete_block_ruleDelete a blocking rule.Asks firstAdmin
update_checkout_policyChange the checkout code policy: its mode, the message shoppers see, and allowed codes.Asks firstAdmin
Offers and tests
list_campaignsYour on-site offer campaigns, with status, codes and performance.ReadsMember
save_campaignCreate a draft offer campaign or edit one. Drafts never show to shoppers.Asks firstAdmin
set_campaign_statusPublish, pause or resume an offer campaign on the storefront.Asks firstOwn planAdmin
list_discount_codesThe store's discount codes Benson knows about, and which are public or private.ReadsMember
list_experimentsA/B experiments and their results.ReadsMember
Team
list_teamMembers, their roles, and pending invitations.ReadsMember
invite_teammateInvite someone by email to join as an admin or a member.Asks firstAdmin
cancel_invitationCancel a pending invitation.Asks firstAdmin
Playbooks and guides
list_playbooksPlaybooks for the store, with progress and the next step.ReadsMember
search_guidesSearch Benson's guides and docs for how to do something.ReadsMember

Prompts#

Prompts are ready-made starts that name the tools to use in order. Claude Code and Claude Desktop show them as slash commands.

PromptIn Claude CodeWhat it does
set_up_store/mcp__benson__set_up_storeAdd the store, install Benson, check it's live and apply the recommended setup.
weekly_review/mcp__benson__weekly_reviewWhat changed this week: extension traffic, its cost, new insights and what to do next.
stop_coupon_popups/mcp__benson__stop_coupon_popupsMeasure 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.

SituationWhat your agent is told
The plan doesn't include itWhich 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 storeThe stores in the organization to choose from
Invalid argumentsThe fields that need fixing
Too many callsHow 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#

LimitValue
Tool calls120 a minute for each connection or agent key
Confirmation tokenWorks once, for 10 minutes
Access tokenLasts 15 minutes; refresh tokens rotate. Each call also checks the connection still exists.
Text in a resultUp to 24,000 characters
Lists25 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#

ClientHow to reconnect
ClaudeCustomize → Connectors → Benson: disconnect, then connect again
ChatGPTSettings → Apps & Connectors → Benson: disconnect, then connect again
CursorIn Cursor's MCP settings, log out of Benson, then log in again
VS CodeRun MCP: List Servers, choose benson and restart it
Claude CodeRun /mcp, choose benson and authenticate again
Codexcodex mcp logout benson, then codex mcp login benson
Gemini CLI/mcp auth benson
Any MCP clientRemove the server, add it again and sign in

Stuck? Email [email protected].

Find out what's leaking. 14 days of Own, no card.