Blog

I Asked OpenClaw to Refund a Customer. It Told Me to Go Write an MCP Server.

The agent understood the request. It just had no way to act on it, and the fix it suggested was a weekend project. Here's the one-command version.

AI AgentNov 20, 2026

Key takeaways

  • -OpenClaw correctly understood "refund this customer $40" but had no Stripe tool, so it suggested the only path it knew: stand up an MCP server yourself
  • -That path means a Stripe API key, a server process, and your own code deciding what the agent is and isn't allowed to call, before the agent can do anything
  • -swytchcode-operator turns that into one setup command and one browser-based auth step, with the allowlist and policy enforcement handled outside your code
  • -The agent's suggestion wasn't wrong, it was just the most expensive correct answer available to it

We asked OpenClaw to refund a double-charged customer on Stripe, and it diagnosed the problem correctly, then told us honestly that it had no way to execute it. Its own suggested fix, setting up an MCP server for Stripe, sounds like a ten-second ask but turns out to require real engineering work, which is the gap this post walks through.

The request that should have taken ten seconds

We typed one line into an OpenClaw session connected to a support inbox: "Refund the customer in ticket #4821, they were double-charged $40 on Stripe."

OpenClaw read the ticket, found the charge ID, and confirmed the double charge. It got the reasoning right. Then it told us, correctly, that it had no way to touch Stripe.

What came back wasn't a flat refusal. It was a plan: "To do this, you'd need to set up an MCP server that connects to the Stripe API, then I can call it." Followed by an outline of what that involves. The agent wasn't being unhelpful. It was being honest about the actual size of the gap between "I understand the task" and "I can execute it."

What the agent's own suggestion actually requires

We followed its outline far enough to see what it was really asking us to do.

1. Create a Stripe API key, decide whether it's a restricted key scoped to refunds only, and store it somewhere the server can read without it ending up in shell history or a committed config file. 2. Write or install an MCP server that exposes a refund tool, which means picking a server implementation, running it as a long-lived process, and keeping it patched. 3. Decide, in code, what that tool is allowed to do. Any amount? Only below a threshold? Who approves a refund over $500? None of that comes for free. You write it. 4. Wire OpenClaw to that server, test the connection, and handle the inevitable case where the server restarts and the agent's next call fails silently. 5. Repeat all four steps for every other app the agent needs mid-conversation. Gmail. Slack. Your CRM. Each one is its own key, its own server, its own policy code.

None of this is wrong advice. It's correct, and it's also a day of engineering work for a ten-second request, multiplied by every app your agent will ever need.

The one-command version

The actual fix doesn't touch the MCP server question for the agent's app-by-app problem at all. It skips it. swytchcode-operator is a skill that gives OpenClaw one set of tools, swytchcode_discover, swytchcode_exec and a few others, that already speak to 300+ services through Swytchcode's execution layer.

Setup, once:

npm install -g swytchcode
swytchcode init --operator --editor=openclaw

That copies the operator skill straight into OpenClaw's skill folder (~/.openclaw/skills/), no openclaw skills install or ClawHub step needed, since it's placed there directly by the CLI.

Then, the specific app:

swy auth connect stripe

That's a browser-based OAuth flow or an API-key prompt, depending on the provider. Stripe uses an API key; the CLI prompts for it once and stores it in ~/.swytchcode/credentials.db, outside the project folder, never in an env var, never in the agent's context.

Back in the OpenClaw session:

Refund the customer in ticket #4821, they were double-charged $40 on Stripe.

This time the agent calls swytchcode_discover("refund a stripe charge"), gets back the canonical method stripe.refund.create, checks it's in the allowlist, and runs it. If you haven't explicitly allowed that method with swy add method stripe.refund.create, it can't. Nothing the agent says talks it past that; the allowlist is an absent capability, not an instruction it could argue its way around.

Where the suggestion the agent gave you still matters

We're not saying "never run your own MCP server." Plenty of teams need one, for an internal system Swytchcode doesn't catalog yet, or for a use case with requirements a general execution layer won't fit. The honest comparison is: writing your own server gives you full control and full maintenance burden. swytchcode-operator trades some of that control for skipping steps 1 through 4 above, for every app already in Swytchcode's catalog.

For "refund this customer," where Stripe is already covered, the tradeoff is easy. For something genuinely custom, the agent's original answer, build the MCP server, is still the right one.

FAQ

Why didn't OpenClaw just refuse instead of suggesting a whole server?

Because refusing without explanation would have been less honest. The agent correctly diagnosed that it has no tool for this and that the fix, done the way it understands how to be fixed, is building one. The gap wasn't in its reasoning. It was in not knowing a faster path existed.

Does swytchcode-operator replace OpenClaw's own MCP support?

No. OpenClaw's MCP client still works the way it always has. swytchcode-operator is a skill, loaded the same way any other OpenClaw skill is, that happens to give the agent tools backed by Swytchcode's execution layer instead of a server you stood up yourself.

What happens if I ask for a refund amount the policy doesn't allow?

That depends on what you've configured in policies.json. A policy can require human approval above a threshold, and if nobody approves within the timeout, the call simply never runs. The refusal happens before the request leaves your infrastructure, not after a mistaken refund has already gone out.

Give this prompt to your agent and get started.

More from the blog

Ready to make your agent's tool calls reliable?

Give this prompt to your agent and get started.