lunarpulse

mcp-adapter

AI 智能体v0.1.0
作者:lunarpulse更新于 2026-05-18@clawhub_lunarpulse/mcp-adapter
Agent 框架工具调用#Database#Weather

据 AlphaMoat 统计,截至 2026-10,mcp-adapter 累计下载 8,825 次、获 5 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 3,145 位,在「AI 智能体」分类(1,632 个)中排名第 416 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
8,825
星标
5
全站下载量排名
#3,145
全站前 29% · 「AI 智能体」前 26%
平台累计下载星标评论
ClawHub ↗6,2145-
SkillHub ↗8,8254—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

通过已配置的 MCP server 发现并调用外部工具与数据源。调用 MCP 工具可能向外部服务发送数据或修改连接系统;调用前检查服务器、工具、权限和参数。

资料发布于 2026-10-27

可以用来做什么

  • 整理相关信息或执行对应操作

什么时候用

  • 用户需要相关工作流时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

请使用MCP Integration帮助处理这个任务

月度数据趋势

累计下载8,825
5,1347,1169,0982026-05 · 累计下载 5,4072026-06 · 累计下载 5,6032026-07 · 累计下载 5,8952026-08 · 累计下载 6,0762026-09 · 累计下载 6,5822026-10 · 累计下载 8,82526-0526-0926-10
星标5
4552026-05 · 星标 42026-06 · 星标 42026-07 · 星标 42026-08 · 星标 42026-09 · 星标 52026-10 · 星标 526-0526-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-108,825—5
2026-096,582—5
2026-086,076+3.1%4
2026-075,895+5.2%4
2026-065,603+3.6%4
2026-055,407—4

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

7.1 KB · ClawHub v0.1.0
---
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),按月更新。口径说明见数据方法。