Skip to content

keoy7am/openclaw-mcp-bootstrap

Repository files navigation

openclaw-mcp-bootstrap

[English] | 繁體中文 | 简体中文

Out-of-the-box MCP (Model Context Protocol) integration for OpenClaw. This project provides automated setup of Sequential Thinking and Context7 MCP servers, including an OpenClaw plugin that invokes Sequential Thinking on every conversation turn.

What This Does

  • Sequential Thinking (adaptive): A plugin that assesses message complexity using 6 universal heuristic signals and routes to one of 5 thinking depth levels (skip, light, standard, deep, intensive). Simple messages like greetings are skipped entirely, saving resources. Complex requests trigger multi-step agent-driven thinking with configurable depth budgets.

  • Context7 (conditional): Configures the Context7 documentation server and provides policy hints so the agent uses it when technical library lookups are needed -- not on every turn.

Quick Start

git clone https://github.com/keoy7am/openclaw-mcp-bootstrap.git
cd openclaw-mcp-bootstrap
chmod +x scripts/*.sh
./scripts/install.sh

The installer will:

  1. Check prerequisites (openclaw, mcporter, node)
  2. Install MCP server packages globally
  3. Configure mcporter.json with both MCP servers
  4. Copy the plugin to your OpenClaw workspace
  5. Register the plugin in openclaw.json
  6. Run verification checks

After installation, restart the gateway:

openclaw gateway restart

Prerequisites

Dependency Version Install
Node.js >= 18 https://nodejs.org/
OpenClaw >= 2026.2.22 npm install -g openclaw@latest
mcporter latest https://github.com/steipete/mcporter
jq any https://jqlang.github.io/jq/

Project Structure

openclaw-mcp-bootstrap/
|-- extensions/
|   +-- seq-deep-integration/      Plugin source
|       |-- index.ts               Hook: before_prompt_build
|       +-- openclaw.plugin.json   Manifest with configSchema
|-- config/
|   +-- mcporter.example.json     MCP server configuration template
|-- scripts/
|   |-- install.sh                Full automated installer
|   |-- configure-mcp.sh          MCP server configuration only
|   +-- verify.sh                 Post-install verification
|-- docs/
|   |-- SETUP-SEQUENTIAL.md       Sequential Thinking setup details
|   |-- SETUP-CONTEXT7.md         Context7 setup details
|   |-- COMPLEXITY-ASSESSMENT.md  Complexity scoring algorithm reference
|   +-- OPENCLAW-JSON-REFERENCE.md  Plugin configuration reference
|-- prompts/
|   +-- agent-mcp-policy.md       Agent prompt templates for MCP usage
|-- README.md                     This file (English)
|-- README.zh-TW.md               Traditional Chinese
|-- README.zh-CN.md               Simplified Chinese
+-- LICENSE                       MIT

How the Plugin Works

The seq-deep-integration plugin registers a before_prompt_build hook:

  1. Extracts the last user message from the conversation
  2. Assesses complexity using 6 universal heuristic signals (message length, question marks, multi-part separators, action verbs, analytical patterns)
  3. Routes to the appropriate depth level (skip / light / standard / deep / intensive) based on a weighted score
  4. For skip: no injection, no MCP call
  5. For light: runs a single-thought pre-analysis via MCP (like v1)
  6. For standard / deep / intensive: injects a [SEQ-ASSESSMENT] tag with depth guidance for the agent to drive multi-step thinking
  7. Optionally suggests Context7 usage when technical keywords are detected

Assessment results are cached (TTL-based dedup) and logged in JSONL format for observability.

Manual Setup

If you prefer to configure manually instead of using the installer:

  1. Install MCP server packages:

    npm install -g @modelcontextprotocol/server-sequential-thinking
    npm install -g @upstash/context7-mcp
  2. Add servers to your mcporter.json:

    ./scripts/configure-mcp.sh --workspace /path/to/workspace
  3. Copy the extension:

    cp -r extensions/seq-deep-integration/ \
      <workspace>/.openclaw/extensions/seq-deep-integration/
  4. Register in openclaw.json:

    {
      "plugins": {
        "allow": ["seq-deep-integration"],
        "entries": {
          "seq-deep-integration": { "enabled": true }
        }
      }
    }
  5. Restart: openclaw gateway restart

Verification

./scripts/verify.sh

Checks: command availability, extension files, mcporter configuration, openclaw.json entries, and MCP server connectivity.

Documentation

Contributing

Contributions are welcome. Please open an issue or pull request.

License

MIT

About

Out-of-the-box Sequential Thinking + Context7 MCP integration for OpenClaw

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors