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.
- The roster agent exists and you have its id (
runtm-api agents list). The connection is scoped to that agent. - A skill is attached to the agent’s template. The agent connection reaches the agent’s runs without it, but declaring the provider keeps the requirement visible and is required if you ever fall back to an org-wide connection.
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 to the agent
Back in Tools & MCP, open Add a provider, pick Stripe, paste the restricted key, choose the Agent scope and pick the agent. Only that agent’s runs use this key, and each other agent that needs Stripe gets its own restricted key with its own scopes. Choose Teams only if many agents truly share one read-only key. Paste the key into Runtime yourself. If an agent is setting this up, it sends you a
/connect link that opens this dialog with Stripe and the agent already selected, and it never sees the key.4
Make the skill require it
Open the agent’s runbook skill and add
stripe to requires.integrations. The agent connection does not need it, but an org-wide or personal Stripe connection is filtered out of the session, silently, without it.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 as the agent and list one charge. A session opened from the template without the agent never receives agent connections. 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. Either the session is not running as the agent that owns the connection (dashboard sessions run as no agent), or the connection is org-wide or personal and no attached skill listsstripeinrequires.integrations. - 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.