MCP::Se...::Legacy(3)

πŸ“¦ version 0.150.0, in opensuse-leap 16.0

πŸ’… 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 πŸ“


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