NAME
Claude::Agent::MCP::SDKServer - Socket-based MCP server for SDK tools
DESCRIPTION
This module manages the IPC between the Perl SDK and the MCP server runner. It creates a Unix socket, spawns the runner as a stdio MCP server, and handles tool call requests from the runner by executing the local handlers.
SYNOPSIS
use Claude::Agent::MCP::SDKServer;
my $sdk_server = Claude::Agent::MCP::SDKServer->new(
server => $mcp_server, # Claude::Agent::MCP::Server object
loop => $loop, # IO::Async::Loop
);
# Get the stdio config for the CLI
my $stdio_config = $sdk_server->to_stdio_config();
# Start listening for tool calls
$sdk_server->start();
socket_path
Returns the path to the Unix socket.
to_stdio_config
Returns a hashref suitable for use as a stdio MCP server config.
start
Start listening on the Unix socket for tool call requests.
stop
Stop the listener and clean up.
AUTHOR
LNATION, <email at lnation.org>
LICENSE
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under The Artistic License 2.0 (GPL Compatible).