mcp-server-0.1.0.1: Library for building Model Context Protocol (MCP) servers
Safe HaskellNone
LanguageGHC2024

MCP.Server

Synopsis

Server Runtime

runMcpServer Source #

Arguments

:: MonadIO m 
=> McpServerInfo 
-> McpServerHandlers m 
-> (Text -> m ())

Output handler

-> m Text

Input handler

-> m () 

Run an MCP server with custom input/output handlers

runMcpServerStdIn :: McpServerInfo -> McpServerHandlers IO -> IO () Source #

Run an MCP server using stdin/stdout

handleMcpMessage :: MonadIO m => McpServerInfo -> McpServerHandlers m -> JsonRpcMessage -> m (Maybe JsonRpcMessage) Source #

Handle an MCP message and return a response if needed

Re-exports