lunarpulse

Mcp Integration

AI 智慧體v0.1.1
作者:lunarpulse更新於 2026-05-11共 2 個版本 · 最新版本釋出於 2026-02-02openclaw-mcp-plugin@clawhub_lunarpulse/openclaw-mcp-plugin
工具呼叫#Database#Weather

據 AlphaMoat 統計,截至 2026-10,Mcp Integration 累計下載 21,140 次、獲 20 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 1,327 位,在「AI 智慧體」分類(1,632 個)中排名第 188 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
2.1萬
星標
20
全站下載量排名
#1,327
全站前 13% · 「AI 智慧體」前 12%
平台累計下載星標評論
ClawHub ↗9136181
SkillHub ↗2.1萬20—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

先列出已連線伺服器提供的工具,再用呼叫介面執行具體工具,工具標識採用 server:toolname 的格式,按冒號拆分即可得到伺服器與工具名。它適合統一接入法律庫、API 與資料庫等外部能力,具體伺服器需自行配置。 已連線的 MCP 伺服器可能提供讀寫、執行命令或存取資料等能力;呼叫前核對伺服器、工具與參數,寫入操作先確認。

資料釋出於 2026-10-27

可以用來做什麼

  • 檢視當前接入了哪些 MCP 工具
  • 按標識呼叫某個伺服器的工具並傳參

什麼時候用

  • 接入多個 MCP 服務後想統一呼叫時
  • 不確定有哪些外部工具可用時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

先列出當前可用的工具,再說說哪些能查資料庫
用這個伺服器上的工具查一條記錄

月度資料趨勢

累計下載2.1萬
76851.5萬2.2萬2026-03 · 累計下載 86822026-05 · 累計下載 1萬2026-06 · 累計下載 1萬2026-07 · 累計下載 1.1萬2026-08 · 累計下載 1.1萬2026-09 · 累計下載 1.2萬2026-10 · 累計下載 2.1萬26-0326-0926-10
星標20
1618202026-03 · 星標 162026-05 · 星標 192026-06 · 星標 192026-07 · 星標 192026-08 · 星標 192026-09 · 星標 192026-10 · 星標 2026-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-102.1萬—20
2026-091.2萬—19
2026-081.1萬+1.3%19
2026-071.1萬+3.1%19
2026-061萬+2.9%19
2026-051萬—19
2026-038682—16

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

7.1 KB · ClawHub v0.1.1
---
name: mcp-integration
description: Use Model Context Protocol servers to access external tools and data sources. Enable AI agents to discover and execute tools from configured MCP servers (legal databases, APIs, database connectors, weather services, etc.).
license: MIT
---

# MCP Integration Usage Guide

## Overview
展開全部(共 306 行)
Use the MCP integration plugin to discover and execute tools provided by external MCP servers. This skill enables you to access legal databases, query APIs, search databases, and integrate with any service that provides an MCP interface.

The plugin provides a unified `mcp` tool with two actions:
- `list` - Discover available tools from all connected servers
- `call` - Execute a specific tool with parameters

---

# Process

## 🔍 Phase 1: Tool Discovery

### 1.1 Check Available Tools

**Always start by listing available tools** to see what MCP servers are connected and what capabilities they provide.

**Action:**
```
{
  tool: "mcp",
  args: {
    action: "list"
  }
}
```

**Response structure:**
```json
[
  {
    "id": "server:toolname",
    "server": "server-name",
    "name": "tool-name", 
    "description": "What this tool does",
    "inputSchema": {
      "type": "object",
      "properties": {...},
      "required": [...]
    }
  }
]
```

### 1.2 Understand Tool Schemas

For each tool, examine:
- **id**: Format is `"server:toolname"` - split on `:` to get server and tool names
- **description**: Understand what the tool does
- **inputSchema**: JSON Schema defining parameters
  - `properties`: Available parameters with types and descriptions
  - `required`: Array of mandatory parameter names

### 1.3 Match Tools to User Requests

Common tool naming patterns:
- `search_*` - Find or search operations (e.g., `search_statute`, `search_users`)
- `get_*` - Retrieve specific data (e.g., `get_statute_full_text`, `get_weather`)
- `query` - Execute queries (e.g., `database:query`)
- `analyze_*` - Analysis operations (e.g., `analyze_law`)
- `resolve_*` - Resolve references (e.g., `resolve_citation`)

---

## 🎯 Phase 2: Tool Execution

### 2.1 Validate Parameters

Before calling a tool:
1. Identify all required parameters from `inputSchema.required`
2. Verify parameter types match schema (string, number, boolean, array, object)
3. Check for constraints (minimum, maximum, enum values, patterns)
4. Ensure you have necessary information from the user

### 2.2 Construct Tool Call

