OpenClaw integration

Install mog skills and MCP servers into OpenClaw with the openclaw target — one command, no symlinks, correct openclaw.json format.

OpenClaw loads skills from workspace skills/ directories and configures MCP servers in ~/.openclaw/openclaw.json. mog has a first-class openclaw target so installs land where OpenClaw expects them.

Quickstart

Prerequisites: mog CLI installed and authenticated.

1. Mark the project (auto-detection)

Create an empty .openclaw/ directory at your project root so mog install picks the OpenClaw target automatically:

mkdir -p .openclaw

Or skip this and pass --target openclaw on every install.

2. Install a skill

mog install acme/react-testing-skill

With .openclaw/ present, the CLI uses target openclaw and extracts to skills/react-testing-skill/ (workspace skills). OpenClaw discovers SKILL.md there — no symlinks and no --wire.

Explicit target:

mog install acme/react-testing-skill --target openclaw

3. Verify and use

openclaw skills list

Ask your agent to follow the skill, e.g. “write tests for this component using RTL and Vitest”.


Installing skills

Skills install to skills/{slug}/ by default (OpenClaw workspace skills, high precedence).

mog install acme/react-testing-skill --target openclaw

Override path (package authors)

In mog.yaml you can override per target:

install_map:
  openclaw: skills/{slug}/

Global skills

OpenClaw also loads from ~/.openclaw/skills/. To copy a mog-installed skill globally after installing with --target openclaw:

cp -r skills/react-testing-skill ~/.openclaw/skills/react-testing-skill

Configuring MCP servers

MCP entries live under mcp.servers in ~/.openclaw/openclaw.json (not a top-level mcpServers key). mog writes that shape for you:

mog install acme/github-mcp-server --target openclaw

The CLI merges into mcp.servers and preserves the rest of your config. If your file is JSON5 (comments, trailing commas), JSON.parse may fail — convert that section to strict JSON or add the server manually using the shape below.

Example equivalent config:

{
  "mcp": {
    "servers": {
      "acme-github-mcp-server": {
        "command": "npx",
        "args": ["-y", "@acme/github-mcp-server@1.0.0"],
        "transport": "stdio",
        "env": {
          "GITHUB_TOKEN": "ghp_your_token"
        }
      }
    }
  }
}

Restart the gateway so the server is picked up:

openclaw gateway restart

Verify:

openclaw mcp list

HTTP/SSE transport

{
  "mcp": {
    "servers": {
      "acme-remote-server": {
        "url": "https://mcp.acme.dev/sse",
        "headers": {
          "Authorization": "Bearer your_api_key"
        }
      }
    }
  }
}

Skill configuration in openclaw.json

Toggle skills or inject env via skills in ~/.openclaw/openclaw.json (see OpenClaw skills config):

{
  "skills": {
    "entries": {
      "react-testing-skill": {
        "enabled": true
      }
    }
  }
}

With API keys:

{
  "skills": {
    "entries": {
      "react-testing-skill": {
        "enabled": true,
        "env": {
          "SOME_API_KEY": "your_key"
        }
      }
    }
  }
}

Managing packages

mog ls                                    # list installed packages
mog update --dry-run                      # check for updates
mog update                                # apply updates
mog uninstall acme/react-testing-skill    # remove a package

After MCP changes, restart the gateway if tools do not appear.


Project health check

mog doctor

Checks auth, lockfile, install paths, and for OpenClaw file installs that SKILL.md exists under the recorded path.


File layout summary

my-project/
  .openclaw/                    # optional — enables auto target detection
  skills/
    react-testing-skill/
      SKILL.md
      README.md
    another-skill/
      SKILL.md
  mog.lock.json

MCP config is global:

~/.openclaw/openclaw.json

Tips

  • Commit mog.lock.json for reproducible installs; commit skills/ if you want skills in-repo.
  • Auto-detection order — if .cursor/, .claude/, etc. exist, those targets win before .openclaw/. Use --target openclaw when you need OpenClaw explicitly.
  • Skills hot-reload — with OpenClaw’s watcher enabled, updates under skills/ are picked up on the next agent turn.
  • Use mog explain <vendor>/<package> and mog install --preflight before installing.
  • Browse ClawHub for OpenClaw-native skills, or mog.md for cross-platform packages.

On this page