GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - psandis/psclawmcp: MCP server for the OpenClaw CLI ecosystem. Exposes feedclaw, dustclaw, driftclaw, dietclaw, and wirewatch as tools over the Model Context Protocol, so AI assistants can use them directly.

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
biome.json
biome.json
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
tsconfig.json
tsconfig.json
 
 
tsup.config.ts
tsup.config.ts
 
 

Repository files navigation

psclawmcp

npm

MCP server for the OpenClaw CLI ecosystem. Exposes eleven OpenClaw CLIs as tools over the Model Context Protocol, so AI assistants can use them directly: feedclaw, dustclaw, driftclaw, dietclaw, wirewatch, siteclaw, logclaw, openclaw-channel-canary, mymailclaw, asciiclaw, and unasciiclaw.

What It Does

  • wraps existing OpenClaw CLIs as MCP tools: no library rework needed
  • spawns each CLI as a subprocess and returns its output to the client
  • requests --json for structured output where the CLI supports it, plain text otherwise
  • one MCP tool per CLI subcommand (43 tools across 11 CLIs)
  • exposes read-only and dry-run commands only: nothing that deletes, sends, or changes external state
  • you choose which CLIs are enabled: tools for disabled CLIs are never registered
  • communicates over stdio transport

Architecture

AI Client (Claude, etc.)
    │
    │  MCP (JSON-RPC over stdio)
    │
