Skip to content

Make the MCP Protocol support MCP <-> MCP communication, allow AI to chain MCP execution flows #215

@JayArrowz

Description

@JayArrowz

Feature Request: Direct MPC-to-MPC Communication

Background
Currently, when chaining multiple MPCs (such as Fetch and XPath), the process follows this flow:

  1. AI receives user request
  2. AI invokes Fetch MPC
  3. Fetch MPC returns data to AI
  4. AI processes the data (consuming tokens)
  5. AI invokes XPath MPC with the data
  6. XPath MPC processes and returns results to AI
  7. AI presents final results to user

This creates inefficiencies when handling large datasets:

  • Large web page content from Fetch MPC must pass through the AI model
  • This consumes significant tokens, increasing costs
  • Can exceed token limits, causing failures with large web pages

Proposed Solution
Implement direct MPC-to-MPC communication to optimize data flow:

CopyUser Request → AI → Fetch MPC → XPath MPC → AI → User Response

Instead of:

CopyUser Request → AI → Fetch MPC → AI → XPath MPC → AI → User Response

Benefits

  1. Reduced token usage and costs
  2. Ability to handle larger web pages without hitting token limits
  3. Improved performance and response times
  4. More efficient resource utilization

Implementation Requirements

  • Create a communication protocol between MPCs
  • Allow the AI to specify chained MPC operations
  • Implement data passing mechanisms between MPCs
  • Update documentation for developers on how to create and use chainable MPCs

Use Case Example
A user wants to extract all links from a large website:

  • Current approach: Fetch returns the entire HTML to AI, consuming tokens, then AI must pass this to XPath

  • Proposed approach: AI instructs Fetch MPC to directly pass its output to XPath MPC, bypassing the token-consuming middle step

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions