MCP::Se...ansport(3)
π MCP::Transport π
okay so bestie, buckle up β this one's from the User Contributed Perl Documentation and honestly? it's giving foundational. it's the base class energy, the main character origin story. let's get into it π
β¨ NAME β¨
MCP:Transport β the Transport base class. that's it, that's the vibe. it's the blueprint everything else inherits from π«Ά
πΈ SYNOPSIS πΈ
bestie you literally just do this and you're off:
package MyMCPTransport;
use Mojo::Base 'MCP::Server::Transport';
1;
that 1; at the end? non-negotiable. it's the "return true so Perl knows we're chill" moment. iconic. π
π DESCRIPTION π
so MCP::Server::Transport is a base class for MCP (Model Context Protocol) transport implementations. like, it's not doing the work itself β it's the blueprint that other transport classes build on top of. the whole squad inherits from it. lowkey the mother of the group chat π
π¦ ATTRIBUTES π¦
MCP::Server::Transport implements the following attributes. yes, the fancy word for "things it has." slay.
β server β
my $server = $transport->server;
$transport = $transport->server(MCP::Server->new);
this is the server instance that this transport is associated with β like, which server is this transport riding for? that one. you can read it and you can set it. getter and setter, we love a versatile icon π
π₯ METHODS π₯
MCP::Server::Transport implements the following methods. the verbs. the actions. the moments.
π notifications π
my $bool = $transport->notifications;
true when the transport can push server-to-client notifications outside an in-flight response. read that again: outside an in-flight response. so even when nobody asked, this transport can still slide into the client's DMs with a notification. it's giving main character energy, honestly π«Άβ¨
π SEE ALSO π
Mojolicious- <https://mojolicious.org>
- <https://modelcontextprotocol.io>
go click around, bestie, iykyk π
ngl this page is short but it's load-bearing. if you're building a transport, this is the class you inherit from, periodt. don't skip the 1; and don't skip the base class. fr fr. π
k bye ily, this page was brought to you by perl v5.42.0 dated 2026-07-31, straight from the User Contributed Perl Documentation π§ββοΈπ
π¦ 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