首页龙虾技能列表 › Mcp Client — 技能工具

🔌 Mcp Client — 技能工具

v1.0.3

[自动翻译] Model Context Protocol (MCP) client - connect to tools, data sources and services

0· 1,407·6 当前·8 累计
by @nantes (Ivan Cetta)·MIT-0
下载技能包 项目主页
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
medium confidence
The skill appears to implement an MCP client consistent with its description, but there are minor documentation inconsistencies and an inherent risk: connecting to untrusted MCP servers can cause sensitive data (via file:// URIs) to be read/exfiltrated.
评估建议
This skill is internally consistent with being an MCP client, but be cautious before connecting to servers you don't control. An MCP server can expose resources including file:// URIs that cause the server to read local files (server-side) and return them — that can lead to data exposure. Practical steps before installing/using: 1) Prefer only trusted or self-hosted MCP servers; 2) Do not provide sensitive API keys to unknown servers; 3) Run the client in an isolated environment if you need to t...
详细分析 ▾
用途与能力
The Python client (mcp_client.py) implements the advertised MCP operations (connect, list tools, call tool, list/read resources, list prompts) and targets the expected /mcp/* endpoints. Requiring Python and the requests library is proportionate to this purpose.
指令范围
SKILL.md shows how to connect, list tools, call tools, and read resources — matching the client's capabilities. However, SKILL.md's examples reference a PowerShell script (./mcp.ps1) that is not included; the provided CLI is a Python program. The documentation correctly warns about file:// URIs (server-side file reads) but the user-facing examples and a mismatch in script names are inconsistent and could confuse users.
安装机制
No install spec is embedded (instruction-only), and the README suggests installing the single dependency via pip (requests). This is straightforward; there are no opaque downloads or archive extractions in the package itself.
凭证需求
The client can accept an API key (Authorization: Bearer) but the registry metadata declares no required environment variables. Requiring credentials is reasonable for interacting with an MCP server, but the skill doesn't declare a primary env var or secret storage—API keys are optional per the code. No unrelated credentials or config paths are requested.
持久化与权限
The skill does not request permanent presence (always: false) and does not modify other skills or system-wide settings. It performs network calls at runtime but does not persist tokens or change system config.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.32026/2/22

Force rescan - verified working

● 无害

安装命令 点击复制

官方npx clawhub@latest install mcp-client
镜像加速npx clawhub@latest install mcp-client --registry https://cn.clawhub-mirror.com

技能文档

Implementation of the Model Context Protocol (MCP) client for connecting to tools and data sources.

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

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

Usage

Connect to MCP Server

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

List Available Tools

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

Call a Tool

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

List Resources

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

Read a Resource

.\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

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

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务