Skip to main content
Glama

PearClaw 🍐

Give your OpenClaw agent real-time oversight of Claude Code.

Your AI stays in the loop on every significant action, reviews decisions in context, and can block or redirect before code is written. Pair programming where one of the pair actually knows your codebase.

You type a task into Claude Code
         ↓
Claude Code plans an action (write file, run command, etc.)
         ↓
consult_supervisor() — asks your OpenClaw agent
         ↓
OpenClaw reviews in context, responds: approve / block / modify
         ↓
Claude Code proceeds (or stops)
         ↓
notify_supervisor() — agent gets a completion summary

Why

Claude Code is powerful but operates in isolation. It doesn't know:

  • Your codebase conventions that aren't written down

  • That you already have a utility for that in lib/

  • That this migration will break production

  • What you decided two sessions ago

Your OpenClaw agent does. This bridge connects them.


Related MCP server: ClawDaemon MCP

Install

1. Install the MCP server

npm install -g pearclaw

Or run without installing:

npx pearclaw

2. Add to Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "openclaw": {
      "command": "npx",
      "args": ["pearclaw"],
      "env": {
        "OPENCLAW_GATEWAY_URL": "ws://127.0.0.1:18788"
      }
    }
  }
}

Replace the gateway URL with your OpenClaw gateway address. Find it with:

openclaw gateway status

If your gateway uses token auth:

"env": {
  "OPENCLAW_GATEWAY_URL": "ws://127.0.0.1:18788",
  "OPENCLAW_GATEWAY_TOKEN": "your-token-here"
}

3. Add the CLAUDE.md protocol

Copy claude/CLAUDE.md to your project root. This tells Claude Code when and how to use the supervisor tools.

cp node_modules/pearclaw/claude/CLAUDE.md ./CLAUDE.md

Or append it to an existing CLAUDE.md.

4. Install the OpenClaw skill

Copy the supervisor skill to your OpenClaw workspace:

cp -r node_modules/pearclaw/skill ~/.openclaw/workspace/skills/mcp-supervisor

This tells your OpenClaw agent how to handle incoming review requests and write responses.

5. (Optional) Install the PreToolUse hook

For automatic escalation of high-risk actions without relying on Claude Code calling consult_supervisor itself:

cp node_modules/pearclaw/claude/hooks/openclaw-supervisor-hook.js ~/.claude/hooks/

Add to ~/.claude/hooks.json:

{
  "hooks": {
    "PreToolUse": [{
      "matcher": { "tool_name": "Write|Edit|MultiEdit|Bash" },
      "hooks": [{
        "type": "command",
        "command": "node ~/.claude/hooks/openclaw-supervisor-hook.js",
        "timeout": 28000
      }]
    }]
  }
}

Configuration

All config via environment variables or ~/.pearclaw.json.

Variable

Default

Description

OPENCLAW_GATEWAY_URL

ws://127.0.0.1:18788

OpenClaw gateway WebSocket URL

OPENCLAW_GATEWAY_TOKEN

Auth token (if required)

OPENCLAW_MCP_SESSION

main

Agent session to target

OPENCLAW_MCP_INBOX_DIR

~/.openclaw/mcp-inbox

Drop-file inbox (fallback)

OPENCLAW_MCP_TIMEOUT

25000

Response timeout (ms)

OPENCLAW_MCP_FAIL_OPEN

true

Approve when supervisor unreachable

~/.pearclaw.json (optional)

{
  "gatewayUrl": "ws://127.0.0.1:18788",
  "sessionTarget": "main",
  "failOpen": true
}

How the supervisor responds

When Claude Code calls consult_supervisor, your OpenClaw agent receives a structured message and writes a JSON response to a temp file.

Approve:

{ "decision": "approve", "reason": "Looks good." }

Block:

{ "decision": "block", "reason": "We already have this in lib/stripe.js.", "suggestion": "Import from there instead." }

Modify:

{ "decision": "modify", "reason": "Right idea, small change needed.", "suggestion": "Add idempotency check at top." }

See skill/SKILL.md for the full supervisor protocol.


Tools exposed to Claude Code

consult_supervisor

Synchronous review. Claude Code blocks until your agent responds (or timeout).

action:         What you're about to do
context:        Why
files_affected: File paths involved
risk_level:     low | medium | high

notify_supervisor

Fire-and-forget update. No response needed.

event:    task_complete | task_failed | session_end | info
summary:  What happened
details:  Optional structured data

Limitations

  • Response timeout: 25 seconds. If your agent doesn't respond in time, the action is approved (fail-open by default).

  • Requires OpenClaw gateway running locally (or accessible via network).

  • The supervisor can only block/modify — it can't rewrite code directly (yet).


Built by

SideEye Labs — building vertical AI for the real world.

Part of the OpenClaw ecosystem.

Available Tools

3 tools
consult_supervisorA

