Outcome
Sessions launched from the agent’s template haveSTRIPE_SECRET_KEY set to a key that can read payments data and nothing else, and the Stripe CLI is on the sandbox path.
Before you start
- You are an admin of the organization, with an org-scoped API key if you use the CLI.
- Stripe is not a built-in provider. If your org went through Set Up Your First Agent and picked Stripe, the provider already exists under Tools & MCP and you can skip to step 3.
- A skill is attached to the agent’s template. Org-wide connections reach a session only when an attached skill asks for the provider.
Do it
1
Create a restricted key in Stripe
In the Stripe dashboard open Developers > API keys and click Create restricted key. Grant Read on Charges, PaymentIntents, Refunds, Disputes and Customers. Leave every write permission at None. Copy the
rk_live_... value once; Stripe does not show it again.2
Define the Stripe provider
In Settings > Context > Tools & MCP click New tool or MCP server, choose Tool, then define a custom provider named Stripe in category
sales. Add one static auth method with a single secret field, secret_key, materialized as the environment variable STRIPE_SECRET_KEY. Add the Stripe CLI as a package so the agent can run stripe commands.3
Connect it org-wide
Back in Tools & MCP, open Add a provider, pick Stripe, paste the restricted key, and choose Teams so every template in the org can use it.
4
Make the skill require it
Open the agent’s runbook skill and add
stripe to requires.integrations. Without this the connection is filtered out of the session, silently.5
Rebuild the template
Editing the skill triggers a rebuild of the templates it is attached to. If you attached a new skill instead, build once yourself.
Verify
Launch a session from the template and list one charge. A read succeeds; a write is refused by Stripe with a permissions error.Gotchas
- A full secret key works too, which is the problem. Nothing in Runtime downgrades a credential. If you paste
sk_live_..., the agent can refund. Use the restricted key. - Connected but not required. The provider shows as connected under Tools & MCP, but
env | grep STRIPEinside the session is empty. An attached skill must liststripeinrequires.integrations, or the connection must be agent-scoped. - Test mode versus live mode. A restricted key belongs to one mode. Investigations of real customers need a live-mode key; seeded cases in step 5 of Build can run on a test-mode key.
3. Give it tools
Providers, MCP servers, secrets, and the credential hierarchy that decides which connection a run receives.