MCP server

Run @cashsdk/mcp — a stdio MCP server that lets any agent operate your CashSDK account.

@cashsdk/mcp is the official CashSDK Model Context Protocol server. It's a thin, stateless proxy over the CashSDK REST API: every tool maps to an API call, using the token you provide. Point any MCP client at it and your agent can manage catalog, paywalls, customers, webhooks, and store sync.

Install and run#

The server runs over stdio and is launched by your MCP client. You rarely run it by hand — the client spawns it — but you can start it directly to smoke test:

bash
npx -y @cashsdk/mcp

The package is @cashsdk/mcp and the binary is cashsdk-mcp. Using npx -y means clients always run the latest version with no global install.

Environment variables#

Configuration is entirely through the environment your client passes to the server.

VariableRequiredDefaultDescription
CASHSDK_TOKENYesA secret key (csk_sk_…) or a setup token (csk_st_…). Authenticates every tool call.
CASHSDK_API_URLNohttps://api.cashsdk.comBase URL of the CashSDK Cloud API.
CASHSDK_APPNoDefault app id (app_…) for tools. Every tool also accepts an explicit app argument that overrides this.

CASHSDK_TOKEN grants API access to your workspace. Treat it like any secret: scope it to a single app, never commit it, and prefer a setup token (csk_st_…) — a short-lived, provisioning-scoped credential — over a long-lived secret key when onboarding.

Client configuration#

Any MCP client uses roughly the same JSON. The exact file differs per client (see the linked pages), but the server block is identical:

json
{
  "mcpServers": {
    "cashsdk": {
      "command": "npx",
      "args": ["-y", "@cashsdk/mcp"],
      "env": {
        "CASHSDK_TOKEN": "csk_sk_...",
        "CASHSDK_APP": "app_...",
        "CASHSDK_API_URL": "https://api.cashsdk.com"
      }
    }
  }
}

Tools#

Tools are grouped by what they touch. Each maps directly onto a REST endpoint, so results are the same JSON your backend would receive.

Setup & inspect
ToolDescription
get_setup_checklistReturn the live go-live checklist and what's outstanding.
get_appFetch an app's configuration.
get_catalogList products, entitlements, and offerings.
update_app_settingsChange app-level settings.
get_ios_integration_snippetsGet ready-to-paste iOS integration code.
Catalog
ToolDescription
create_productCreate a product (subscription or one-time).
create_entitlementCreate an entitlement.
grant_entitlementGrant an entitlement to a customer.
Paywalls & placements
ToolDescription
list_templatesList available paywall templates.
list_paywallsList existing paywalls.
create_paywallCreate a paywall from scratch.
create_paywall_from_templateCreate a paywall from a template.
generate_paywallGenerate a paywall from a natural-language brief.
list_placementsList placements.
create_placementCreate a placement that targets a paywall.
Customers & data
ToolDescription
get_customerFetch a customer and their entitlements.
list_transactionsList transactions for an app or customer.
tail_recent_eventsReturn the most recent events (purchases, renewals, etc.).
Campaigns
ToolDescription
create_campaignCreate a campaign.
list_campaignsList campaigns.
Keys & webhooks
ToolDescription
create_api_keyCreate a new API key.
rotate_api_keyRotate an existing API key.
register_webhook_endpointRegister a webhook endpoint URL.
send_test_webhookSend a test event to a webhook endpoint.
Store sync
ToolDescription
sync_catalog_from_app_storePull catalog data from the App Store.
push_catalog_to_app_storePush your CashSDK catalog to the App Store.
request_apple_test_notificationAsk Apple to send a test server notification.

Per-client setup#

Next steps#