Function startMcpServer

  • Helper to start the MCP server with stdio transport

    Parameters

    • actions: Record<string, Action>

      The actions to expose to the MCP server

    • solanaAgentKit: SolanaAgentKit

      The Solana 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 solanaAgentKit = new SolanaAgentKit();

    startMcpServer(ACTIONS, solanaAgentKit, {
    name: "solana-actions",
    version: "1.0.0"
    });