NAME
Net::Async::MCP::Server - Async MCP server base class
VERSION
version 0.001
SYNOPSIS
use IO::Async::Loop;
use Net::Async::MCP::Server;
use Net::Async::MCP::Server::Transport::Stdio;
my $loop = IO::Async::Loop->new;
my $server = Net::Async::MCP::Server->new(
name => 'my-server',
);
$loop->add($server);
Net::Async::MCP::Server::Transport::Stdio->new(
server => $server,
)->handle_requests;
DESCRIPTION
Net::Async::MCP::Server is an asynchronous MCP (Model Context Protocol) server built on IO::Async. It handles the MCP protocol handshake and request routing, allowing subclasses to implement specific tools.
name
Returns the server name exposed via MCP protocol.
server_info
Returns a hashref with name and version keys for the MCP protocol.
server_capabilities
Returns the server capabilities hashref.
initialize
Performs MCP server initialization. Handles the initialize request from the client, returns server info and capabilities.
tools
Returns ArrayRef of registered tool definitions.
register_tool(%tool)
Registers a tool. Expects name, description, input_schema, code.
list_tools
Returns ArrayRef of tool definitions.
call_tool($name, $arguments)
Called when a client invokes a tool. Subclasses should override to provide tool implementations.
SEE ALSO
Net::Async::MCP::Server::Transport::Stdio, IO::Async::Notifier, Future::AsyncAwait.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-net-async-mcp-server/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.