logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-tool-pipeline-orchestrator

Orchestrates sequential execution of several MCP utilities to construct complex workflows, facilitating smooth result propagation and minimizing overall token expenditure via optimized execution paths.

Author

mcp-tool-pipeline-orchestrator logo

thirdstrandstudio

MIT License

Quick Info

GitHub GitHub Stars 51
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

mcpapisworkflowsmcp toolsmcp toolthirdstrandstudio mcp

MCP Tool Pipeline Orchestrator

Explore Third Strand Studio Offerings

An implementation adhering to the Model Context Protocol (MCP) designed to sequence operations from other MCP agents, achieving token conservation by piping output directly as input across sequential invocations. This utility directly addresses the challenge outlined in https://github.com/modelcontextprotocol/specification/issues/215

Workflow Diagram Placeholder

Utilizing constructs analogous to Step Functions for result routing via JSON paths:

Path Mapping Visualization

Key Capabilities

  • Arrange multiple designated MCP utilities into a strict processing sequence.
  • Facilitate inter-utility data transfer using the CHAIN_RESULT token as a dynamic input reference.
  • Incorporate data filtering and precise extraction mechanisms using JsonPath queries via inputPath and outputPath parameters.
  • Automated identification of available utilities hosted on configured MCP endpoint servers.
  • Significant reduction in generated token volume compared to invoking each utility individually.

Implemented Utilities

This orchestration service exposes the following MCP functions:

  1. mcp_chain: The core function to sequence multiple remote MCP endpoints.
  2. chainable_tools: Performs a comprehensive scan across all connected MCP sources to populate the executable toolset for mcp_chain.
  3. discover_tools: Manually triggers a re-scan and refresh of the integrated tool inventory.

Deployment Instructions

Prerequisites

  • Node.js runtime environment (version 16 or newer is required).
  • npm package manager.

Installation via npm Registry

# Installation command
npm install @thirdstrandstudio/mcp-tool-chainer

# Alternatively, execute directly using npx
npx -y @thirdstrandstudio/mcp-tool-chainer

Building from Source Code

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

# Install necessary dependencies
npm install

# Compile the project artifacts
npm run build

Integration with Development Environments (e.g., Claude Desktop, Cursor)

CRITICAL NOTE: This orchestrator MUST be the final MCP registered, or any subsequent invocation will necessitate rerunning the initial tool discovery phase.

Incorporate the following configuration snippet into your claude_desktop_config.json or mcp.json file:

When installed globally via npm

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

When installed from a local source build

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

Ensure that /path/to/mcp-tool-chainer correctly points to the root directory of your local repository clone.

Configuration Diagram Placeholder

Operational Examples

Orchestrating Web Fetch and XPath Extraction

// Sequence: Retrieve a webpage, then selectively pull header content using XPath.
const outcome = 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\"}"
    }
  ]
});

Applying JsonPath for Granular Input/Output Shaping

// Fetch remote data, refine it with an XPath-like tool, and then trim the final payload.
const outcome = 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",     // Input shaping: Isolate the title from the first search result.
      "outputPath": "$.snippets[*].text"     // Output shaping: Only retain text components from subsequent snippets.
    },
    {
      "toolName": "another_tool",
      "toolArgs": "{\"content\": CHAIN_RESULT}"
    }
  ]
});

JsonPath Selection Capabilities

MCP Tool Pipeline Orchestrator now natively supports functionality inspired by AWS Step Functions' InputPath and OutputPath mechanisms:

  • inputPath: A JsonPath expression used to surgically extract required segments from the preceding step's output before supplying them as input to the current utility.
  • outputPath: A JsonPath expression defining which subset of the current utility's result should be retained before being forwarded to the subsequent stage.

These projection features are only active if the source data structure conforms to valid JSON structure. If a specified JsonPath extraction operation fails, the system gracefully defaults to transmitting the entirety of the previous input/output.

For detailed syntax guidance on JsonPath, refer to JsonPath Syntax.

