AshAi.Mcp.Server (ash_ai v0.2.2)
View SourceImplementation of the Model Context Protocol (MCP) RPC functionality.
This module handles HTTP requests and responses according to the MCP specification, supporting both synchronous and streaming communication patterns. It also handles the core JSON-RPC message processing for the protocol.
Summary
Functions
Get the MCP server name
Get the MCP server version
Handle HTTP DELETE request for session termination
Process an HTTP GET request to open an SSE stream
Process an HTTP POST request containing JSON-RPC messages
Create a standard JSON-RPC error response
Parse the JSON-RPC request
Process a single JSON-RPC message
Send an SSE event over the chunked connection
Functions
Get the MCP server name
Get the MCP server version
Handle HTTP DELETE request for session termination
Process an HTTP GET request to open an SSE stream
Process an HTTP POST request containing JSON-RPC messages
Create a standard JSON-RPC error response
Parse the JSON-RPC request
Process a single JSON-RPC message
Send an SSE event over the chunked connection