┌───▼───────────────┐
│   psclawmcp       │
│                   │
│  ┌─────────────┐  │
│  │ MCP Server  │  │   registers tools for enabled CLIs from src/tools/*.ts
│  └──────┬──────┘  │
│         │         │
│  ┌──────▼──────┐  │
│  │  runner.ts  │  │   spawns the CLI, appends --json, maps exit codes to errors
│  └──────┬──────┘  │
└─────────┼─────────┘
          │
    ┌─────▼──────┐
    │ CLI tools  │   feedclaw, dustclaw, driftclaw, dietclaw, ww, siteclaw,
    └────────────┘   logclaw, oc-canary, mmclaw, asciiclaw, unasciiclaw

Each tool file in src/tools/ exports an array of ToolDef objects. At startup the server reads the enabled CLIs from the config and registers their tools with the MCP SDK. When a tool is called, the runner spawns the CLI binary with the mapped arguments, adds --json at the end where supported, and returns stdout to the client. A non-zero exit, a timeout, or a missing binary is returned as an MCP error with the CLI's message.

File Structure

psclawmcp/
├── src/
│   ├── index.ts          # CLI entry point
│   ├── server.ts         # MCP server
│   ├── config.ts         # config persistence
│   ├── registry.ts       # available CLIs
│   ├── runner.ts         # subprocess runner
│   └── tools/
│       ├── types.ts      # ToolDef interface
│       ├── index.ts      # tool aggregator
│       ├── feedclaw.ts
│       ├── dustclaw.ts
│       ├── driftclaw.ts
│       ├── dietclaw.ts
│       ├── wirewatch.ts
│       ├── siteclaw.ts
│       ├── logclaw.ts
│       ├── canary.ts
│       ├── mymailclaw.ts
│       ├── asciiclaw.ts
│       └── unasciiclaw.ts
├── tests/                # one test file per tool file, plus runner, server, tools
├── CHANGELOG.md
├── package.json
├── tsconfig.json
├── tsup.config.ts
├── biome.json
├── LICENSE
└── README.md

Requirements

  • Node 22+
  • the CLIs you enable, installed and on PATH (see below)

Install

npm install -g psclawmcp

Then install the CLIs you want to use. Each is a separate npm package:

psclawmcp name npm package Binary used
feedclaw feedclaw feedclaw
dustclaw dustclaw dustclaw
driftclaw driftclaw driftclaw
dietclaw dietclaw dietclaw
wirewatch wirewatch ww
siteclaw siteclaw siteclaw
logclaw logclaw logclaw
canary openclaw-channel-canary oc-canary
mymailclaw mymailclaw mmclaw
asciiclaw asciiclaw asciiclaw
unasciiclaw unasciiclaw unasciiclaw

For example:

npm install -g dustclaw siteclaw logclaw

If a tool is called and its binary is not on PATH, the tool returns <binary> not found on PATH. Is it installed?.

Usage

Pick which CLIs to enable:

psclawmcp add siteclaw
psclawmcp add logclaw
psclawmcp list
Available tools:

  [ ] feedclaw     RSS/Atom feeds and AI digests
  [ ] dustclaw     disk space analysis
  [ ] driftclaw    deployment version drift
  [ ] dietclaw     codebase health monitoring
  [ ] wirewatch    network traffic monitoring and AI anomaly detection
  [✓] siteclaw     Lighthouse performance history across sites
  [✓] logclaw      log parsing, stack-trace grouping, and AI summaries
  [ ] canary       OpenClaw chat channel delivery health (oc-canary)
  [ ] mymailclaw   email scanning and categorizing (mmclaw)
  [ ] asciiclaw    image to ASCII art
  [ ] unasciiclaw  ASCII art to image

Config: /Users/you/.psclawmcp/config.json

Remove a CLI:

psclawmcp remove logclaw

Start the MCP server:

psclawmcp start

Running psclawmcp with no arguments starts the server if any CLIs are enabled, or shows help if none are.

Storage

psclawmcp stores only the list of enabled CLIs, in .psclawmcp/config.json under your home directory:

Platform Path
macOS /Users/<you>/.psclawmcp/config.json
Linux /home/<you>/.psclawmcp/config.json
Windows C:\Users\<you>\.psclawmcp\config.json
{
  "tools": ["siteclaw", "logclaw"]
}

Each CLI keeps its own data (databases, caches, reports) in its own location. See each CLI's README.

Configuration

Add psclawmcp to your MCP client config. For Claude Desktop, edit claude_desktop_config.json:

{
  "mcpServers": {
    "psclawmcp": {
      "command": "psclawmcp",
      "args": ["start"]
    }
  }
}

Tools that call an AI provider (feedclaw_digest, wirewatch_analyze, logclaw_summarize, mymailclaw_scan with ai, and the ai_detect option of logclaw) read provider keys the same way the CLI does: from the CLI's own config, or from environment variables. To pass keys through the MCP server's environment, add an env block. Use your client's secret handling rather than pasting keys into shared files:

{
  "mcpServers": {
    "psclawmcp": {
      "command": "psclawmcp",
      "args": ["start"],
      "env": {
        "ANTHROPIC_API_KEY": "<your key>"
      }
    }
  }
}

Available Tools

feedclaw: RSS/Atom feeds and AI digests

Tool Description
feedclaw_init Set up default curated feeds
feedclaw_add Subscribe to a feed by URL
feedclaw_remove Unsubscribe from a feed
feedclaw_list List subscribed feeds
feedclaw_fetch Pull new articles from feeds
feedclaw_digest Generate AI-powered article summary
feedclaw_opml_import Import feeds from OPML file
feedclaw_opml_export Export feeds as OPML

dustclaw: disk space analysis

Tool Description
dustclaw_overview Disk usage, free space, top directories
dustclaw_scan Ranked list of largest files and folders
dustclaw_wasteland Find known dev/OS space wasters
dustclaw_clean Dry run: what a cleanup would free. Run dustclaw_wasteland first.

driftclaw: deployment version drift

Tool Description
driftclaw_report Full version matrix across all environments
driftclaw_check Check a single service across environments
driftclaw_drift Show only services with version drift

dietclaw: codebase health monitoring

Tool Description
dietclaw_scan Project health report
dietclaw_deps Dependency analysis, outdated, unused, heavy
dietclaw_trend Health trends over time

wirewatch: network traffic monitoring

Tool Description
wirewatch_start Start the background capture daemon
wirewatch_stop Stop the background capture daemon
wirewatch_status Daemon status, uptime, and connection count
wirewatch_list List captured connections with filters
wirewatch_show Full details for a single connection by ID
wirewatch_analyze Send recent connections to AI for anomaly detection
wirewatch_analyses List past AI analyses with risk levels
wirewatch_db_stats Database statistics
wirewatch_config_show Current configuration. API keys show as set/not set.

siteclaw: Lighthouse performance history

Every siteclaw tool takes a required dir: the directory holding sites.json, siteclaw.config.json, and siteclaw.db. siteclaw resolves these relative to its working directory, and the MCP server's own working directory is wherever the client launched it.

Tool Description
siteclaw_check Run Lighthouse against a site and store the result (up to 5 minute timeout)
siteclaw_list Latest score for every site in sites.json
siteclaw_history Score history and trend for one site
siteclaw_correlate Render-blocking resources shared across sites

logclaw: log investigation

logclaw has no JSON mode, so output is plain text. A file path is required.

Tool Description
logclaw_read Parse a log file: format detection, grouped stack traces, repeats
logclaw_summarize AI digest of what went wrong, likely root cause, entries to inspect

canary: OpenClaw channel delivery health

Requires the openclaw CLI on PATH. Runs read-only openclaw diagnostics and returns the JSON report, including on a fail verdict. Without output, the report is written to a temp directory that is removed afterwards.

Tool Description
canary_check Pass/warn/fail verdict, stages, and findings for a channel

mymailclaw: email scanning and categorizing

Accounts are added with mmclaw accounts add in a terminal (it is interactive). The cleanup tools are dry runs only.

Tool Description
mymailclaw_accounts_list Configured accounts (id, type, label, email). No credentials.
mymailclaw_scan Fetch and categorize emails into the local database (5 min timeout)
mymailclaw_list Scanned emails by category or account
mymailclaw_clean Dry run: emails a cleanup would delete or archive, as a plan file
mymailclaw_db_stats Local database summary
mymailclaw_db_clean Dry run: records that would be removed from the local database
mymailclaw_unsubscribe Unsubscribe links found in scanned emails. Does not follow them.

asciiclaw and unasciiclaw: ASCII art

Tool Description
asciiclaw_convert Image (PNG, JPG, WebP, GIF) to ASCII art, as text
unasciiclaw_convert ASCII art text file to an image file at output path

Safety

psclawmcp only exposes commands that read data or preview a change. These commands exist in the CLIs but are deliberately not exposed:

CLI Not exposed Why
dustclaw clean --force deletes files
wirewatch delete, config set deletes captured data, changes config
wirewatch monitor interactive terminal UI
logclaw --follow never exits
mymailclaw clean --execute, db clean --execute, db remove, unsubscribe --execute deletes or archives email, follows links
mymailclaw accounts add, accounts remove interactive login, changes accounts

Your MCP client may also ask you to approve each tool call. Keep that on for tools that call paid AI providers.

Roadmap

  • Destructive commands, opt-in. Expose the commands in the Safety table behind three safeguards: off by default and enabled per CLI (for example psclawmcp add mymailclaw --allow-destructive), MCP destructiveHint/readOnlyHint annotations on every tool, and a preview-then-confirm flow where the destructive call only acts on what a dry run showed. Note that mmclaw clean --execute skips its own confirmation prompt in --json mode, so this must be enforced in psclawmcp.
  • JSON output in more CLIs. dustclaw clean, ww start/stop/status, ww config show, logclaw, and oc-canary (stdout) return plain text today. Adding --json upstream would give clients structured data.
  • Real-CLI integration tests. Unit tests mock the runner. A CI job that runs each tool against the real CLI would catch argument and output mismatches.
  • HTTP transport for remote hosting, alongside stdio.

Adding a New Tool

Create a file in src/tools/, for example src/tools/newclaw.ts:

import { z } from "zod";
import { runTool } from "../runner.js";
import type { ToolDef } from "./types.js";

const BIN = "newclaw";

export const tools: ToolDef[] = [
  {
    name: "newclaw_scan",
    title: "Scan Something",
    description: "What this tool does.",
    inputSchema: z.object({
      path: z.string().optional().describe("Target path"),
    }),
    run: async (args) => {
      const cmd = ["scan"];
      if (args.path) cmd.push(String(args.path));
      return runTool(BIN, cmd);
    },
  },
];

runTool appends --json to the arguments. Pass options as a third argument when needed:

Option Default Use
json true false for commands without a JSON mode
cwd none for CLIs that read config or data relative to the cwd
timeoutMs 60000 for long-running commands

Then register it in two places. The tool name prefix (newclaw_) must match the registry name, because the server enables tools by that prefix:

// src/tools/index.ts
import { tools as newclawTools } from "./newclaw.js";

export const allTools: ToolDef[] = [
  // ...existing tools
  ...newclawTools,
];

// src/registry.ts
{ name: "newclaw", description: "what newclaw does" },

Before writing the wrapper, read the CLI's commander definitions to confirm where --json is defined and whether the command exits on its own.

Testing

pnpm test

Current bar:

  • 133 tests across 13 test files
  • every tool's argument mapping verified against the CLI's flags
  • dry-run tools verified to never pass --force or --execute
  • registry and tool prefixes verified to match
  • runner tests cover argument order, exit codes, timeouts, and missing binaries, with mocked child_process

Development

pnpm install
pnpm build
pnpm dev        # run with tsx
pnpm lint
pnpm test

Related

  • feedclaw RSS/Atom feed reader and AI digest builder
  • dustclaw Disk space analysis
  • driftclaw Deployment version drift detection
  • dietclaw Codebase health monitoring
  • wirewatch Network traffic monitoring and AI anomaly detection
  • siteclaw Lighthouse performance history across sites
  • logclaw Log investigator with AI summaries
  • openclaw-channel-canary OpenClaw chat channel delivery health
  • mymailclaw Email scanner, categorizer, and cleaner
  • asciiclaw Image to ASCII art
  • unasciiclaw ASCII art to image

License

See MIT

About

MCP server for the OpenClaw CLI ecosystem. Exposes feedclaw, dustclaw, driftclaw, dietclaw, and wirewatch as tools over the Model Context Protocol, so AI assistants can use them directly.

Topics

clidietclawdriftclawdustclawfeedclawmcpnetwork-monitoringopenclawtypescriptwirewatch

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.