Codex CLI

Add the hosted CashSDK MCP server to the OpenAI Codex CLI via ~/.codex/config.toml, so your agent can manage catalog, paywalls, and webhooks.

Add the CashSDK MCP server to the OpenAI Codex CLI so your agent can manage catalog, paywalls, and webhooks from the terminal.

Configure the server#

Codex reads MCP servers from ~/.codex/config.toml. Add a cashsdk server block:

toml
[mcp_servers.cashsdk]
url = "https://mcp.cashsdk.com/mcp"
http_headers = { Authorization = "Bearer csk_mcp_..." }

The CashSDK MCP server is hosted, so Codex connects to it over HTTP. There is nothing to install. Create the token in Settings → MCP. You can limit it to one app and choose read-only access when Codex only needs to inspect data.

Any CashSDK token grants API access to your workspace. Keep ~/.codex/config.toml out of version control, scope the token to a single app, and use an MCP token (csk_mcp_…) from Settings → MCP rather than a secret key or the 24-hour csk_st_… setup token.

Verify#

1
Restart Codex

Start a new Codex session so it picks up the updated config.

2
List MCP tools

Ask Codex what tools it has, or run its MCP status command. You should see the CashSDK tools such as get_setup_checklist, create_product, and generate_paywall.

3
Check the connection

If the server fails to connect, confirm the Authorization header is present and the MCP token has not been revoked. A missing or stale token comes back as 401 with a WWW-Authenticate challenge.

Example prompts#

  • "Create a monthly Pro subscription with a pro entitlement in CashSDK."
  • "Generate a paywall from the trial template and add a placement for onboarding."
  • "Register a webhook at https://api.myapp.com/hooks/cashsdk and send a test event."
  • "List my CashSDK apps and show what's outstanding on each setup checklist."

Next steps#