Skip to main content

Module server

Module server 

Source
Expand description

MCP server implementation.

Exposes Selfware’s tools and project resources to external AI clients via the Model Context Protocol (JSON-RPC 2.0 over stdio).

The wire framing of each incoming message is auto-detected: newline-delimited JSON-RPC (the MCP stdio spec, protocol 2024-11-05) or LSP-style Content-Length headers (legacy clients). Every response is written in the same framing as the request that produced it.

Structs§

JsonRpcError
JSON-RPC 2.0 error object.
JsonRpcRequest
Incoming JSON-RPC 2.0 request (or notification when id is None).
JsonRpcResponse
Outgoing JSON-RPC 2.0 response.
McpServer
MCP server that exposes Selfware tools and project resources.

Functions§

run_mcp_server
Run the MCP server, reading from stdin and writing to stdout.