LO

lunarpulse/openclaw-mcp-plugin

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

18 stars 11 forks 质量 49 趋势 22

启用使用 mcp 的可远程流媒体 http

概览

- 连接到MCP服务器,并在OpenClaw内部无缝地使用其工具。 这个插件使OpenClaw能够连接到任何MCP(模式上下文协议)服务器,并将其工具暴露给AI代理. 它执行MCP Streamable HTTP运输规格,并提供调用外部MCP工具的统一接口. QQ 请参看 REAL EXAMPLE KR LEGAL. md , 以 kr- legal- search (不需要 API 密钥 !) 进行完整, 测试的配置 。 QQ - 完全支持 MCP Streamable HTTP 与 Server-Sent Eventions QQ - 从 MCP 服务器自动发现并注册工具 QQ - 同步连接多个 MCP 服务器 QQ - 所有 MCP 工具通过单个 mcp 工具可访问 QQ - Robust 错误处理和记录 - :版本2026.1.0或以上 - : 18.0.0或以上 - :任何具有HTTP运输功能的符合MCP的服务器 配置后,插件会注册一个单一的mcp工具,提供对所有已连接的MCP服务器的访问.

概述(AI 翻译)

** OpenClaw 的模型上下文协议集成** - 连接到 MCP 服务器并在 OpenClaw 内无缝地使用其工具.

□ □ □ 概览

这个插件使OpenClaw能够连接到任何MCP(模式上下文协议)服务器,并将其工具暴露给AI代理. 它执行MCP Streamable HTTP运输规格,并提供调用外部MCP工具的统一接口.

** real Working 示例:** 见REAL EXAMPLE KR LEGAL.md 完整,测试的配置有kr-legal-search(不需要API密钥!)!.

关键特性

HTTP/SSE Transport - 完全支持带有服务器-恒定事件的可流式HTTP ** 动态工具发现 - 从MCP服务器自动发现并注册工具 ** 多服务器支持** - 同步连接多个MCP服务器 ** ** 统一接口** - 通过单一的[T0]工具可访问的所有MCP工具 ** 错误处理** - 有力的错误处理和记录

□□ 先决条件

  • ** OpenClaw**:版本2026.1.0或以上
  • 节点.js:18.0.0或以上
  • MCP服务器: HTTP 传输中符合 MCP 的服务器

□ 安装

方法1:通过OpenClaw扩展

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

OpenClaw MCP Integration Plugin

Model Context Protocol (MCP) integration for OpenClaw - Connect to MCP servers and use their tools seamlessly within OpenClaw.

🎯 Overview

This plugin enables OpenClaw to connect to any MCP (Model Context Protocol) server and expose its tools to AI agents. It implements the MCP Streamable HTTP transport specification and provides a unified interface for calling external MCP tools.

✅ Real Working Example: See REAL_EXAMPLE_KR_LEGAL.md for a complete, tested configuration with kr-legal-search (no API key required!).

Key Features

✅ HTTP/SSE Transport - Full support for MCP Streamable HTTP with Server-Sent Events
✅ Dynamic Tool Discovery - Automatically discovers and registers tools from MCP servers
✅ Multi-Server Support - Connect to multiple MCP servers simultaneously
✅ Unified Interface - All MCP tools accessible through a single mcp tool
✅ Error Handling - Robust error handling and logging

📋 Prerequisites

  • OpenClaw: Version 2026.1.0 or higher
  • Node.js: 18.0.0 or higher
  • MCP Server: Any MCP-compliant server with HTTP transport

🚀 Installation

Method 1: Via OpenClaw Extensions

# Clone into OpenClaw extensions directory
cd ~/.openclaw/extensions/
git clone https://github.com/yourorg/mcp-integration.git

# Install dependencies
cd mcp-integration
npm install

# Restart OpenClaw
openclaw gateway restart

Method 2: Manual Installation

# Clone repository
git clone https://github.com/yourorg/mcp-integration.git
cd mcp-integration

# Install dependencies
npm install

# Link to OpenClaw
ln -s $(pwd) ~/.openclaw/extensions/mcp-integration

# Restart OpenClaw
openclaw gateway restart

⚙️ Configuration

Basic Configuration

Add to ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "mcp-integration": {
        "enabled": true,
        "config": {
          "enabled": true,
          "servers": {
            "example-server": {
              "enabled": true,
              "transport": "http",
              "url": "http://localhost:3000/mcp"
            }
          }
        }
      }
    }
  }
}

Configuration Schema

{
  enabled: boolean;              // Enable/disable plugin (default: true)
  servers: {
    [serverName: string]: {
      enabled: boolean;          // Enable/disable this server (default: true)
      transport: "http";         // Transport type (currently only http supported)
      url: string;               // Server URL (e.g., "http://localhost:3000/mcp")
    }
  }
}

Multiple Servers Example

{
  "plugins": {
    "entries": {
      "mcp-integration": {
        "enabled": true,
        "config": {
          "enabled": true,
          "servers": {
            "kr-legal": {
              "enabled": true,
              "transport": "http",
              "url": "http://localhost:3000/mcp"
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →