perl-mcp

Build MCP servers in Perl using MCP::Server tool registration patterns.

3|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/Getty/p5-mcp-run --skill perl-mcp-getty
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perl-mcp
Source: https://github.com/Getty/p5-mcp-run/tree/main/.claude/skills/perl-mcp
Command: npx skills add https://github.com/Getty/p5-mcp-run --skill perl-mcp-getty

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing an MCP server in Perl requires knowing the exact MCP::Server API conventions — handler signatures, return methods, and error flags — and getting any of them wrong produces tools that silently fail or misbehave. ## Core Features & Use Cases - Server and Tool Setup: Provides correct MCP::Server instantiation and $server->tool() registration with JSON Schema input definitions. - Ready-Made Tool Patterns: Includes CRUD, Kubernetes, and database integration tool templates with proper error handling via text_result(). - Async LLM Integration: Shows how to wire MCP tools into Langertha and Net::Async::MCP for tool-calling agents with Anthropic models. - Use Case: You need to expose a Perl application's data as MCP tools for Claude — use this Skill to register list/create/query tools with correct schemas and connect them to an async LLM client. ## Quick Start Use the perl-mcp skill to create an MCP server in Perl with a tool that queries my database table and returns JSON results.

Frequently Asked Questions about perl-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server in Perl?

Create an MCP::Server instance with a name and version, then register tools using $server->tool() with a name, description, JSON Schema input_schema, and a code handler. The handler receives ($self, $args) and returns results via $self->text_result().

How do I define MCP tool input schemas in Perl?

Pass a standard JSON Schema hashref as input_schema to $server->tool(), defining type, properties with per-parameter descriptions, and a required array. Clear parameter descriptions help the LLM call the tool correctly.

Can I use Perl MCP tools with Claude or other LLMs?

Yes, wrap the server in Net::Async::MCP and pass it to Langertha::Engine::Anthropic via the mcp_servers parameter. You can then use chat_with_tools_f for one-shot calls or Langertha::Raider for multi-turn agent loops.

Why does my Perl MCP tool handler fail silently?

Common causes are using the wrong handler signature or return method. The handler receives $self as an MCP::Tool instance, not your server class, and must return via $self->text_result(), passing 1 as the second argument to flag errors.

How do I return errors from an MCP tool in Perl?

Call $self->text_result($error_message, 1) where the second argument sets is_error. Wrap risky operations in eval and check $@ to convert exceptions into proper MCP error responses.