TM

thirdstrandstudio/mcp-tool-chainer

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

57 stars 10 forks 品質 66 トレンド 13MIT

MCP (Model Context Protocol) サーバは、他の MCP ツールへの呼び出しをチェーンし、結果を渡すことで、トークンの使用量を削減します。 [https://github.を解決する設計

概要

MCP (Model Context Protocol) サーバは、他の MCP ツールへの呼び出しをチェーンし、結果を渡すことで、トークンの使用量を削減します。 [https://github.com/modelcontextprotocol/specification/issues/215を解決する設計 - チェイン RESULTプレースホルダーを使用して別のツールに入力する1つのツールから結果を渡す - 入力パスと出力パスパラメータを使用してJsonPathを使用して特定のデータをフィルタリングし、抽出する - 構成されたMCPサーバーからの自動ツール検出 - 個々のツールコールと比較して最小トークンの使用量 このサーバーでは、次のMCPツールを実行します。 1。 mcp chain - 複数のMCPサーバーを一緒にチェーン2.chainable tools - すべてのMCPサーバーからツールを発見し、mcp chainツールを使用することができます3. Discovery tools - すべてのMCPサーバーからRediscoverツール それが実行するために最速のMCPです 他、それは、ディスカバリー・アグインを実行するために持っている claude desktop config.json または mcp に以下を追加します.

概要(AI 翻訳)

MCP (Model Context Protocol) サーバは、他の MCP ツールへの呼び出しをチェーンし、結果を渡すことで、トークンの使用量を削減します。 [https://github.com/modelcontextprotocol/specification/issues/215を解決する設計

JSON パスのようなステップ機能:

##特徴

  • 複数のMCPツールをシーケンスでチェーン
  • CHAIN_RESULT プレースホルダーを使用して別のツールに入力として 1 つのツールから結果を渡す
  • JsonPath を使用して特定のデータを inputPath および [outputPath] パラメータでフィルタリングし、抽出する
  • 構成されたMCPサーバーからの自動ツールの検出
  • 個々のツールコールと比較して最小トークンの使用量

ツール

このサーバーでは、次のMCPツールを実行します。

  1. [mcp_chain - 複数のMCPサーバーを一緒にチェーン
  2. [[chainable_tools] - MCPサーバーからツールを発見するので、mcp chainツールが使用できる
  3. [discover_tools - すべてのMCPサーバーからRediscoverツール

インストール

前提条件

  • Node.js(v16以降)
  • 夜

##npmからインストールする

ソースからインストールする

Claudeデスクトップ、カーソル等との使用

それが実行するために最速のMCPです 他、それは、ディスカバリー・アグインを実行するために持っている

`claude desktop config に以下を追加します.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Tool Chainer

An MCP (Model Context Protocol) server that chains calls to other MCP tools, reducing token usage by allowing sequential tool execution with result passing. Designed to solve https://github.com/modelcontextprotocol/specification/issues/215

Step function like JSON paths:

Features

  • Chain multiple MCP tools together in sequence
  • Pass results from one tool as input to another tool using CHAIN_RESULT placeholder
  • Filter and extract specific data using JsonPath with inputPath and outputPath parameters
  • Automatic tool discovery from configured MCP servers
  • Minimal token usage compared to individual tool calls

Tools

This server implements the following MCP tools:

  1. mcp_chain - Chain together multiple MCP servers
  2. chainable_tools - Discover tools from all MCP servers so the mcp_chain tool can be used
  3. discover_tools - Rediscover tools from all MCP servers

Installation

Prerequisites

  • Node.js (v16 or later)
  • npm

Installing from npm

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

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

Installing from source

# 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

Usage with Claude Desktop, Cursor etc

ENSURE IT IS THE LAST MCP TO RUN OTHERWISE IT WILL HAVE TO RUN DISCOVERY AGAIN

Add the following to your claude_desktop_config.json or mcp.json:

If installed from npm globally

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

If installed from source

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

Replace /path/to/mcp-tool-chainer with the actual path to your repository.

Examples

Chain Browser and XPath Tools

// 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",
GitHub で README 全文を見る

インストール

npx -y @thirdstrandstudio/mcp-tool-chainer `claude_desktop_config.json` or `mcp.json`
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

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