OK Capsule
Now Live

OK Capsule MCP — complete documentation.

A deliberate snapshot, not a finished spec. Everything below is live in production; where something is missing or moving, we say so.

Step zero

Before any code: join the open beta.

The self-serve wizard creates your workspace, and team members are added as staff users by email. Nothing below works without a workspace — every token is a signed-in staff token scoped to exactly one workspace.

Questions mid-integration? Use our custom OK Capsule AI assistant — available anytime.

Endpoints

Two URLs, both copyable.

MCP endpoint

https://storefront.okcapsule.app/mcp

OAuth discovery

https://storefront.okcapsule.app/.well-known/oauth-authorization-server

One-click install

Using an MCP-capable editor? These add the OK Capsule server in one click — your editor handles the OAuth sign-in in the browser.

Cursor

Opens Cursor and pre-fills the OK Capsule server.

Add to Cursor

no Cursor protocol handler? Use the web variant.

VS Code

Opens VS Code with the server pre-filled.

Install in VS Code

Requires VS Code 1.101 or newer with MCP enabled.

Claude Code

claude mcp add --transport http okcapsule https://storefront.okcapsule.app/mcp

then /mcp inside Claude Code to sign in.

Deep-link formats are controlled by each editor and can change — if a button doesn't respond, the endpoint above plus your editor's "add MCP server" flow always works.

OK Capsule is being submitted to the Claude connectors directory and the ChatGPT apps directory — once listed, connecting becomes a single click there too. This page will update.

  • MCP tools behind OAuth 2.1 — live in production.
  • Staff sign in with an email one-time code. No passwords, no API keys, no anonymous access.
  • The MCP tools are the supported contract. The underlying REST endpoints are reference-only and can change without notice.
  • Consumer-facing sign-in does not exist yet — every token belongs to brand staff.

Auth

OAuth 2.1 authorization-code + PKCE.

Any conformant MCP host completes this on its own. You only implement it yourself if you're writing the client.

StageCallNotes
DiscoveryGET /.well-known/oauth-authorization-serverEndpoints, supported grants, PKCE methods
Dynamic registrationPOST /oauth/registerPublic client, no pre-shared secret
AuthorizeGET /oauth/authorizecode_challenge (S256) required
LoginEmail one-time codeStaff email on the workspace
VerifyOTP submittedPersona and workspace resolved
ConsentScope approval screenUser approves exactly what the client asked for
TokenPOST /oauth/token1-hour RS256 access JWT + 30-day refresh token
Refreshgrant_type=refresh_tokenSingle-use, rotating — always persist the newest
RevokePOST /oauth/revokeImmediate; revoke anytime

Client requirements

  • PKCE S256 is mandatory.
  • Public clients only — no client secrets are issued.
  • https redirect URIs, with the usual localhost loopback exception.
  • Grant types limited to authorization_code and refresh_token.

Tokens

  • Access tokenRS256 JWT, 1 hour. Carries persona and workspace claims.
  • Refresh token30 days, single-use, rotating. Each refresh returns a new one — store it.

Access-token claims: sub, role, email, tenant_id, tenant_slug, scope, plus standard iss / aud / jti / iat / exp. One token is bound to exactly one workspace.

EnvironmentStatusNotes
ProductionLivestorefront.okcapsule.app — the only self-serve environment
StagingBy arrangement onlyPeriodically reset; no self-serve sandbox today

Roles & scopes

One workspace per token.

Nothing crosses workspaces. Read access is the default grant; anything destructive is opt-in at consent.

ScopeCoversDefault grant?
catalog:readbrands, products, catalog, product intelligence, pack builderDefault
recommendations:readrecommendation validationDefault
orders:readlist/get orders, transaction logs, order statusDefault
orders:writecreate/update ordersOpt-in
orders:cancelcancel ordersOpt-in
consumers:readget/list consumersDefault
consumers:writecreate/update consumersDefault
consumers:deletedelete consumersOpt-in
fulfillments:readfulfillments, shipping labelsDefault
meta:readstatus listsDefault
documents:writesupplement-facts PDF generationDefault

The authoritative list is scopes_supported in the discovery document — read it at runtime; scopes may be added or split.

Read-only by design (no write scope exists)

Catalog, recommendations, fulfillments, and status metadata.

Read-only by default

Orders — orders:read is in the default grant; write and cancel are opt-in.

Writable in the default grant

Consumer profiles (consumers:write) and document generation (documents:write). Deleting consumers is opt-in.

The tool surface

27 tools, every one scoped.

Discover them at runtime with tools/list — don't hardcode schemas. Destructive tools require a second confirmation via okc_confirm_pending_action, and some clients render our embedded UI cards while others fall back to text.

Session / infra

ToolScopePurpose
okc_authenticateEstablish/refresh the session
okc_debug_pingConnectivity and latency check
okc_confirm_pending_actionExplicit confirmation step for destructive actions

Catalog

ToolScopePurpose
okc_list_brandscatalog:readList brands (product lines)
okc_list_productscatalog:readList products
okc_get_catalogcatalog:readFull catalog view
okc_get_product_intelligencecatalog:readIngredient/product intelligence for a product
okc_render_pack_buildercatalog:readInteractive pack-builder UI card
okc_pack_builder_urlcatalog:readCreate a shareable pack-builder link

Recommendations & documents

ToolScopePurpose
okc_validate_recommendationrecommendations:readValidate a supplement recommendation
okc_generate_supplement_facts_pdfdocuments:writeGenerate a supplement-facts PDF
okc_list_statusesmeta:readList order/fulfillment status values

Consumers

ToolScopePurpose
okc_get_consumerconsumers:readFetch one consumer
okc_list_consumersconsumers:readList/search consumers
okc_upsert_consumerconsumers:writeCreate or update a consumer
okc_delete_consumerconsumers:deleteDelete a consumer (opt-in scope)

Orders

ToolScopePurpose
okc_list_ordersorders:readList orders
okc_get_orderorders:readFetch one order
okc_get_order_by_client_idorders:readFetch an order by your own order id
okc_list_order_transaction_logsorders:readOrder event/transaction history
okc_render_order_statusorders:readOrder-status UI card
okc_create_orderorders:writeCreate an order (opt-in scope)
okc_update_orderorders:writeUpdate an order (opt-in scope)
okc_cancel_orderorders:cancelCancel an order (opt-in scope)

Fulfillments

ToolScopePurpose
okc_list_fulfillmentsfulfillments:readList fulfillments/shipments
okc_get_fulfillmentfulfillments:readFetch one fulfillment
okc_get_shipping_labelfulfillments:readRetrieve a shipping label

Orders can carry your own order id and be retrieved later via okc_get_order_by_client_id.

Embedded UI cards

okc_render_pack_builder and okc_render_order_status return embedded UI cards. Some MCP clients render them; others fall back to text — both paths carry the same data.

Destructive actions need a second step

Canceling an order (okc_cancel_order) and deleting a consumer (okc_delete_consumer) require an explicit confirmation via okc_confirm_pending_action.

Discover at runtime

Call tools/list rather than hardcoding schemas — the surface grows and argument shapes can be extended.

Commerce paths

Shopify hand-off or direct orders.

Shopify checkout hand-off

Live and fastest. Build the pack with the catalog and pack tools, then send the customer to the Shopify checkout URL. No order-write scopes needed.

Six steps to go live

Direct order creation

okc_create_order and friends, behind the opt-in orders:write and orders:cancel scopes. Switching paths later is low-lift.

Four steps to sign up

Integration model

The happy path.

  1. 1

    Join the open beta — the wizard creates your workspace and staff users.

  2. 2

    Connect: point your MCP host at the endpoint. The first request returns a 401 whose challenge links the discovery documents — conformant MCP clients take it from there automatically: dynamic registration, then browser sign-in.

  3. 3

    Sign in: email one-time code, then consent to scopes.

  4. 4

    Use the tools: discover with tools/list, then call them.

  5. 5

    Stay signed in: refresh rotates automatically for 30 days.

Do you call the MCP directly?

Yes — Streamable HTTP JSON-RPC with an Authorization: Bearer header. Any conformant MCP host speaks it, including the OAuth handshake, so most teams don't write transport code at all.

Assumptions

  • A human signs in. There is no machine-to-machine grant today.
  • Staff emails live on the workspace before they can sign in.
  • Refresh tokens are single-use and rotating.
  • One workspace per token — nothing crosses workspaces.
RequirementWhat we expect
MCP clientAny conformant host that speaks Streamable HTTP and the OAuth handshake
Staff emailsOn the workspace, added via the wizard or an admin
Redirect URIhttps, or localhost loopback for local development
Scope choiceDecided up front — read-only, or opt into order writes
Token storageServer-side, secure, newest refresh token persisted
Re-auth handlingRoute an admin through sign-in on 401 or after 30 days

Known gaps & limitations

What isn't there yet.

Trust is the product. Here's the honest list.

  • No consumer-facing sign-in. Every token belongs to brand staff.
  • No client-credentials grant — there is no unattended machine-to-machine path today.
  • No self-serve sandbox. Staging exists by arrangement and is periodically reset.
  • Don't depend on the underlying REST endpoints; the MCP tools are the supported contract.
  • Don't hardcode tool schemas — discover them at runtime with tools/list.
  • The scope list is not final and will grow.
  • No unattended sessions beyond the 30-day refresh window.
  • Embedded UI cards don't render in every MCP client.

What is stable

  • The protocol: OAuth 2.1 + PKCE, Streamable HTTP, MCP.
  • The discovery URLs.
  • The production base URL.

Quick check

Confirm discovery in one line.

curl -s https://storefront.okcapsule.app/.well-known/oauth-authorization-server | jq '{issuer, authorization_endpoint, token_endpoint, registration_endpoint, code_challenge_methods_supported}'

Reference docs are consolidating under api2-docs.okcapsule.app .