Skip to main content
Glama

mcp-tool-chainer

Encadenador de herramientas MCP

Un servidor MCP (Protocolo de Contexto de Modelo) que encadena llamadas a otras herramientas MCP, lo que reduce el uso de tokens al permitir la ejecución secuencial de herramientas con transferencia de resultados. Diseñado para resolver https://github.com/modelcontextprotocol/specification/issues/215

imagen

Función de paso como rutas JSON:

imagen

Características

  • Encadenar varias herramientas MCP juntas en secuencia
  • Pasar resultados de una herramienta como entrada a otra herramienta usando el marcador de posición CHAIN_RESULT
  • Filtrar y extraer datos específicos usando JsonPath con parámetros inputPath y outputPath
  • Detección automática de herramientas desde servidores MCP configurados
  • Uso mínimo de tokens en comparación con llamadas de herramientas individuales

Herramientas

Este servidor implementa las siguientes herramientas MCP:

  1. mcp_chain - Encadenar varios servidores MCP
  2. chainable_tools : descubre herramientas de todos los servidores MCP para que se pueda utilizar la herramienta mcp_chain
  3. discover_tools - Redescubre herramientas de todos los servidores MCP

Instalación

Prerrequisitos

  • Node.js (v16 o posterior)
  • npm

Instalación desde npm

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

Instalación desde la fuente

# 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

Uso con Claude Desktop, Cursor, etc.

ASEGÚRESE DE QUE SEA EL ÚLTIMO MCP EN EJECUTARSE; DE LO CONTRARIO, TENDRÁ QUE EJECUTAR DISCOVERY OTRA VEZ

Agregue lo siguiente a su claude_desktop_config.json o mcp.json :

Si se instala desde npm globalmente

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

Si se instala desde la fuente

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

Reemplace /path/to/mcp-tool-chainer con la ruta real a su repositorio.

imagen

Ejemplos

// 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\"}" } ] });

Uso de JsonPath con InputPath y 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}" } ] });

Compatibilidad con JsonPath

MCP Tool Chainer ahora admite las funciones InputPath y OutputPath del estilo AWS Step Functions:

  • inputPath : expresión JsonPath para extraer partes específicas de la entrada antes de pasarla a una herramienta
  • outputPath : expresión JsonPath para extraer partes específicas de la salida antes de pasar a la siguiente herramienta

Estas funciones solo funcionan cuando la entrada/salida es JSON válido. Si la extracción de JsonPath falla, se utiliza la entrada/salida original.

Para obtener una referencia de sintaxis de JsonPath, consulte Sintaxis de JsonPath .

Beneficios

  • Uso reducido de tokens : al encadenar herramientas, evita enviar grandes resultados intermedios al LLM
  • Flujos de trabajo simplificados : cree canales de procesamiento de datos complejos con una única llamada a la herramienta
  • Rendimiento mejorado : reduzca la latencia al minimizar los viajes de ida y vuelta entre LLM y las herramientas
  • Control preciso del flujo de datos : extraiga solo los datos que necesita con expresiones JsonPath

Desarrollo

# Install dependencies npm install # Start the server node dist/index.js config.json # List available tools node dist/index.js config.json discover_tools

Licencia

Este servidor MCP tiene licencia MIT.


Creado por Third Strand Studio

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Un servidor MCP (Protocolo de contexto de modelo) que encadena llamadas a otras herramientas MCP, lo que reduce el uso de tokens al permitir la ejecución secuencial de herramientas con paso de resultados

  1. Características
    1. Herramientas
      1. Instalación
        1. Prerrequisitos
        2. Instalación desde npm
        3. Instalación desde la fuente
      2. Uso con Claude Desktop, Cursor, etc.
        1. Si se instala desde npm globalmente
        2. Si se instala desde la fuente
      3. Ejemplos
        1. Navegador de cadenas y herramientas XPath
        2. Uso de JsonPath con InputPath y OutputPath
      4. Compatibilidad con JsonPath
        1. Beneficios
          1. Desarrollo
            1. Licencia

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                MCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.
                Last updated -
                4
                3
                TypeScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                MCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.
                Last updated -
                13
                2
                TypeScript
                MIT License
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol (MCP) server that provides a simple sleep/wait tool, useful for adding delays between operations such as waiting between API calls or testing eventually consistent systems.
                Last updated -
                1
                6
                7
                JavaScript
              • A
                security
                A
                license
                A
                quality
                A dynamic service that creates and manages Model Context Protocol (MCP) servers, allowing users to spawn, customize, and control multiple MCP servers as child processes.
                Last updated -
                5
                65
                TypeScript
                MIT License
                • Apple
                • Linux

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/thirdstrandstudio/mcp-tool-chainer'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server