OpenClaw MCP Server
Lets Claude send tasks to your self-hosted OpenClaw assistant and read back its answers, with OAuth 2.1 security.
188 stars on GitHubby freemaLicense MITUpdated 29 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add openclaw -e OPENCLAW_URL="<your value>" -e OPENCLAW_GATEWAY_TOKEN="<your value>" -- npx -y openclaw-mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
OPENCLAW_URL | URL of your OpenClaw gateway | Yes |
OPENCLAW_GATEWAY_TOKEN | Bearer token for OpenClaw gateway authentication | Yes |
OPENCLAW_MODEL | Model name for chat completions (e.g. 'openclaw' or 'openclaw/<agentId>') | No |
OPENCLAW_TIMEOUT_MS | Request timeout in milliseconds | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Ask my OpenClaw assistant to summarize the open issues in my project.
Queue a task in OpenClaw to run the tests on dev and tell me when it is done.
What it is
This server connects Claude to OpenClaw, an AI assistant you run on your own server. Claude can chat with OpenClaw, check its health and hand it longer tasks, so one assistant can direct another. It works with Claude Desktop locally or with Claude.ai through a web address you host.
What it can do
openclaw_chat: send a message and get a replyopenclaw_status: check gateway healthopenclaw_instances: list configured OpenClaw instancesopenclaw_chat_async: queue a long task and get a task idopenclaw_task_status: check task progress and resultsopenclaw_task_list: list your tasksopenclaw_task_cancel: cancel a pending task
When to use
- βΊWhen you want Claude to delegate work to an OpenClaw assistant running on your own server
- βΊWhen a task takes a long time and you want to queue it and check back later
- βΊWhen you run several OpenClaw gateways, such as prod and staging, and want to pick one per request
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
acp-routerHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.control-uiHelps your agent organize and troubleshoot the OpenClaw Control UI, including sessions, dashboards, and connected Gateways.node-connectHelps your agent find out why a phone or browser cannot connect to your OpenClaw Gateway, fix that one client, and confirm it reconnects.Frequently asked questions
Is it free and open source?
The readme shows an MIT licence. You run it yourself, so hosting costs are yours.
What do I need?
An OpenClaw gateway and its gateway token. Run the server with npx openclaw-mcp or the Docker image.
Does it work with Claude.ai?
Yes, as a custom connector pointing to your domain ending in /mcp, with OAuth 2.1. Claude Desktop can use the local npx setup instead.
Can it talk to more than one OpenClaw?
Yes. Multi-instance mode lets every tool take an optional instance name, and each instance has its own URL, token and timeout.
Is it safe?
The readme warns that text Claude reads can reach OpenClaw, so prompt injection is the main risk. It advises a dedicated, sandboxed OpenClaw agent with few tools, set with OPENCLAW_AGENT_ID.
Why does the connector fail after sign-in?
The connector URL must end with /mcp. A bare domain returns 404 after OAuth completes.
If it does not work
- βΊMake sure the connector URL ends with /mcp, not just the bare domain.
- βΊBehind a reverse proxy, set MCP_ISSUER_URL to your public HTTPS address and TRUST_PROXY=1.
- βΊIf OAuth says Unregistered redirect_uri, set MCP_REDIRECT_URIS to the exact /api/mcp/auth_callback paths for claude.ai and claude.com.
5 new skills a week. 1 minute to read.