colmugx/mcp/server does not have a README file
pub trait RequestStateCodec {
fn seal(Self, RequestStatePayload, now~ : Int) -> String
fn open(Self, String, RequestStateContext, now~ : Int) -> RequestStatePayload?
}pub struct AesGcmStateCodec {
key : Bytes
}fn AesGcmStateCodec::open(self : AesGcmStateCodec, blob : String, ctx : RequestStateContext, now~ : Int) -> RequestStatePayload?fn AesGcmStateCodec::seal(self : AesGcmStateCodec, payload : RequestStatePayload, now~ : Int) -> Stringpub struct MCPServer {
name : String
version : String
title : String?
description : String?
instructions : String?
auth_config : AuthConfig?
request_state_codec : AesGcmStateCodec?
clock : () -> Int
registry : ToolRegistry
resource_registry : ResourceRegistry
prompt_registry : PromptRegistry
subscriptions : Map[String, ActiveSubscription]
}fn MCPServer::prompt(self : MCPServer, name : String, description : String, arguments : Array[PromptArgument], handler : async (Json) -> Result[GetPromptResult, MCPError]) -> MCPServerfn MCPServer::prompt_mrtr(self : MCPServer, name : String, description : String, arguments : Array[PromptArgument], handler : async (Json) -> Result[PromptGetOutcome, MCPError]) -> MCPServerfn MCPServer::resource(self : MCPServer, uri : String, name : String, description : String, mime_type : String, handler : async () -> Result[ResourceReadResult, MCPError]) -> MCPServerasync fn MCPServer::run_http(self : MCPServer, port? : Int, path? : String) -> Unit raise TransportErrorpub(all) struct RequestStatePayload {
principal : String?
expires_at : Int
request_method : String
params_digest : String
state : Json
}pub(all) struct SubscriptionFilter {
tools_list_changed : Bool
prompts_list_changed : Bool
resources_list_changed : Bool
resource_subscriptions : Array[String]
}fn SubscriptionFilter::matches(self : SubscriptionFilter, kind : SubscriptionNotificationKind) -> Boolfn[Args : Params, Ret : ToToolResult] tool_fn(handler : (Args) -> Ret, name~ : String, description~ : String) -> ToolWrapperType-safe MCP SDK in MoonBit with server/client support and dual transport (STDIO/HTTP)
Dependencies