openclaw-cli
Enables interaction with OpenClaw agents via MCP, supporting natural language queries and session management.
README
openclaw-cli
Talk to OpenClaw from your terminal with openclaw-cli, or run it as an MCP server with openclaw-cli mcp.
Install CLI
curl -fsSL https://raw.githubusercontent.com/TimoBechtel/openclaw-cli/main/install.sh | bash
Skill
This repo ships a skill at skills/openclaw-cli/SKILL.md so agents can call the CLI directly.
Install it with:
npx skills add TimoBechtel/openclaw-cli --skill openclaw-cli
CLI usage
openclaw-cli ask "Is there anything on my calendar for today?" # one-off question
openclaw-cli ask "Let's cancel this appointment and block 1h this afternoon for a coding session." --session-key "<session-key>" # continue same conversation
openclaw-cli ask "Send me a rain report for tomorrow on Telegram." --json # script-friendly JSON object: { response, sessionKey }
openclaw-cli ask "What should I do next?" --context=none # opt out of auto context injection
cat prompt.txt | openclaw-cli ask "Create a skill from this" # combine message argument + piped content
cat prompt.txt | openclaw-cli ask # stdin-only input also works
openclaw-cli mcp # run as an MCP server over stdio
When omitted, --session-key is auto-generated.
MCP setup
Example MCP config for Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"openclaw": {
"command": "openclaw-cli",
"args": ["mcp"],
"env": {
"OPENCLAW_GATEWAY_TOKEN": "your-token-here"
}
}
}
}
Configuration
| Variable | Description | Default |
|---|---|---|
OPENCLAW_BASE_URL |
OpenClaw Gateway URL | http://127.0.0.1:18789 |
OPENCLAW_GATEWAY_TOKEN |
Bearer token for auth | - |
OPENCLAW_AGENT_ID |
Target agent ID | main |
OPENCLAW_SESSION_KEY_PREFIX |
Prefix for generated session keys | - |
OPENCLAW_ALIAS |
Alias in MCP tool description | OpenClaw |
Requirements
Enable OpenResponses in your OpenClaw config:
{ gateway: { http: { endpoints: { responses: { enabled: true } } } } }
Do not expose your OpenClaw Gateway to the public internet. Use Tailscale for remote access.
Build from source
You need Bun.
bun install
bun run build:all
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.