Skip to content

This quickstart shows how to connect OpenClaw to Swytchcode and use the provider tools from the CLI and MCP server.

Step-by-step setup

Step 1: Install the Swytchcode CLI

Terminal window
npm install -g swytchcode

Use swy as a shorter alias for swytchcode.

Step 2: Initialize Swytchcode for OpenClaw

Terminal window
cd /path/to/your/project
swy init --editor=openclaw --mode=sandbox

This creates:

  • .swytchcode/ with tooling.json - the trust boundary that lists exactly which tools OpenClaw is allowed to call
  • OPENCLAW.md in the repo root - the agent contract file describing available tools and conventions for OpenClaw to follow
  • the Swytchcode MCP server registered with OpenClaw. When init runs in a terminal, it runs openclaw mcp set, which saves it under mcp.servers in ~/.openclaw/openclaw.json. Otherwise init prints the command to run yourself:
Terminal window
openclaw mcp set swytchcode '{"command":"swytchcode","args":["mcp","serve"]}'

Step 3: Fetch an integration

Search for available integrations (or browse the full list at swytchcode.com/apis):

Terminal window
swy search

Fetch one, such as Stripe:

Terminal window
swy get stripe

Step 4: List available methods

Terminal window
swy list methods

This lists every method from the integrations you’ve downloaded, so you can see what the Stripe bundle exposes before you enable a tool.

Step 5: Add tools to the trust boundary (tooling.json)

Add a specific method:

Terminal window
swy add stripe.charge.create

Or add all tools from a project:

Terminal window
swy add method --all stripe

Verify the tool is enabled:

Terminal window
swy list tooling

Step 6: Start the MCP server

OpenClaw starts the MCP server itself through the server registered in Step 2. If you need to start it manually:

Terminal window
swy mcp serve

Step 7: Use OpenClaw

Open your project in OpenClaw. The agent now has access to the Swytchcode MCP tools.

You can give prompts such as:

Create a Stripe charge for $50 for customer cus_123.

OpenClaw will:

  • check swy list tooling to verify the tool exists
  • call swy info stripe.charge.create to inspect the schema
  • generate runtime code using swy exec

Use OpenClaw as a personal agent

To drive OpenClaw from Telegram, WhatsApp, Slack or a terminal chat and let it run API calls for you, set it up with --operator instead. OpenClaw then sets integrations up on its own, tells you in the chat when an app needs connecting, and every call that changes something waits for your approval:

Terminal window
swy init --operator --editor=openclaw --project ~/agent-swy
swy login
swy doctor --agent openclaw --project ~/agent-swy

See the Personal agents guide for connecting apps and, optionally, locking OpenClaw down before you use real accounts.