Class StdioMcpServer

java.lang.Object
org.machanism.machai.mcp.server.AbstractMcpServer
org.machanism.machai.mcp.server.StdioMcpServer

public class StdioMcpServer extends AbstractMcpServer
StdioMcpServer sets up and runs a Model Context Protocol (MCP) server that communicates via standard input and output (STDIO).

This server loads GenAI tools, configures server capabilities, and exposes the MCP API over STDIO for integration with other processes.

Since:
1.2.0
Author:
Viktor Tovstyi
  • Field Details

    • log

      private final org.slf4j.Logger log
    • server

      private final io.modelcontextprotocol.server.McpServer.SyncSpecification<io.modelcontextprotocol.server.McpServer.SingleSessionSyncSpecification> server
      The MCP server specification for single-session sync operation.
    • functionToolsLoader

      private FunctionToolsLoader functionToolsLoader
      Loader for registering function-based tools.
  • Constructor Details

    • StdioMcpServer

      StdioMcpServer(String name, String version)
      Constructs a new StdioMcpServer with the given name and version.
      Parameters:
      name - the server name to report in the MCP API
      version - the server version to report in the MCP API
  • Method Details