Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
Name: perl-MCP | Distribution: openSUSE Tumbleweed |
Version: 0.40.0 | Vendor: openSUSE |
Release: 1.1 | Build date: Tue Aug 5 15:19:20 2025 |
Group: Unspecified | Build host: reproducible |
Size: 40981 | Source RPM: perl-MCP-0.40.0-1.1.src.rpm |
Packager: https://bugs.opensuse.org | |
Url: https://metacpan.org/release/MCP | |
Summary: Connect Perl with AI using MCP (Model Context Protocol) |
Connect Perl with AI using the Model Context Protocol (MCP). Currently this module is focused on tool calling, but it will be extended to support other MCP features in the future. At its core, MCP is all about text processing, making it a great fit for Perl. Streamable HTTP Transport Use the MCP::Server/"to_action" method to add an MCP endpoint to any Mojolicious application. The tool name and description are used for discovery, and the at https://json-schema.org is used to validate the input. use Mojolicious::Lite -signatures; use MCP::Server; my $server = MCP::Server->new; $server->tool( name => 'echo', description => 'Echo the input text', input_schema => {type => 'object', properties => {msg => {type => 'string'}}, required => ['msg']}, code => sub ($tool, $args) { return "Echo: $args->{msg}"; } ); any '/mcp' => $server->to_action; app->start; Authentication can be added by the web application, just like for any other route. To allow for MCP applications to scale with prefork web servers, server to client streaming is currentlly avoided when possible. Stdio Transport Build local command line applications and use the stdio transport for testing with the MCP::Server/"to_stdio" method. use Mojo::Base -strict, -signatures; use MCP::Server; my $server = MCP::Server->new; $server->tool( name => 'echo', description => 'Echo the input text', input_schema => {type => 'object', properties => {msg => {type => 'string'}}, required => ['msg']}, code => sub ($tool, $args) { return "Echo: $args->{msg}"; } ); $server->to_stdio; Just run the script and type requests on the command line. $ perl examples/echo_stdio.pl {"jsonrpc":"2.0","id":"1","method":"tools/list"} {"jsonrpc":"2.0","id":"2","method":"tools/call","params":{"name":"echo","arguments":{"msg":"hello perl"}}}
MIT
* Tue Aug 05 2025 Tina Müller <tina.mueller@suse.com> - initial package 0.40.0 (0.04) * created by cpanspec 1.84.01
/usr/lib/perl5/vendor_perl/5.42.0/MCP /usr/lib/perl5/vendor_perl/5.42.0/MCP.pm /usr/lib/perl5/vendor_perl/5.42.0/MCP/Client.pm /usr/lib/perl5/vendor_perl/5.42.0/MCP/Constants.pm /usr/lib/perl5/vendor_perl/5.42.0/MCP/Server /usr/lib/perl5/vendor_perl/5.42.0/MCP/Server.pm /usr/lib/perl5/vendor_perl/5.42.0/MCP/Server/Transport /usr/lib/perl5/vendor_perl/5.42.0/MCP/Server/Transport.pm /usr/lib/perl5/vendor_perl/5.42.0/MCP/Server/Transport/HTTP.pm /usr/lib/perl5/vendor_perl/5.42.0/MCP/Server/Transport/Stdio.pm /usr/lib/perl5/vendor_perl/5.42.0/MCP/Tool.pm /usr/share/doc/packages/perl-MCP /usr/share/doc/packages/perl-MCP/Changes /usr/share/doc/packages/perl-MCP/README.md /usr/share/doc/packages/perl-MCP/examples /usr/share/doc/packages/perl-MCP/examples/echo_http.pl /usr/share/doc/packages/perl-MCP/examples/echo_stdio.pl /usr/share/licenses/perl-MCP /usr/share/licenses/perl-MCP/LICENSE /usr/share/man/man3/MCP.3pm.gz /usr/share/man/man3/MCP::Client.3pm.gz /usr/share/man/man3/MCP::Constants.3pm.gz /usr/share/man/man3/MCP::Server.3pm.gz /usr/share/man/man3/MCP::Server::Transport.3pm.gz /usr/share/man/man3/MCP::Server::Transport::HTTP.3pm.gz /usr/share/man/man3/MCP::Server::Transport::Stdio.3pm.gz /usr/share/man/man3/MCP::Tool.3pm.gz
Generated by rpm2html 1.8.1
Fabrice Bellet, Sat Sep 6 22:23:20 2025