MCPService
- struct MCPService : struct MCPService
- Bases:
Serves MCP over a stream of request lines.
Description#
Every request runs in a task of its own, which is the whole point: a wait that blocks for thirty seconds must not stop
ping, a second wait, or the cancellation that would end it. Serving them one at a time makes the server's slowest tool its latency for everything.
Guides#
Pages that discuss MCPService.
Members2#
- init(handler:) method
- serve(_:write:) method Reads requests from
linesand writes each answer throughwrite.