Operational Advantages

  • Token Economy: By forwarding processed intermediate data streams directly, the need to resend large datasets back to the primary Language Model is eliminated.
  • Workflow Simplification: Enables the construction of intricate, multi-stage data processing sequences via a singular tool invocation.
  • Performance Enhancement: Latency is reduced by cutting down on necessary communication back-and-forth cycles between the LLM and external utilities.
  • Data Fidelity Control: Guarantee that only the necessary, pre-filtered data points are passed along using robust JsonPath selectors.

Maintenance

# Install dependencies
npm install

# Launch the server instance
node dist/index.js config.json

# Query for the current roster of available utilities
node dist/index.js config.json discover_tools

Licensing

This MCP server component is distributed under the permissive MIT License.


Developed by Third Strand Studio

WIKIPEDIA: XMLHttpRequest (XHR) defines an application programming interface within JavaScript that facilitates the dispatch of HTTP messages from a web browsing environment to a remote web server. The interface methods enable client-side scripting to initiate server communications asynchronously post-page-load, retrieving supplementary information. XMLHttpRequest forms a foundational part of Asynchronous JavaScript and XML (Ajax) development practices. Before Ajax gained prominence, the dominant methods for server interaction involved standard hyperlink navigation and form submissions, which typically resulted in a full-page refresh.

== Genesis == The foundational concept for XMLHttpRequest was initially devised in the year 2000 by the engineering team responsible for Microsoft Outlook. This concept was subsequently integrated into the Internet Explorer 5 browser release (1999). Note that the original implementation did not utilize the standardized XMLHttpRequest identifier. Instead, developers relied on COM object instantiations such as ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer version 7 (released in 2006), all major browsers adopted the universally recognized XMLHttpRequest identifier. The XMLHttpRequest identifier has since solidified its position as the established convention across all leading browser engines, including Mozilla's Gecko (adopted in 2002), Safari 1.2 (2004), and Opera 8.0 (2005).

=== Formal Standardization === The World Wide Web Consortium (W3C) formally published an initial Working Draft specification for the XMLHttpRequest object on April 5, 2006. Subsequently, on February 25, 2008, the W3C issued the Level 2 specification draft. Level 2 enhancements introduced crucial functionalities such as progress event monitoring, support for cross-origin resource sharing (CORS), and native handling of byte streams. By the close of 2011, the Level 2 specification details were formally merged back into the original primary specification document. Towards the end of 2012, the maintenance and evolution of the specification were transferred to the WHATWG group, which continues to uphold a living document utilizing the Web IDL notation.

== Operational Sequence == Typically, executing a request using XMLHttpRequest involves a well-defined series of programming actions.

  1. Instantiate an XMLHttpRequest utility object by invoking its constructor:
  2. Invoke the method named "open" to delineate the request method type, specify the target Uniform Resource Identifier (URI), and select either blocking (synchronous) or non-blocking (asynchronous) execution mode:
  3. For asynchronous operations, establish an event handler callback function that will be triggered upon any change in the request's state:
  4. Commence the transmission of the request by calling the designated "send" method:
  5. Monitor state transitions via the registered event handler. Upon successful receipt of response data from the server, it is typically aggregated within the "responseText" property. When the object completes processing the entire response, its state transitions to 4, signifying the "done" status. Beyond these fundamental steps, XMLHttpRequest offers extensive configuration options to govern request transmission and response parsing. Custom HTTP header fields can be injected into the request to guide server behavior, and data payloads can be submitted to the server by passing them as an argument to the "send" call. The incoming response can be automatically deserialized from JSON format into a directly manipulable JavaScript object structure, or it can be processed incrementally as data arrives rather than awaiting the complete payload. Furthermore, the ongoing request can be terminated prematurely or configured to timeout if completion is not achieved within a predefined temporal limit.

== Cross-Origin Interactions ==

During the nascent phases of the World Wide Web's development, limitations arose concerning the ability to initiate data transfers between documents residing on different security domains, which led to security vulnerabilities.

See Also

`