MCP 服务器接入与使用
mcp-client-tools
连接并使用 MCP(Model Context Protocol)服务器:包括原生内置客户端、mcporter CLI 桥接和 TouchDesigner MCP。
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 5
- Forks
- 4
01 前言 Front Matter
- name
- mcp-client-tools
- author
- Hermes Agent
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "mcp", "model-context-protocol", "mcporter", "touchdesigner" ], "related_skills": [] } }
- platforms
- [ "linux", "macos", "windows" ]
- description
- Connect to and use MCP (Model Context Protocol) servers: native built-in client, mcporter CLI bridge, and TouchDesigner MCP.
02 资源文件 1
- 参考文档query-patterns.md9.0 KB
03 SKILL.md 正文
MCP Client Tools
Model Context Protocol (MCP) servers expose tools and resources that Hermes can discover and call. There are two ways to use them: the native built-in client (automatic tool discovery) and the mcporter CLI bridge (ad-hoc server interaction).
Native MCP Client
Servers configured in config.yaml are automatically discovered and registered as Hermes tools.
config.yaml
mcp_servers:
filesystem:
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
transport: stdio # or http for remote servers
Discovery
Restart Hermes (or /reset) after adding a server. Tools appear in the toolset.
stdio vs HTTP
- stdio: local subprocess; tools auto-registered; works offline
- HTTP: remote endpoint; useful for shared infrastructure; requires network
mcporter CLI Bridge
Ad-hoc interaction with any MCP server without editing config.yaml.
Install
pip install mcporter
List Servers
mcporter list
Call a Tool
mcporter call <server-name> <tool-name> '{"arg": "value"}'
Configure a New Server
mcporter add <name> --command "npx -y @modelcontextprotocol/server-filesystem /tmp"
mcporter add <name> --url "http://localhost:3000/sse" --transport http
Auth
For servers requiring authentication:
mcporter auth <name> --token "<api-key>"
mcporter auth <name> --header "Authorization: Bearer <token>"
Pitfalls
mcporteronly supports stdio and HTTP transports; SSE is HTTP under the hood- Server process must stay alive for the duration of the session
- JSON args must be single-quoted on shell to prevent interpolation
TouchDesigner MCP
Control a running TouchDesigner instance via the TwoZero MCP server.
Prerequisites
- TouchDesigner running with TwoZero extension loaded
- MCP server configured (native or mcporter)
Common Operations
- Query network structure (
/project,/project/geo1) - Set parameter values
- Trigger cook/render
- Read texture data
Example
# Via native MCP tool (if configured)
touchdesigner_mcp(query="/project/geo1") # Returns node tree
touchdesigner_mcp(set_param={"path": "/project/geo1/tx", "value": 5.0})
Pitfalls
- TouchDesigner must be running before the MCP server starts
- Network paths are case-sensitive
- Cook operations are blocking — large networks may timeout
04 同仓库更多 Skills
网页抓取受阻恢复
blocked-page-recovery
当抓取失败时使用:403/429 状态码、付费墙(paywall)、WAF、机器人验证墙(bot wall)。
软件实施计划编写
writing-plans
在创建或更新可执行的软件计划时使用。除非用户明确要求将计划注册到 Doct,否则请将计划保留为本地文件。
测试驱动开发
test-driven-development
TDD:强制执行「红-绿-重构」(RED-GREEN-REFACTOR)循环,先写测试再写代码。
系统化根因调试
systematic-debugging
四阶段根因调试:先理解缺陷,再着手修复。
技术预研验证
spike
在正式构建前,通过一次性(可丢弃的)实验来验证某个想法。
代码变更并行清理精简
simplify-code
并行使用 3 个智能体(agent)对近期代码变更进行清理精简。