Connect Stripe to Codex

Inspect customers, payments, subscriptions, and invoices. Add Toolspoke to Codex once and it can use 14 Stripe actions. Your Stripe credential stays in Toolspoke, and you choose which actions Codex may call.

Set it up in Codex

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Codex

    ~/.codex/config.toml

    [mcp_servers.toolspoke] url = "https://toolspoke.com/mcp"

    Codex signs in to Toolspoke on its own the first time it connects, so there is no key to paste.

  2. Install Stripe and connect it

    Add Stripe to a project in your Toolspoke workspace.

    Secret key. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    Secret key
    Dashboard → Developers → API keys. A restricted key with read access to customers, charges, invoices, subscriptions, and events covers every action except update_metadata, which needs write access.
  3. Choose what Codex may do

    All 14 actions start on. Switch off the one action that changes something in Stripe, and Codex gets a refusal if it tries.

What you can ask Codex for

A few of the Stripe actions that only read, so they are safe to try first.

  • List customers, newest first
  • Retrieve one customer by id, optionally with their subscriptions expanded
  • List PaymentIntents, newest first, optionally scoped to one customer
  • Retrieve a PaymentIntent (pi_…) and why it succeeded or failed, with the customer and settled charge expanded

What Codex can do in Stripe

13 actions read and one writes.

Reads

  • List customers

    List customers, newest first. Filter by exact email when you have one; use search for partial matches.

  • Get customer

    Retrieve one customer by id, optionally with their subscriptions expanded. Use when you already know the cus_… id.

  • Search

    Search Stripe objects with the Stripe query language, e.g. email:'[email protected]', name~'amy', status:'active', amount>1000, metadata['plan']:'pro'. Use for lookups the list actions cannot express. Results lag writes by up to a minute.

  • List payments

    List PaymentIntents, newest first, optionally scoped to one customer. Use to review recent payment attempts and their status.

  • Get payment intent

    Retrieve a PaymentIntent (pi_…) and why it succeeded or failed, with the customer and settled charge expanded. Use get_charge for a ch_… id.

  • Get charge

    Retrieve a Charge (ch_… or py_…) with its customer expanded. Use get_payment_intent for a pi_… id.

  • List invoices

    List invoices, newest first. Filter by customer, subscription, or status to answer billing questions such as which invoices are still open.

  • Get invoice

    Retrieve one invoice by id, including its line items, totals, and payment state. Use when a customer asks about a specific in_… invoice.

  • List subscriptions

    List subscriptions, newest first. Filter by customer, price, or status to check what a customer is currently paying for.

  • Get subscription

    Retrieve one subscription by id with its items, current period, and cancellation state expanded.

  • List events

    List recent Stripe events (the same objects webhooks deliver), newest first. Use to debug missed webhooks or to see what changed, e.g. type invoice.payment_failed. Stripe keeps 30 days of events.

  • List disputes

    List disputes and chargebacks, newest first. Use to check whether a payment was disputed and what evidence deadline applies.

  • Get balance

    Return the account's current Stripe balance: available, pending, and reserved amounts per currency.

Writes

  • Update metadata

    Attach or overwrite metadata keys (and optionally the description) on a customer, charge, invoice, PaymentIntent, or subscription. This is the only write this tool performs, it never moves money. Existing keys you do not send are left alone; keys cannot be cleared here.

Stripe in Codex: questions

Does Codex see my Stripe credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Codex only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Codex from changing things in Stripe?

Yes. Each of the 14 actions can be switched off for a project. Turn off the one that changes something and Codex can only read.

Will 14 actions crowd Codex's context?

No. Toolspoke shows Codex five bridge tools, plus a guide where a toolkit has one, and Codex searches for the Stripe action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Does the same work in ChatGPT?

ChatGPT and Codex share one OpenAI account. In ChatGPT, add a custom MCP connector in its settings and paste the same address.

What does it cost?

Tool calls are free on every plan, and a Stripe call does not run in a sandbox, so it bills nothing.

Try Stripe in Codex

Free to start, and tool calls cost nothing on any plan.