Skip to main content
Glama

openclaw-mcp (Hardened Fork)

Hardened fork of freema/openclaw-mcp — Model Context Protocol server for OpenClaw AI assistant integration with Claude Code.

Security Hardening

  • Configurable model: Uses OPENCLAW_MODEL env var (default: default) instead of hardcoded model

  • Localhost-only by default: SSE host defaults to 127.0.0.1 instead of 0.0.0.0

  • Rate limiting: Max 60 requests/min by default (configurable via RATE_LIMIT_PER_MIN)

  • Input validation: All tool inputs validated for type, length, and control characters

  • Path traversal protection: Memory tools reject .. in paths

Related MCP server: agent-skill-loader

Available Tools

Core Tools

Tool

Description

openclaw_chat

Send a message to OpenClaw and get a response

openclaw_status

Get OpenClaw gateway status and health

openclaw_chat_async

Send a message asynchronously (returns task ID)

openclaw_task_status

Check async task status

openclaw_task_list

List all tasks

openclaw_task_cancel

Cancel a running task

Extended Tools (New)

Tool

Description

openclaw_message

Send messages on Telegram or WhatsApp

openclaw_memory_read

Read a workspace memory file

openclaw_memory_write

Write to a workspace memory file

openclaw_alert

Send urgent alerts to Gabriel on Telegram

openclaw_spawn_agent

Spawn an OpenClaw sub-agent

openclaw_web_search

Search the web via OpenClaw

Configuration

Environment Variables

Variable

Default

Description

OPENCLAW_URL

http://127.0.0.1:18789

OpenClaw gateway URL

OPENCLAW_GATEWAY_TOKEN

—

Bearer token for gateway auth

OPENCLAW_MODEL

default

Model to use for chat completions

RATE_LIMIT_PER_MIN

60

Max tool calls per minute

HOST

127.0.0.1

SSE server bind host

PORT

3000

SSE server port

Claude Code Configuration (.claude.json)

{
  "mcpServers": {
    "openclaw": {
      "command": "node",
      "args": ["path/to/openclaw-mcp/dist/index.js"],
      "env": {
        "OPENCLAW_URL": "http://127.0.0.1:18789",
        "OPENCLAW_GATEWAY_TOKEN": "your-gateway-token-here",
        "OPENCLAW_MODEL": "default"
      }
    }
  }
}

Install & Run

npm install
npm run build
npm start           # stdio mode (default)
npm start -- -t sse # SSE mode

Development

npm run dev         # watch mode
npm run typecheck   # type checking
npm test            # run tests
npm run check:all   # lint + typecheck + test + build

License

MIT

Available Tools

12 tools
openclaw_alertA

Send an urgent alert to Gabriel on Telegram via OpenClaw

Inputs: level (required), title (required), details (required).

openclaw_chatB

Send a message to OpenClaw and get a response

Inputs: message (required), session_id.

openclaw_chat_asyncA

Send a message to OpenClaw asynchronously. Returns a task_id immediately that can be polled for results. Use this for potentially long-running conversations.

Inputs: message (required), priority, session_id.

openclaw_memory_readA

Read a memory file from the OpenClaw workspace

Inputs: path (required).

openclaw_memory_writeC

Write content to a memory file in the OpenClaw workspace

Inputs: path (required), content (required).

openclaw_messageC

Send a message on Telegram or WhatsApp via the OpenClaw gateway

Inputs: target (required), channel (required), message (required), media_path.

openclaw_spawn_agentC

Spawn an OpenClaw sub-agent to perform a task

Inputs: task (required), agent_id (required), model.

openclaw_statusA

Get OpenClaw gateway status and health information

Inputs: no named parameters.

openclaw_task_cancelA

Cancel a pending task. Only works for tasks that haven't started yet.

Inputs: task_id (required).

openclaw_task_listA

List all tasks. Optionally filter by status or session.

Inputs: status, session_id.

openclaw_task_statusB

Check the status of an async task. Returns status, and result if completed.

Inputs: task_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool has a clearly defined purpose: chat (sync/async), status, task management (status/list/cancel), platform messaging, memory operations, alerts, agent spawning, and web search. There is no meaningful overlap between the tools, as even similar actions (e.g., chat vs. message) target distinct contexts (OpenClaw conversation vs. external platform).

    Naming Consistency3/5

    All tools share the 'openclaw_' prefix, which provides cohesion, but the pattern after the prefix is inconsistent. Some use verb-first (openclaw_chat, openclaw_web_search), some use noun-only (openclaw_status, openclaw_task_list), and some use noun-verb (openclaw_memory_read, openclaw_task_cancel). This mixed convention is readable but not predictable.

    Tool Count5/5

    With 12 tools, the server is well-scoped for its purpose of controlling an OpenClaw instance. Each tool covers a distinct capability, and the count is within the ideal range for an assistant-like MCP server.

    Completeness4/5

    The toolset provides comprehensive coverage for chatting (sync/async), task management (status/list/cancel), messaging, memory read/write, alerting, agent spawning, and web search. Minor gaps exist, such as no explicit memory delete or session management, but these are not critical for the server's apparent purpose.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers