CASHSDK_TOKEN grants API access to your workspace. Keep ~/.codex/config.toml
out of version control, scope the token to a single app, and prefer a setup
token (csk_st_…) over a long-lived secret key.
Codex CLI
Connect CashSDK to the OpenAI Codex CLI via ~/.codex/config.toml.
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]
command = "npx"
args = ["-y", "@cashsdk/mcp"]
env = { CASHSDK_TOKEN = "csk_sk_...", CASHSDK_APP = "app_...", CASHSDK_API_URL = "https://api.cashsdk.com" }
Codex launches npx -y @cashsdk/mcp over stdio and passes the env values to
the server.
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 start, confirm CASHSDK_TOKEN is set and
CASHSDK_API_URL points at a reachable API (https://api.cashsdk.com for
CashSDK Cloud).
Example prompts#
- "Create a monthly Pro subscription with a
proentitlement in CashSDK." - "Generate a paywall from the trial template and add a placement for onboarding."
- "Register a webhook at
https://api.myapp.com/hooks/cashsdkand send a test event." - "List my CashSDK apps and show what's outstanding on each setup checklist."