Connect your agent

Connect Clam to OpenClaw

OpenClaw connects to Clam from the terminal: stop its Gateway, add your Shell, sign in through the link OpenClaw prints, and start the Gateway again. From then on, OpenClaw's email requests follow your Shell's rules.

Before you start

You need a Clam account with a Shell; the Quickstart sets up both. Everything here starts on your Shell's Install tab in the Clam console, under OpenClaw. Copy the commands from there rather than retyping them.

OpenClaw talks to Clam over MCP, the standard way an AI agent plugs into an outside tool: each Shell is an MCP server, and its email tools go through your rules before they reach Gmail.

OpenClaw only saves a server while its Gateway is stopped, so every method here starts with openclaw gateway stop and ends with openclaw gateway start.

Connect OpenClaw

Three ways in. Start with the first; the others are for when it doesn't fit.

Recommended

The simplest path: OpenClaw prints a sign-in link, so there is no key to handle.

  1. Stop the Gateway

    OpenClaw won't save a server while it runs.

    Terminal
    openclaw gateway stop
    
  2. Paste this in your terminal

    Copy the add command from the Install tab. Then press Enter. OpenClaw checks the connection and saves it.

    Terminal
    openclaw mcp add <server name> --url <your Shell's address> --transport streamable-http --auth oauth
    
  3. Log in, then sign in to Clam and Allow

    OpenClaw prints a sign-in link. Open it, and Clam asks to connect your Shell to OpenClaw. Click Allow.

    Terminal
    openclaw mcp login <server name>
    
  4. Start the Gateway again

    Your server shows up in the list.

    Terminal
    openclaw gateway start
    openclaw mcp list
    

Try a prompt below, then click Check connection on the Install tab.

Try it

With the starter policy from the Quickstart, ask OpenClaw:

If OpenClaw has other mail tools, start with "Use <your Shell's name>". Change what's allowed in How rules work.

Remove access

In OpenClaw, stop the Gateway and run openclaw mcp unset <server name>.

The removal that counts is Clam's: on the Shell's Install tab, under Connected agents, choose Remove access next to OpenClaw. A key stops working at once; a sign-in stops at OpenClaw's next request. Remove access

If it doesn't work

More in Common issues & solutions.

OpenClaw refuses to save the server

The Gateway is still running. Stop it, add Clam again, then start it.

The add never completes

The --transport streamable-http flag is missing. Use the Install tab's command.

Connected? Write your own rules.