liveBook · Manning

Stdio transport

As explained in Build AI-Enhanced Web Apps

Stdio transport is an interprocess communication method that exchanges data through standard input and standard output streams.

Stdio transport exchanges structured messages through standard input and standard output. In a local MCP integration, a client launches the server as a separate Node.js process and communicates without exposing HTTP endpoints. section 12.3.2

A typical request flow is:

  • The MCP client discovers the server's tools and makes them available to an AI model or LangChain agent. section 12.3.2 section 12.5.2
  • The server executes tool logic, such as an external API request, and returns structured MCP-compliant content through stdio. section 12.3.2
  • The transport keeps external API access inside the MCP server, separating it from the model. section 12.3.2

Local joke tool

A Next.js chat application launches a local MCP server over stdio. The server exposes get-chuck-joke, calls api.chucknorris.io, and returns the result; the model accesses only the exposed tool. section 12.3.2

How Build AI-Enhanced Web Apps covers it

How deep it goes
Explains process boundaries, message flow, tool discovery, and API mediation through runnable Vercel AI SDK and LangChain.js integrations.
Examples
Uses a Chuck Norris joke MCP server, a Next.js chat route, Gemini, and streamed tool results rendered in a chat interface.
What you can do after
Build it from scratch by launching a local MCP server, discovering its tools, and routing model requests through stdio.
How it connects
Connects MCP, interprocess communication, JSON-RPC, Next.js API routes, tool calling, Vercel AI SDK, and LangChain.js.

Also explained in

Compare how 3 books explain stdio transport →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI-Enhanced Web Apps. The section links point to the parts of the book it draws on.