klaridian()
How-to guides

Transports

stdio vs. streamable-http, and when to use each.

stdio (the default)

npx klaridian generate --spec ./api.yaml --out ./my-server

The generated server talks to its client over standard input/output. This is what most MCP clients (Claude Desktop, Claude Code, and others) expect when they spawn a server as a local process. Use this unless you have a reason not to.

streamable-http

npx klaridian generate --spec ./api.yaml --out ./my-server \
  --transport streamable-http --port 3000

The server listens on a network port instead. Use this when the server needs to run somewhere other than the client's own machine—for example, behind OAuth (see OAuth 2.1). This requires streamable-http—it doesn't work with stdio.

Which one should I pick?

Start with stdio. Switch to streamable-http only when you need remote access or OAuth.

On this page