RAG & Agents Engineering

M40 lab, MCP applications

The same server, started once or ten times.

Larkspur Cloud’s handbook sits behind one stdio MCP server with a retrieve(query, n) tool. A LangGraph agent asks it questions through langchain-mcp-adapters. Pick how the client holds its session, how many questions the user asks and how many retrieval calls the model makes per question. The ledger shows every server process and the JSON-RPC messages it carried.

Client pattern

Questions in the conversation
Tool calls per question
Server starts
Messages
Setup messages
Bytes on the wire

Server processes

ProcessStarted for, then the client’s messagesMsgsBytes
All processes

Recorded with mcp 1.30.0, fastmcp 3.4.11, langchain-mcp-adapters 0.3.2 and LangGraph 1.2.18, through a tap that logs each line on the server’s stdin and stdout. Messages count both directions; bytes are the JSON lines without their newline. The model is scripted, so every run makes exactly the tool calls you set.