**Action:**
```
{
  tool: "mcp",
  args: {
    action: "call",
    server: "<server-name>",
    tool: "<tool-name>",
    args: {
      // Tool-specific parameters from inputSchema
    }
  }
}
```

**Example - Korean legal search:**
```
{
  tool: "mcp",
  args: {
    action: "call",
    server: "kr-legal",
    tool: "search_statute",
    args: {
      query: "연장근로 수당",
      limit: 5
    }
  }
}
```

### 2.3 Parse Response

Tool responses follow this structure:
```json
{
  "content": [
    {
      "type": "text",
      "text": "JSON string or text result"
    }
  ],
  "isError": false
}
```

For JSON responses:
```javascript
const data = JSON.parse(response.content[0].text);
// Access data.result, data.results, or direct properties
```

---

## 🔄 Phase 3: Multi-Step Workflows

### 3.1 Chain Tool Calls

For complex requests, execute multiple tools in sequence:

**Example - Legal research workflow:**
1. **Search** - `search_statute` to find relevant laws
2. **Retrieve** - `get_statute_full_text` for complete text
3. **Analyze** - `analyze_law` for interpretation
4. **Precedents** - `search_case_law` for related cases

Each step uses output from the previous step to inform the next call.

### 3.2 Maintain Context

Between tool calls:
- Extract relevant information from each response
- Use extracted data as parameters for subsequent calls
- Build up understanding progressively
- Present synthesized results to user

---

## ⚠ Phase 4: Error Handling

### 4.1 Common Errors

**"Tool not found: server:toolname"**
- Cause: Server not connected or tool doesn't exist
- Solution: Run `action: "list"` to verify available tools
- Check spelling of server and tool names

**"Invalid arguments for tool"**
- Cause: Missing required parameter or wrong type
- Solution: Review `inputSchema` from list response
- Ensure all required parameters provided with correct types

**"Server connection failed"**
- Cause: MCP server not running or unreachable
- Solution: Inform user service is temporarily unavailable
- Suggest alternatives if possible

### 4.2 Error Response Format

Errors return:
```json
{
  "content": [{"type": "text", "text": "Error: message"}],
  "isError": true
}
```

**Handle gracefully:**
- Explain what went wrong clearly
- Don't expose technical implementation details
- Suggest next steps or alternatives
- Don't retry excessively

---

# Complete Example

## User Request: "Find Korean laws about overtime pay"

### Step 1: Discover tools
```
{tool: "mcp", args: {action: "list"}}
```

Response shows `kr-legal:search_statute` with:
- Required: `query` (string)
- Optional: `limit` (number), `category` (string)

### Step 2: Execute search
```
{
  tool: "mcp",
  args: {
    action: "call",
    server: "kr-legal",
    tool: "search_statute",
    args: {
      query: "연장근로 수당",
      category: "노동법",
      limit: 5
    }
  }
}
```

### Step 3: Parse and present
```javascript
const data = JSON.parse(response.content[0].text);
// Present data.results to user
```

**User-facing response:**
```
Found 5 Korean statutes about overtime pay:

1. 근로기준법 제56조 (연장·야간 및 휴일 근로)
   - Overtime work requires 50% premium
   
2. 근로기준법 제50조 (근로시간)
   - Standard working hours: 40 hours per week

Would you like me to retrieve the full text of any statute?
```

---

# Quick Reference

## List Tools
```
{tool: "mcp", args: {action: "list"}}
```

## Call Tool
```
{
  tool: "mcp",
  args: {
    action: "call",
    server: "server-name",
    tool: "tool-name",
    args: {param1: "value1"}
  }
}
```

## Essential Patterns

**Tool ID parsing:** `"server:toolname"` → split on `:` for server and tool names

**Parameter validation:** Check `inputSchema.required` and `inputSchema.properties[param].type`

**Response parsing:** `JSON.parse(response.content[0].text)` for JSON responses

**Error detection:** Check `response.isError === true`

---

# Reference Documentation

## Core Documentation

- **Plugin README**: [README.md](README.md) - Installation and configuration
- **Real Example**: [REAL_EXAMPLE_KR_LEGAL.md](docs/REAL_EXAMPLE_KR_LEGAL.md) - Working kr-legal setup
- **API Reference**: [API.md](docs/API.md) - Technical API details
- **Configuration**: [CONFIGURATION.md](docs/CONFIGURATION.md) - Server configuration guide
- **Troubleshooting**: [TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) - Common issues and solutions

## Usage Examples

- **Examples Collection**: [EXAMPLES.md](docs/EXAMPLES.md) - 13 real-world examples including:
  - Legal research workflows
  - Database queries
  - Weather service integration
  - Multi-step complex workflows
  - Error handling patterns

---

**Remember:** Always start with `action: "list"` when uncertain about available tools.

「AI 智慧體」分類下的熱門技能

lunarpulse 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。