Consult your OpenClaw supervisor agent before proceeding. Use this before writing files, running commands, or making architectural decisions. Returns: { decision: 'approve'|'block'|'modify', reason: string, suggestion?: string }

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesWhat you are about to do. Be specific: include file paths, command text, or the decision you're making.
contextYesWhy you want to do this. What problem does it solve? What's the broader task?
risk_levelNoYour assessment of risk. high = destructive/irreversible/security-sensitive.
files_affectedNoFile paths that will be created, modified, or deleted.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully shoulders behavioral disclosure. It reveals that the tool returns a decision object with 'approve', 'block', or 'modify', along with a reason and optional suggestion. This transparency about the blocking nature and the interaction with an external agent is sufficient for a simple approval tool. No contradictions with missing annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences covering purpose, usage context, and return format. Every sentence adds value without redundancy. The structure is front-loaded with the core purpose and then immediate usage guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple approval consultation tool, the description provides necessary context: when to use, what to expect in return. The schema covers parameters well. While it doesn't mention potential side effects or failure modes, the return format and purpose are clear. Slightly more detail on what happens if the supervisor is unavailable would improve completeness, but it's adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 4 parameters with 100% description coverage, so the schema already provides detailed semantics for each parameter. The tool description adds no extra information about the parameters beyond what the schema offers. Baseline of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: consulting a supervisor agent before specific actions (writing files, running commands, making decisions). It distinguishes from siblings like 'get_supervisor_message' which is for retrieving messages, and 'notify_supervisor' for notifications, by focusing on approval. The verb 'consult' and resource 'supervisor agent' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear when-to-use guidance: 'before writing files, running commands, or making architectural decisions.' It does not explicitly list when not to use or alternatives, but the context makes it clear that this is the go-to for approval-seeking. The return format hints at the possible outcomes (approve/block/modify), which aids in decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_supervisor_messageA

Poll for proactive messages from your OpenClaw supervisor. Call this every ~5 tool calls. Hedy may have injected context, corrections, or guidance. Returns: { message: string|null } — if message is non-null, read it before continuing.

ParametersJSON Schema
NameRequiredDescriptionDefault
contextNoBrief description of what you just did / are about to do.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that Hedy may inject context and specifies the return format. It is a read-only poll, so no destructive behavior is expected, and the description covers the key behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each adding value: purpose, frequency guidance, and return format. No unnecessary words. Front-loaded with the verb and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description explains the return value well. It addresses polling frequency and context for use. Missing error handling details or consequences of not polling, but overall sufficient for a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single optional parameter 'context'. The description does not add extra meaning beyond the schema's brief description. Baseline 3 is appropriate as the schema already documents the parameter well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it polls for proactive messages from the supervisor, with a specific verb (poll) and resource. It distinguishes from siblings: 'consult_supervisor' might initiate a conversation, 'notify_supervisor' sends messages, but this one only retrieves.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly recommends calling every ~5 tool calls and instructs to read a non-null message before continuing. This provides clear context for when to use it, though it doesn't explicitly state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

notify_supervisorA

Send a one-way update to your OpenClaw supervisor. Use after completing a task, encountering an error, or finishing a session. Does not wait for a response.

ParametersJSON Schema
NameRequiredDescriptionDefault
eventYesThe type of event.
detailsNoOptional structured metadata (files changed, PR URL, errors, etc.).
summaryYesWhat happened. Be concise.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the one-way nature and lack of response, which are key behavioral traits. Missing details like error handling or reliability, but sufficient for a simple notification tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: the first states the purpose, the second provides usage scenarios and behavioral note. It is front-loaded, concise, and every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 params, 2 required, no output schema), the description covers purpose, usage, and key behavior. It could mention that no return value is sent, but 'does not wait for a response' implies that. No gaps in context for an agent to misuse.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents each parameter. The description does not add new meaning beyond the schema, meeting the baseline score of 3 as per guidelines.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it sends a one-way update to the supervisor, with a specific verb and resource. It distinguishes from siblings by emphasizing one-way communication (vs. consult_supervisor for two-way, get_supervisor_message for retrieval).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly lists when to use the tool: after task completion, error, or session end. It also notes that it does not wait for a response, which sets expectations. It does not explicitly state when not to use, but sibling names provide contrast.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedconsult_supervisor
    • First observedget_supervisor_message
    • First observednotify_supervisor

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a distinct purpose: consult for decisions, get for polling messages, notify for one-way updates. No overlap, clearly differentiated by description.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (consult_supervisor, get_supervisor_message, notify_supervisor).

Tool Count4/5

Three tools is on the low end but appropriate for a focused supervisor communication interface. It covers the essential actions without being excessive.

Completeness4/5

The set covers the core interactions with a supervisor: asking for approval, polling for messages, and sending updates. No obvious gaps for the intended purpose.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Connects Claude Code to a persistent OpenClaw daemon for 24/7 automation of cron jobs, webhooks, and messaging across over 23 platforms. It enables background browser automation and event tracking that persists even when the Claude session is closed.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Transforms Claude Code into an autonomous operator that decomposes goals, spawns worker sessions, manages persistent memory, enforces guardrails, and learns from human review.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Real-time audit and approval system for Claude Code tool calls, enabling monitoring and control of AI agent actions with a web dashboard.
    19
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sideEyeLabs/pearclaw'

If you have feedback or need assistance with the MCP directory API, please join our Discord server