Skip to main content
Glama
LENA-EE
by LENA-EE

MCP DROSPR Server

MCP server for analyzing Perl code using Perl::Critic.

Tools

DROSPR_JARVIS

Test tool - returns a welcome message.

{"method": "tools/call", "params": {"name": "DROSPR_JARVIS", "arguments": {}}}

Result: "Hello from MCP DROSPR! :)"

perlcritic_analyze

Analyzes Perl code and returns a structured report.

Parameters:

Parameter

Type

Description

code

string

REQUIRED - Perl code to analyze

filename

string

Filename (for the report)

severity

int

Severity level 1-5 (default 1)

Usage example:

{
  "method": "tools/call",
  "params": {
    "name": "perlcritic_analyze",
    "arguments": {
      "code": "use strict;\nopen FILE, 'test.txt';",
      "severity": 1
    }
  }
}

Related MCP server: mcp-lint-tools

⚠️ Important: Why only the code parameter

MCP always works remotely! The server is running in Docker on another computer.

┌─────────────────┐         ┌─────────────────┐
│   Компьютер      │         │   MCP Сервер    │
│   разработчика  │   HTTP   │   (Docker)      │
│                 │  ──────> │                 │
│   Файл:         │          │   Нет доступа   │
│   C:\project\    │          │   к файловой    │
│   script.pl     │          │   системе!      │
└─────────────────┘          └─────────────────┘

Problem:

  • LLM receives the path C:\project\script.pl

  • LLM "emulates" reading the file

  • Runs MCP with target: "C:\project\script.pl"

  • MCP cannot see this file! It is on another computer.

Solution: LLM must:

  1. Read the file for real

  2. Send the content via the code parameter

Correct flow for LLM:

Пользователь: "Проверь C:\project\script.pl"
     ↓
LLM: Читаю файл C:\project\script.pl...
     ↓
LLM: Отправляю в MCP:
     {
       "code": "use strict;\nuse warnings;\n...",
       "filename": "script.pl"
     }

LLM Configuration (Kiloterm/Cline)

Add to system prompt:

ПРОВЕРКА PERL КОДА:
1. Всегда читай файл ПОЛНОСТЬЮ перед анализом
2. Используй ТОЛЬКО параметр 'code' для perlcritic_analyze
3. НИКОГДА не используй параметр 'target' - он не работает для удалённого MCP

Running

# Скачать образ
docker pull lenchik8/simple_mcp:latest

# Запустить
docker run -d --name mcp-DROSPR_JARVIS -p 8000:8000 lenchik8/simple_mcp:latest

Local build

docker build -t mcp-DROSPR_JARVIS .
docker run -p 8000:8000 mcp-DROSPR_JARVIS

From source

pip install -e .
python server.py

Project structure

mcp_DROSPR_JARVIS/
├── server.py          # FastAPI сервер
├── tools/
│   └── perlcritic.py  # Модуль анализа Perl::Critic
├── Dockerfile         # Docker образ
├── pyproject.toml     # Python зависимости
└── docs/             # Документация

Connecting to an MCP client

{
  "mcpServers": {
    "DROSPR_JARVIS": {
      "url": "http://<IP>:8000",
      "transport": "sse"
    }
  }
}

Docker Hub

https://hub.docker.com/r/lenchik8/simple\\\\_mcp

GitHub

https://github.com/LENA-EE/simple\\\\_mcp


Prompt examples for Perl code analysis

Simple file analysis

Проверь этот Perl файл на ошибки:
/path/to/script.pl

Analysis with soft level (critical errors only)

Проверь код, но покажи только серьёзные проблемы (severity 4-5)

Code analysis (sending code directly)

Проверь этот Perl код:
use strict;
...

Project analysis

Проанализируй каждый .pl файл в папке /src/

Remote MCP limitations

  • Directory analysis is only possible if they are accessible inside the container

  • For a full project audit - send file code one by one

Related MCP Connectors

Related MCP Servers