STDIO transport connects an MCP client and server through standard input and standard output. The client starts the server as a sidecar process, sends MCP requests through its input stream, and receives responses through its output stream. This avoids a separately deployed server and works especially well when the server needs local access, such as a client machine’s filesystem. section 7.2 section 7.3.5
A Spring AI application configures STDIO clients with:
- A connection name under spring.ai.mcp.client.stdio.connections. section 7.2
- A command and args entry that launches the MCP server, such as npx with a filesystem server package or java -jar with a built server JAR. section 7.2 section 7.3.5
- Optional Claude Desktop–style JSON through servers-configuration, using a classpath or file URI. section 7.2
- Strict separation of protocol output from diagnostics: logging and the Spring Boot banner must not write to standard output. section 7.3.3
Filesystem and board-game clients
A client can launch a filesystem MCP server with npx, then expose its tools through a Spring AI ChatClient. Requests such as “List all files,” “Create a file named penguins.txt,” and “Read the file named penguins.txt” demonstrate tool use over STDIO. The same arrangement can launch a board-game database server from a Java JAR, allowing an /ask endpoint to recommend games for four players or a thirty-minute session. section 7.2 section 7.3.5


