tool chainer.com
tool chainer.com logo

Tool Chainer

Chains multiple MCP tools together in sequence, passing results between tools without sending large intermediate data ba...

Created byApr 22, 2025

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
image
Step function like JSON paths:
image

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
  1. chainable_tools - Discover tools from all MCP servers so the mcp_chain tool can be used
  1. discover_tools - Rediscover tools from all MCP servers

Installation

Prerequisites

  • Node.js (v16 or later)
  • npm

Installing from npm

Installing from source

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

If installed from source

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

Examples

Chain Browser and XPath Tools

Using JsonPath with InputPath and OutputPath

JsonPath Support

MCP Tool Chainer now supports AWS Step Functions-style InputPath and OutputPath features:
  • inputPath: JsonPath expression to extract specific portions of the input before passing to a tool
  • outputPath: JsonPath expression to extract specific portions of the output before passing to the next tool
These features work only when the input/output is valid JSON. If JsonPath extraction fails, the original input/output is used.
For JsonPath syntax reference, see JsonPath Syntax.

Benefits

  • Reduced Token Usage: By chaining tools together, you avoid sending large intermediate results back to the LLM
  • Simplified Workflows: Create complex data processing pipelines with a single tool call
  • Improved Performance: Reduce latency by minimizing round-trips between the LLM and tools
  • Precise Data Flow Control: Extract only the data you need with JsonPath expressions

Development

License

This MCP server is licensed under the MIT License.

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
image
Step function like JSON paths:
image

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
  1. chainable_tools - Discover tools from all MCP servers so the mcp_chain tool can be used
  1. discover_tools - Rediscover tools from all MCP servers

Installation

Prerequisites

  • Node.js (v16 or later)
  • npm

Installing from npm

Installing from source

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

If installed from source

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

Examples

Chain Browser and XPath Tools

Using JsonPath with InputPath and OutputPath

JsonPath Support

MCP Tool Chainer now supports AWS Step Functions-style InputPath and OutputPath features:
  • inputPath: JsonPath expression to extract specific portions of the input before passing to a tool
  • outputPath: JsonPath expression to extract specific portions of the output before passing to the next tool
These features work only when the input/output is valid JSON. If JsonPath extraction fails, the original input/output is used.
For JsonPath syntax reference, see JsonPath Syntax.

Benefits

  • Reduced Token Usage: By chaining tools together, you avoid sending large intermediate results back to the LLM
  • Simplified Workflows: Create complex data processing pipelines with a single tool call
  • Improved Performance: Reduce latency by minimizing round-trips between the LLM and tools
  • Precise Data Flow Control: Extract only the data you need with JsonPath expressions

Development

License

This MCP server is licensed under the MIT License.