MCP::Se...::Legacy(3)
π MCP::Se...::Legacy(3) β the perl manpage, but make it cute
okay so bestie, welcome to the User Contributed Perl Documentation for MCP::Server::Legacy π this is the little fallback module that keeps the old-protocol girlies connected while everyone else upgrades. let's get into it β¨
πΈ NAME πΈ
MCP::Server::Legacy β the fallback for clients that are still speaking a previous protocol version π«Ά like, no cap, it's the group chat translator for the old heads.
π¦ SYNOPSIS π¦
use MCP::Server::Legacy qw(legacy_request);
my $version = legacy_request('2025-11-25', {jsonrpc => '2.0', id => 1, method => 'tools/call'});
that's it, that's the whole vibe check π₯ you import legacy_request and you're literally off to the races.
π DESCRIPTION π
so here's the tea β MCP::Server::Legacy answers the "initialize" handshake of clients speaking a protocol revision older than PROTOCOL_VERSION in MCP::Constants. the whole point? so they can still list and call tools, prompts and resources while the ecosystem catches up. iconic, honestly π
but bestie, listen β nothing beyond that is supported. in particular:
- no notifications π«
- no multi round-trip requests π«
it's giving temporary convenience, and it will be removed again in a future release π so don't get too attached, iykyk.
β¨ FUNCTIONS β¨
MCP::Server::Legacy implements the following functions, which can be imported individually π§
π legacy_context
my $context = legacy_context($params, $context);
populate an MCP::Server::Context with the values a current request would have carried in "_meta" π lowkey just filling in the blanks so everything lines up.
β legacy_request
my $version = legacy_request($version, $request);
returns the protocol revision a request was made with, or undef if it is not legacy β based on the "MCP-Protocol-Version" header and the JSON-RPC request π
here's the important part, bestie: a request carrying "_meta.io.modelcontextprotocol/protocolVersion" is never legacy, whatever the header says. so a current client with a misconfigured header still gets a proper error β we love a graceful fail π
also! revisions before "2025-06-18" predate the header, so a request without one is assumed to be legacy. yes, we're just assuming, don't come for us π
π legacy_result
my $result = legacy_result($server, $method, $version);
the result for a "initialize" or "ping" request, or undef for every other method π the handshake echoes the requested protocol revision and advertises the same primitives as "server/discover", but never "listChanged" β because list change notifications are not supported. periodt. π―
π SEE ALSO π
MCPπ- <https://mojolicious.org> πΈ
- <https://modelcontextprotocol.io> π¦
bestie reminder: this is a temporary convenience module, so if you're out here building your whole personality on it, maybe diversify your portfolio π
and that's the whole page, no notes β¨ this was perl v5.42.0, dated 2026-07-31, and it's the MCP::Se...::Legacy(3) manpage signing off β slay, stay legacy-safe, mwah π
π
π¦ where this page comes from
- opensuse-leap 16.0: perl-MCP 0.150.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms