MCPSERV.CLUB
mojolicious

MCP Perl SDK

MCP Server

Model Context Protocol support for Perl and Mojolicious

Stale(60)
11stars
2views
Updated Sep 6, 2025

About

A Perl library that implements the Model Context Protocol, enabling tool calling, prompt handling, and streamable HTTP or stdio transports within Mojolicious web applications.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

The MCP Perl SDK brings the Model Context Protocol to the Perl ecosystem, enabling developers to expose AI‑driven tools and prompts as fully‑featured web services or command‑line utilities. By integrating directly with the Mojolicious framework, it turns any Perl application into a compliant MCP server that can be consumed by Claude or other AI assistants. This solves the common pain point of bridging legacy Perl codebases with modern LLM workflows—developers no longer need to write custom adapters or reinvent transport logic.

At its core, the SDK provides a lightweight server implementation that supports tool calling, prompt provisioning, and streamable responses over both HTTP and stdio. The server can be attached to any Mojolicious route, allowing authentication, rate‑limiting, and other web middleware to be applied with minimal effort. The stdio transport is especially valuable for local testing or building standalone command‑line tools, as it adheres to the same JSON‑RPC contract used by AI assistants.

Key capabilities include:

  • Declarative tool registration: Define a name, description, input schema, and implementation callback in a few lines.
  • Streaming support: Return partial results incrementally to reduce latency for large outputs.
  • Asynchronous execution: Leverage Mojolicious promises to run non‑blocking operations, making the server scalable under load.
  • Embedded usage: The MCP server can be instantiated inside an existing Mojolicious application without requiring a separate process.
  • Built‑in HTTP client: Facilitate integration testing by sending requests directly to the server from Perl code.

Typical use cases span a wide range of scenarios. A data‑engineering team can expose a Perl script that normalizes CSV files as an MCP tool, letting an AI assistant automatically invoke it during data‑prep conversations. A DevOps engineer might wrap a Perl‑based deployment script, enabling AI assistants to trigger rollouts or rollback operations. In research settings, a Perl data‑analysis pipeline can be turned into an AI‑accessible toolset, allowing conversational agents to request specific statistical summaries on demand.

By adhering to the MCP specification, this SDK ensures that any compliant AI client can discover and invoke the exposed tools without custom adapters. The combination of Mojolicious’ real‑time capabilities, Perl’s mature ecosystem, and MCP’s standardised interface gives developers a powerful, low‑overhead path to integrate AI assistance into existing workflows.