# Function startStdioServer

MCP exports - MCP server implementation Split from index.ts for file size compliance (Issue #285) Updated Issue #538: Added missing tool registration exports

- startStdioServer(
  config?: ServerConfig,
  ): Promise<Result<ServerInstance, ServerError>>

  Starts the MCP server with stdio transport.

  This is the main entry point for running the server as a standalone process. The server will communicate over stdin/stdout using the MCP protocol.

  #### Parameters

  - `Optional` config: ServerConfig

    Optional server configuration

  #### Returns Promise<Result<ServerInstance, ServerError>>

  Result indicating success or failure

  #### Example

      const result = await startStdioServer();
      if (!result.ok) {
        console.error('Failed to start server:', result.error.message);
        process.exit(1);
      }

  - Defined in packages/nexus-agents/src/mcp/server.ts:187