remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Available as a GitHub repository that can be cloned and installed, with references to GitHub issues that the tool addresses.
Runs as a Node.js application, enabling the chaining of multiple MCP tools in sequence with result passing between tools.
Supports XPath queries on XML content through the mcp_xpath_xpath tool, enabling extraction of specific data from XML documents.
MCP 工具链
一个 MCP(模型上下文协议)服务器,用于链接调用其他 MCP 工具,通过允许顺序执行工具并传递结果来减少令牌使用量。旨在解决https://github.com/modelcontextprotocol/specification/issues/215问题
类似 JSON 路径的 Step 函数:
特征
- 按顺序将多个 MCP 工具链接在一起
- 使用
CHAIN_RESULT
占位符将一个工具的结果作为输入传递给另一个工具 - 使用带有
inputPath
和outputPath
参数的 JsonPath 过滤和提取特定数据 - 从已配置的 MCP 服务器自动发现工具
- 与单个工具调用相比,令牌使用量最少
工具
该服务器实现了以下 MCP 工具:
mcp_chain
- 将多个 MCP 服务器链接在一起chainable_tools
- 从所有 MCP 服务器中发现工具,以便可以使用 mcp_chain 工具discover_tools
- 从所有 MCP 服务器重新发现工具
安装
先决条件
- Node.js(v16 或更高版本)
- npm
从 npm 安装
从源代码安装
与 Claude Desktop、Cursor 等一起使用
确保它是最后一个运行的 MCP,否则它将不得不再次运行 DISCOVERY
将以下内容添加到您的claude_desktop_config.json
或mcp.json
中:
如果从 npm 全局安装
如果从源安装
将/path/to/mcp-tool-chainer
替换为您的存储库的实际路径。
示例
链式浏览器和 XPath 工具
将 JsonPath 与 InputPath 和 OutputPath 结合使用
JsonPath 支持
MCP Tool Chainer 现在支持 AWS Step Functions 风格的 InputPath 和 OutputPath 功能:
- inputPath :JsonPath 表达式,用于在传递给工具之前提取输入的特定部分
- outputPath :JsonPath 表达式,用于在传递给下一个工具之前提取输出的特定部分
这些功能仅当输入/输出为有效的 JSON 时才有效。如果 JsonPath 提取失败,则使用原始输入/输出。
有关 JsonPath 语法参考,请参阅JsonPath 语法。
好处
- 减少令牌使用:通过将工具链接在一起,可以避免将大量中间结果发送回 LLM
- 简化的工作流程:通过单个工具调用创建复杂的数据处理管道
- 提高性能:通过最小化 LLM 和工具之间的往返来减少延迟
- 精确的数据流控制:使用 JsonPath 表达式仅提取所需的数据
发展
执照
此 MCP 服务器根据 MIT 许可证获得许可。
This server cannot be installed
MCP(模型上下文协议)服务器,可链接调用其他 MCP 工具,通过允许顺序执行工具并传递结果来减少令牌的使用