openclaw-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,140 @@
1
+ # OpenClaw MCP Server
2
+
3
+ [![npm version](https://badge.fury.io/js/openclaw-mcp.svg)](https://www.npmjs.com/package/openclaw-mcp)
4
+ [![CI](https://github.com/freema/openclaw-mcp/workflows/CI/badge.svg)](https://github.com/freema/openclaw-mcp/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ 🦞 Model Context Protocol (MCP) server for [OpenClaw](https://github.com/openclaw/openclaw) AI assistant integration.
8
+
9
+ ## Why I Built This
10
+
11
+ Hey! I created this MCP server because I didn't want to rely solely on messaging channels to communicate with OpenClaw. What really excites me is the ability to connect OpenClaw to the Claude web UI. Essentially, my chat can delegate tasks to my Claw bot, which then handles everything else β€” like spinning up Claude Code to fix issues for me.
12
+
13
+ Think of it as an AI assistant orchestrating another AI assistant. Pretty cool, right?
14
+
15
+ ## Quick Start
16
+
17
+ ### Local (Claude Desktop)
18
+
19
+ ```bash
20
+ npx openclaw-mcp
21
+ ```
22
+
23
+ Add to your Claude Desktop config:
24
+
25
+ ```json
26
+ {
27
+ "mcpServers": {
28
+ "openclaw": {
29
+ "command": "npx",
30
+ "args": ["openclaw-mcp"],
31
+ "env": {
32
+ "OPENCLAW_URL": "http://127.0.0.1:18789",
33
+ "OPENCLAW_GATEWAY_TOKEN": "your-gateway-token"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ ### Remote (Claude.ai)
41
+
42
+ ```bash
43
+ AUTH_ENABLED=true MCP_CLIENT_ID=openclaw MCP_CLIENT_SECRET=your-secret \
44
+ CORS_ORIGINS=https://claude.ai OPENCLAW_GATEWAY_TOKEN=your-gateway-token \
45
+ npx openclaw-mcp --transport sse --port 3000
46
+ ```
47
+
48
+ Then in Claude.ai add a custom connector with your `MCP_CLIENT_ID` and `MCP_CLIENT_SECRET`.
49
+
50
+ See [Installation Guide](docs/installation.md) for details.
51
+
52
+ ## Architecture
53
+
54
+ ```
55
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
56
+ β”‚ Your Server β”‚
57
+ β”‚ β”‚
58
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
59
+ β”‚ β”‚ OpenClaw β”‚ β”‚ OpenClaw MCP β”‚ β”‚
60
+ β”‚ β”‚ Gateway │◄────►│ Bridge Server β”‚ β”‚
61
+ β”‚ β”‚ :18789 β”‚ β”‚ :3000 β”‚ β”‚
62
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
63
+ β”‚ β”‚ OpenAI-compat β”‚ β”‚ - OAuth 2.1 auth β”‚ β”‚
64
+ β”‚ β”‚ /v1/chat/... β”‚ β”‚ - CORS protection β”‚ β”‚
65
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ - Input validation β”‚ β”‚
66
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
67
+ β”‚ β”‚ β”‚
68
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
69
+ β”‚ HTTPS + OAuth 2.1
70
+ β–Ό
71
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
72
+ β”‚ Claude.ai β”‚
73
+ β”‚ (MCP Client) β”‚
74
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
75
+ ```
76
+
77
+ ## Available Tools
78
+
79
+ ### Sync Tools
80
+
81
+ | Tool | Description |
82
+ |------|-------------|
83
+ | `openclaw_chat` | Send messages to OpenClaw and get responses |
84
+ | `openclaw_status` | Check OpenClaw gateway health |
85
+
86
+ ### Async Tools (for long-running operations)
87
+
88
+ | Tool | Description |
89
+ |------|-------------|
90
+ | `openclaw_chat_async` | Queue a message, get task_id immediately |
91
+ | `openclaw_task_status` | Check task progress and get results |
92
+ | `openclaw_task_list` | List all tasks with filtering |
93
+ | `openclaw_task_cancel` | Cancel a pending task |
94
+
95
+ ## Documentation
96
+
97
+ - [Installation](docs/installation.md) β€” Setup for Claude Desktop & Claude.ai
98
+ - [Configuration](docs/configuration.md) β€” Environment variables & options
99
+ - [Deployment](docs/deployment.md) β€” Docker & production setup
100
+ - [Development](docs/development.md) β€” Contributing & adding tools
101
+ - [Security](SECURITY.md) β€” Security policy & best practices
102
+
103
+ ## Security
104
+
105
+ ⚠️ **Always enable authentication in production!**
106
+
107
+ ```bash
108
+ # Generate secure client secret
109
+ export MCP_CLIENT_SECRET=$(openssl rand -hex 32)
110
+
111
+ # Run with auth enabled
112
+ AUTH_ENABLED=true MCP_CLIENT_ID=openclaw MCP_CLIENT_SECRET=$MCP_CLIENT_SECRET \
113
+ openclaw-mcp --transport sse
114
+ ```
115
+
116
+ Configure CORS to restrict access:
117
+
118
+ ```bash
119
+ CORS_ORIGINS=https://claude.ai,https://your-app.com
120
+ ```
121
+
122
+ See [Configuration](docs/configuration.md) for all security options.
123
+
124
+ ## Requirements
125
+
126
+ - Node.js β‰₯ 20
127
+ - OpenClaw gateway running
128
+
129
+ ## License
130
+
131
+ MIT
132
+
133
+ ## Author
134
+
135
+ Created by [TomΓ‘Ε‘ Grasl](https://www.tomasgrasl.cz/)
136
+
137
+ ## Related Projects
138
+
139
+ - [OpenClaw](https://github.com/openclaw/openclaw) β€” The AI assistant this MCP connects to
140
+ - [MCP Specification](https://spec.modelcontextprotocol.io/) β€” Model Context Protocol docs