Ivan Cetta

Mcp Client

AI 智能体v1.0.3
作者:Ivan Cetta更新于 2026-05-11共 4 个版本 · 最新版本发布于 2026-02-22mcp-client@clawhub_nantes/mcp-client
工具调用

据 AlphaMoat 统计,截至 2026-09,Mcp Client 累计下载 3,801 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 2,775 位,在「AI 智能体」分类(969 个)中排名第 550 位。

累计安装
114
累计下载
3,801
星标
1
全站排名
#2,775
全站前 55% · 「AI 智能体」前 57%
平台累计安装累计下载星标评论
ClawHub ↗1143,5701-
SkillHub ↗1143,8011—

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

这个技能是做什么的

该客户端可连接 MCP 服务器、列出工具、调用工具、读取资源并查看提示模板;资源可能包括文件、数据库和 API。仅连接受信任的服务,调用前先检查可用工具和资源 URI;使用 HTTPS,并避免把 API 密钥直接放在命令行参数中。

资料发布于 2026-10-29

可以用来做什么

  • 连接 MCP 服务器并查看工具列表
  • 调用服务公开的工具
  • 读取受信任服务的资源或提示模板

什么时候用

  • 需要在代理中接入受信任的 MCP 服务时
  • 需要审查服务器提供的工具和资源时

示例提示词

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

连接我指定的受信任 HTTPS MCP 服务器,先列出工具和资源,不要调用任何工具。
读取这个资源 URI 前先说明服务器来源和它可能暴露的数据;不要显示 API 密钥。

月度数据趋势

累计下载3,801
1,4812,7273,9732026-03 · 累计下载 1,6532026-05 · 累计下载 2,7572026-06 · 累计下载 2,9662026-07 · 累计下载 3,3862026-08 · 累计下载 3,4922026-09 · 累计下载 3,80126-0326-09
星标1
0112026-03 · 星标 -2026-05 · 星标 12026-06 · 星标 12026-07 · 星标 12026-08 · 星标 12026-09 · 星标 126-0326-09

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

月份累计下载环比星标
2026-093,801—1
2026-083,492+3.1%1
2026-073,386+14.2%1
2026-062,966+7.6%1
2026-052,757—1
2026-031,653—-

SKILL.md 原文

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

2.8 KB · ClawHub v1.0.3
---
name: mcp-client
version: 1.0.0
description: Model Context Protocol (MCP) client - connect to tools, data sources and services
metadata: {"openclaw": {"emoji": "🔌", "category": "integration", "requires": {"bins": ["python"], "pip": ["requests"]}, "homepage": "https://modelcontextprotocol.io"}}
---

# MCP Client Skill

Implementation of the Model Context Protocol (MCP) client for connecting to tools and data sources.
展开全部(共 117 行)

## What it does

- **Connect to MCP Servers** - Access tools and resources from MCP-enabled services
- **Tool Invocation** - Call tools exposed by MCP servers
- **Resource Access** - Read files, databases, APIs
- **Prompt Templates** - Use structured prompts from MCP servers

## Installation

```powershell
# Install Python dependencies (requests is the only required dependency)
pip install requests
```

## Usage

### Connect to MCP Server

```powershell
.\mcp.ps1 -Action connect -ServerUrl "https://mcp-server.com" -ApiKey "your-key"
```

### List Available Tools

```powershell
.\mcp.ps1 -Action tools -ServerUrl "https://mcp-server.com"
```

### Call a Tool

```powershell
.\mcp.ps1 -Action call -ServerUrl "https://mcp-server.com" -ToolName "search" -Arguments '{"query": "AI agents"}'
```

### List Resources

```powershell
.\mcp.ps1 -Action resources -ServerUrl "https://mcp-server.com"
```

### Read a Resource

```powershell
.\mcp.ps1 -Action read -ServerUrl "https://mcp-server.com" -ResourceUri "file:///data/config.json"
```

## MCP Concepts

- **MCP Server**: Service that exposes tools, resources, and prompts
- **Tools**: Functions the LLM/agent can call
- **Resources**: Data sources (files, APIs, DBs)
- **Prompts**: Pre-defined prompt templates

## API Reference

```
POST /mcp/connect     - Connect to server
GET  /mcp/tools       - List available tools
POST /mcp/call       - Invoke a tool
GET  /mcp/resources  - List resources
GET  /mcp/read       - Read resource
GET  /mcp/prompts    - List prompt templates
```

## Examples

### Python Usage

```python
from mcp_client import MCPClient

client = MCPClient("https://mcp-server.com", api_key="key")

# List tools
tools = client.list_tools()
print(tools)

# Call tool
result = client.call_tool("search", {"query": "quantum"})
print(result)

# Read resource
data = client.read_resource("file:///config.json")
print(data)
```

## ⚠️ Security Warnings

### file:// URI Risk
The MCP protocol allows `file:///path` URIs to read files from the server. **Only connect to trusted MCP servers.** A malicious server could exfiltrate sensitive files.

### Best Practices
- Only use MCP servers you control or trust
- Don't connect to random public MCP servers
- Review what tools/resources are available before using

## Requirements
- Review what tools/resources are available before using

- Python 3.8+
- requests library

## License

MIT

「AI 智能体」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。