Skip to content

Build1 publisher2 min readPublished Updated

MCP collapses M-by-N tool adapters into a single JSON-RPC 2.0 contract

A dev.to walkthrough of MCP internals locates the integration saving in deployment coupling and leaves the residual risk with the host process that validates each tool call and raises the consent prompt.

The Engineer · Build desk

Illustration accompanying MCP collapses M-by-N tool adapters into a single JSON-RPC 2.0 contract

What happened

  • The dev.to walkthrough describes pre-MCP tool integration as point-to-point, where M client runtimes and N tools need a dedicated translation layer for every pair, an O(M x N) curve.
  • In that pattern, a single change to an upstream tool's API schema forces an update and redeploy across all M clients, which the author calls dependency drift.
  • MCP splits the stack into client, host and server, with the host managing server lifecycles, validating tool execution requests and presenting consent prompts to the user.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint Standardising the wire format does not shrink the prompt: a host that still loads every connected server's tool definitions up front spends the same tokens and prefill time it spent with bespoke adapters.
  • cost Each capability now runs as its own supervised process, so adopters pay for lifecycle management and an approval path that an in-process function call never needed.
  • decision Where the privilege boundary sits becomes a host implementation choice, because validation and user approval live in the runtime you ship.
  • exposure Every additional server a host connects widens the set of executable routines that untrusted retrieved text can reach through the model.

Put numbers in the M and the N. Five orchestrator clients and twenty tools is 100 pairwise adapters under the point-to-point pattern the dev.to walkthrough describes [1]. Under one shared contract, each of the twenty-five parties implements the protocol once, so 25 implementations cover the same matrix, a factor of four [1]. Ten clients and fifty tools is 500 against 60 [2]. The ratio climbs toward the smaller of the two counts and never passes it [3]. Maintenance relief only shows up if the contract is the thing that absorbs upstream change, because the specific failure named in the piece is a schema edit forcing a redeploy in all M clients [2].

The three prompt-level costs in the article are stated as architecture, not measured. Static context is the sum of the injected schema sizes [5]. Self-attention cost is quadratic in sequence length [7]. Neither expression cares how a schema reached the prompt. A host that connects six servers and still injects every tool definition at the start of a session [4] pays the prefill it paid with hand-written adapters. Attention dilution survives standardisation for the same reason: the model still sees schemas it does not need, and the author attributes hallucinated parameters and failure to invoke the right tool to exactly that condition [6].

Isolation, in this design, sits in the process layout and not in the wire format. A server is a separate lightweight process, and the host manages its lifecycle [13][12]. Deciding that a tool call is needed belongs to the client [11]. Validating the request and presenting the consent prompt belongs to the host [12]. A consent prompt is a boundary for as long as the user reads it. The attack the article centres on is indirect prompt injection, where instructions arrive inside data the model retrieved and turn into arbitrary shell commands or exfiltration over an outbound socket [8]. The alternative it gives for hosts without a sandboxed protocol is binary: block tool capabilities entirely, or run them with the full privileges of the host process [9].

The text breaks off as it starts to trace the bidirectional JSON-RPC 2.0 message flow through the stack [14][15], so the transport question stays open here. I would adopt the contract for the redeploy problem alone [2]. I would not treat the prompt budget or the injection surface as handled by it, since both depend on what the host injects and what it approves [4][12].

What to watch

  • Whether the full article's transport section specifies stdio versus streamed HTTP, and what each implies for host privilege.
  • Whether host implementations add per-server privilege scoping beyond a per-call consent prompt.
  • Whether clients move to lazy schema loading so static context stops scaling with the number of connected tools.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories