Function startMcpServer

  • Helper to start the MCP server with stdio transport

    Parameters

    • actions: Record<string, Action>

      The actions to expose to the MCP server

    • EvmAgentKit: EvmAgentKit

      The EVM agent kit

    • options: { name: string; version: string }

      The options for the MCP server

    Returns Promise<McpServer>

    The MCP server

    Error if the MCP server fails to start

    import { ACTIONS } from "./actions";
    import { startMcpServer } from "./mcpWrapper";

    const EvmAgentKit = new EvmAgentKit();

    startMcpServer(ACTIONS, EvmAgentKit, {
    name: "actions",
    version: "1.0.0"
    });