Token导航 LogoToken导航TokenDH.com
MCP tool chainer logo
AI代理stdio官方级别未说明来源级核验

MCP tool chainer

MCP Server

@thirdstrandstudio/mcp-tool-chainer

一个用于链式调用多个MCP工具的服务,通过顺序执行工具并传递结果来减少令牌使用,适用于复杂数据处理流程。

工具数

0

提示词数

0

GitHub Stars

59

资源数

0
数据处理JavaScript自动化

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

thirdstrandstudio

提供方

thirdstrandstudio

最后核验

2026/5/17 20:42

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx -y @thirdstrandstudio/mcp-tool-chainer

详细介绍

MCP工具链

![Visit Third Strand Studio](https://tss.topiray.com/products/mcp-chain)

一种MCP(模型上下文协议)服务器,将调用链接到其他MCP工具,通过允许顺序执行工具并传递结果来减少令牌使用。 旨在解决

image

类似JSON路径的Step函数:

image

特性

  • 按顺序将多个MCP工具连接在一起
  • 使用以下命令将一个工具的结果作为输入传递给另一个工具 CHAIN_RESULT 占位符
  • 使用JsonPath过滤和提取特定数据 inputPathoutputPath 参数
  • 从配置的MCP服务器自动发现工具
  • 与单个工具调用相比,令牌使用量最小

工具

此服务器实现了以下MCP工具:

  1. mcp_chain -将多个MCP服务器链接在一起
  2. chainable_tools -从所有MCP服务器中查找工具,以便使用MCP_chain工具
  3. discover_tools -从所有MCP服务器重新查找工具

安装

先决条件

  • Node.js(v16或更高版本)
  • npm

从npm安装

# Install
npm install @thirdstrandstudio/mcp-tool-chainer

# Or use with npx directly
npx -y @thirdstrandstudio/mcp-tool-chainer

从源代码安装

# Clone the repository
git clone https://github.com/thirdstrandstudio/mcp-tool-chainer.git
cd mcp-tool-chainer

# Install dependencies
npm install

# Build the package
npm run build

与克劳德桌面、光标等一起使用

确保这是最后一个运行的MCP,否则它将不得不再次运行发现

将以下内容添加到您的 claude_desktop_config.jsonmcp.json:

如果从npm全局安装

{
  "mcpServers": {
    "mcp_tool_chainer": {
      "command": "npx",
      "args": ["-y", "@thirdstrandstudio/mcp-tool-chainer", "`claude_desktop_config.json` or `mcp.json`"],
      "env": {}
    }
  }
}

如果从源安装

{
  "mcpServers": {
    "mcp_tool_chainer": {
      "command": "node",
      "args": ["/path/to/mcp-tool-chainer/dist/index.js", "`claude_desktop_config.json` or `mcp.json`"],
      "env": {}
    }
  }
}

替换 /path/to/mcp-tool-chainer 使用存储库的实际路径。

image

例子

链浏览器和XPath工具

// Fetch a webpage and then extract specific content with XPath
const result = await callTool("mcp_chain", { 
  "mcpPath": [
    {
      "toolName": "mcp_browser_mcp_fetch_url",
      "toolArgs": "{\"url\": \"https://example.com\"}"
    },
    {
      "toolName": "mcp_xpath_xpath",
      "toolArgs": "{\"xml\": CHAIN_RESULT, \"query\": \"//h1\"}"
    }
  ]
});

使用JsonPath与InputPath和OutputPath

// Fetch a webpage, extract specific content with XPath, then extract part of the result
const result = await callTool("mcp_chain", { 
  "mcpPath": [
    {
      "toolName": "mcp_fetch_fetch",
      "toolArgs": "{\"url\": \"https://api.example.com/data\"}"
    },
    {
      "toolName": "web_search",
      "toolArgs": "{\"search_term\": CHAIN_RESULT}",
      "inputPath": "$.results[0].title",     // Extract only the first result's title from previous output
      "outputPath": "$.snippets[*].text"     // Extract only the text snippets from the search results
    },
    {
      "toolName": "another_tool",
      "toolArgs": "{\"content\": CHAIN_RESULT}"
    }
  ]
});

JsonPath支持

MCP工具链现在支持AWS步骤函数风格的InputPath和OutputPath功能:

  • inputPath:JsonPath表达式,用于在传递给工具之前提取输入的特定部分
  • 输出路径:JsonPath表达式,用于在传递给下一个工具之前提取输出的特定部分

这些功能仅在输入/输出是有效的JSON时才起作用。如果JsonPath提取失败,则使用原始输入/输出。

有关JsonPath语法参考,请参阅 JsonPath语法.

益处

  • 减少令牌使用:通过将工具链接在一起,您可以避免将大型中间结果发送回LLM
  • 简化的工作流程:使用单个工具调用创建复杂的数据处理管道
  • 改进的性能:通过最大限度地减少LLM和工具之间的往返来减少延迟
  • 精确的数据流控制:使用JsonPath表达式仅提取所需的数据

发展

# Install dependencies
npm install

# Start the server
node dist/index.js config.json

# List available tools
node dist/index.js config.json discover_tools

许可证

此MCP服务器根据MIT许可证获得许可。

______________________________________________________________________

由...创建 第三斯特兰德工作室

目录标签

目录标签

数据处理JavaScript自动化工具链本地部署MCP协议JSON路径

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@thirdstrandstudio/mcp-tool-chainer

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP