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 server reads Content-Length framed JSON-RPC requests from stdin and writes Content-Length framed JSON-RPC responses to stdout. This is the same framing used by LSP (Language Server Protocol).

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.