praisonai-mcp talk to Claude Desktop, Cursor, and Windsurf over stdin/stdout — reliably, on every platform.
Quick Start
1
Install the host
2
Serve over STDIO
3
Point your MCP client at it
How It Works
The host reads stdin on a dedicated thread and hands lines to the asyncio loop, so the async pipe API is never touched. Reading stdin on a background thread — instead ofloop.connect_read_pipe(sys.stdin) — is why the host runs on Windows ProactorEventLoop + Python 3.13, where the async pipe API raises OSError: [WinError 6] The handle is invalid.
Reliability Guarantees
A malformed line produces this response, and the transport continues:
Best Practices
Platform support
Platform support
STDIO transport runs the same on Linux, macOS, and Windows. On Windows it works under the
ProactorEventLoop on Python 3.13 — no workarounds needed.Backpressure and queue size
Backpressure and queue size
The intake queue is fixed at
1000 lines. When it fills, the reader thread applies backpressure until the loop drains it — the server stays responsive instead of buffering without limit.What happens on malformed input
What happens on malformed input
Invalid UTF-8 or bad JSON is reported as a JSON-RPC
-32700 parse error. The server logs it to stderr and keeps serving; it never exits on bad bytes.What happens on client disconnect
What happens on client disconnect
When stdin closes (client disconnect) or you press Ctrl+C,
stop() enqueues an EOF sentinel that unblocks the reader, so run() exits cleanly without hanging.Related
PraisonAI MCP Server
Heavy MCP host reference and client setup.
MCP Transports
All MCP transport mechanisms compared.
praisonai-mcp Package
Standalone host package guide.
Windows SDK Quickstart
Run the MCP host on Windows.

