enigma-python-mcp
MCP-сервер Enigma Python
Сервер MCP (Model Context Protocol), который предоставляет LLM возможности библиотеки enigmapython, позволяя им шифровать и расшифровывать сообщения с помощью исторически точных эмуляторов машины «Энигма».

Этот MCP-сервер представлен на Glama.ai с соответствующей оценкой.
Функции
Поддержка всех известных моделей машины «Энигма»: Enigma M3, Enigma M4, Enigma I, Enigma K, Enigma Z, Enigma D и другие.
Динамическая конфигурация: LLM могут указывать роторы, начальные позиции, настройки колец, рефлекторы и пары коммутационной панели для шифрования.
Локальный и сетевой режимы: Поддерживает как транспорт
stdioдля локальных интеграций MCP (например, Claude Desktop), так и транспортsseдля предоставления инструментов по сети.Контейнеризация Docker: Легкая переносимость и выполнение на различных платформах.
Related MCP server: MCP Server Example
Предоставляемые инструменты
encrypt_message
Шифрование или расшифровка сообщения с использованием настроенной машины «Энигма».
Аргументы:
machine_model(str): Название модели. Поддерживаются:'M3','M4','I','I_Norway','I_Sondermaschine','K','K_Swiss','D','Z','B_A133'.message(str): Открытый текст или шифротекст для обработки.rotors(list[object]): Список объектовRotorConfig. Каждый объект определяетrotor_type(str),ring_setting(int, по умолчанию=0) иinitial_position(int | str, по умолчанию=0). ВАЖНО: Список ДОЛЖЕН быть упорядочен строго так:[Самый быстрый/Крайний правый, Средний, Самый медленный/Крайний левый, Греческий (если M4)].reflector(object): ОбъектReflectorConfig, определяющийreflector_type(str), а также опциональноring_setting(int) иinitial_position(int | str) для вращающихся рефлекторов.plugboard_pairs(dict, опционально): Словарь, отображающий соединения коммутационной панели (например,{"A": "B", "C": "D"}).
Запуск сервера
Использование Python
Требуется Python 3.11+.
Установите пакет из PyPI:
pip install enigmapython-mcp(Альтернативно, вы можете просто запустить
uvx enigmapython-mcp, если у вас установленuv!)Запуск через stdio (для локального клиента MCP):
enigmapython-mcp --transport stdioЗапуск через SSE (предоставление по сети):
enigmapython-mcp --transport sse --host 0.0.0.0 --port 8000
Использование Docker
Соберите контейнер:
docker build -t enigmapython-mcp .Запуск через stdio (по умолчанию):
docker run -i enigmapython-mcpЗапуск через SSE:
docker run -p 8000:8000 enigmapython-mcp --transport sse --host 0.0.0.0 --port 8000
Конфигурация клиента (Claude Desktop)
Мы предоставляем два различных пакета mcpb для установки в один клик в Claude Desktop. Просто скачайте нужный пакет со страницы релизов GitHub и перетащите его в меню расширений Claude Desktop:
enigmapython-mcp-docker.mcpb: Чрезвычайно легкий, полагается на ваш локальный демон Docker для запуска сервера в изолированном контейнере. (Рекомендуется)enigmapython-mcp-python.mcpb: Содержит полный исходный код на Python. Claude Desktop автоматически создаст виртуальное окружение и запустит сервер без необходимости использования Docker.
Если вы предпочитаете ручную настройку через claude_desktop_config.json, используйте настройки ниже:
Использование Python (рекомендуется uvx)
{
"mcpServers": {
"enigma": {
"command": "uvx",
"args": ["enigmapython-mcp", "--transport", "stdio"]
}
}
}Использование Docker
(Примечание: Убедитесь, что вы сначала собрали образ Docker: docker build -t enigmapython-mcp .)
{
"mcpServers": {
"enigma": {
"command": "docker",
"args": ["run", "-i", "--rm", "enigmapython-mcp"]
}
}
}Конфигурация клиента (OpenCode)
Чтобы использовать этот сервер с OpenCode, добавьте следующее в ваш ~/.config/opencode/opencode.json (глобально) или opencode.json (на уровне проекта) в раздел mcp:
Использование Python (рекомендуется uvx)
{
"mcp": {
"enigma": {
"type": "local",
"command": [
"uvx",
"enigmapython-mcp",
"--transport",
"stdio"
],
"enabled": true
}
}
}Использование Docker
(Примечание: Убедитесь, что вы сначала собрали образ Docker: docker build -t enigmapython-mcp .)
{
"mcp": {
"enigma": {
"type": "local",
"command": [
"docker",
"run",
"-i",
"--rm",
"enigmapython-mcp"
],
"enabled": true
}
}
}Примеры промптов
После настройки сервера вы можете протестировать его, отправив следующие промпты вашей LLM:
Пример 1: Базовое шифрование (Enigma M3)
"Мне нужно зашифровать сообщение 'TOPSECRET' с помощью Enigma M3. Роторы, упорядоченные от самого быстрого к самому медленному: III, II и I. Все начинаются с позиции 0, настройки колец на 0. Используй рефлектор 'UKWB' и без коммутационной панели. Какой будет шифротекст?"
Пример 2: Историческая расшифровка (Enigma I)
"Расшифруй это сообщение Enigma I 1930 года. Шифротекст: 'GCDSEAHUGWTQGRK'. Настройки машины, строго упорядоченные от самого быстрого к самому медленному: роторы III, I и II. Их соответствующие настройки колец: 21, 12 и 23. Их начальные позиции: 11, 1 и 0. Рефлектор — 'UKWA'. Перестановки коммутационной панели: A/M, F/I, N/V, P/S, T/U, W/Z."
Пример 3: Сложная конфигурация M4
"Используй Enigma M4 для шифрования сообщения 'DIVE DIVE DIVE'. Машина использует рефлектор 'UKWBThin'. Роторы, явно упорядоченные как [Самый быстрый, Средний, Самый медленный, Греческий]: VIII (поз. 2), III (поз. 6), IV (поз. 12) и Gamma (поз. 21). Все настройки колец равны 0. Пожалуйста, обработай это."
Тестирование
Комплексный набор тестов включен в tests/test_server.py. Он проверяет обратимость шифрования и расшифровки для всех 10 поддерживаемых моделей Enigma.
Для запуска тестов:
# Activate your virtual environment first
source .venv/bin/activate
pip install pytest
export PYTHONPATH=$PYTHONPATH:$(pwd)/src/enigmapython_mcp && pytest tests/* Интерактивное тестирование SSE-сервера
Поскольку протокол MCP требует рукопожатия для инициализации состояния перед вызовом любых инструментов, ручное тестирование SSE-эндпоинта с помощью curl довольно сложно.
Самый простой и официально рекомендуемый способ тестирования сервера — использование MCP Inspector:
Убедитесь, что ваш сервер запущен в режиме SSE:
uv run enigmapython-mcp --transport sse --host 0.0.0.0 --port 8000Во втором терминале запустите Inspector:
npx @modelcontextprotocol/inspectorВ браузере откроется веб-интерфейс (обычно по адресу
http://localhost:5173).Измените Transport Type на SSE.
Введите
http://localhost:8000/sseв качестве URL и нажмите Connect.Теперь вы можете визуально настраивать и выполнять инструмент
encrypt_message!
Available Tools
1 toolencrypt_messageA
Encrypt or decrypt a message using a specified Enigma machine configuration.
Args:
machine_model: Exact machine model name. MUST be one of: 'M3', 'M4', 'I', 'I_Norway', 'I_Sondermaschine', 'K', 'K_Swiss', 'D', 'Z', 'B_A133', 'T'. Do not add 'Enigma' prefix.
Supported models and their explicitly required reflectors:
- 'M3', 'I': UKWA, UKWB, UKWC
- 'M4': UKWBThin, UKWCThin
- 'I_Norway': UKW_EnigmaINorway
- 'I_Sondermaschine': UKW_EnigmaISonder
- 'K', 'K_Swiss', 'D': UKW_EnigmaCommercial
- 'Z': UKW_EnigmaZ
- 'B_A133': UKW_EnigmaB_A133
- 'T': UKW_EnigmaT
message: The plaintext or ciphertext to process.
- For Enigma Z: MUST contain ONLY digits (1234567890).
- For Enigma B_A133: MUST contain ONLY Swedish letters (abcdefghijklmnopqrstuvxyzåäö). Note: 'w' is strictly forbidden.
- For all other machines: MUST contain ONLY standard letters (A-Z).
- Spaces, punctuation, and special characters are strictly forbidden in all machines.
rotors: List of RotorConfig objects. MUST be ordered exactly as: [Fastest/Rightmost, Middle, Slowest/Leftmost, Greek (if M4)].
reflector: The ReflectorConfig object.
plugboard_pairs: Optional dict for plugboard connections (e.g. {"A": "B", "C": "D"}). Ignored if the machine has no plugboard.
| Name | Required | Description | Default |
|---|---|---|---|
| rotors | Yes | ||
| message | Yes | ||
| reflector | Yes | ||
| machine_model | Yes | ||
| plugboard_pairs | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It adds valuable behavioral context such as message character restrictions per machine model, rotor ordering, and plugboard being ignored when absent. However, it does not disclose return behavior, error handling, or side effects, leaving some transparency gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, then structured as an 'Args' list. It is lengthy due to the complexity, but each line adds necessary value. A slightly more compressed format could be achieved without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complex nested schema and no output schema, the description covers all input parameters thoroughly, including valid values and constraints. It does not explicitly state the return value, but that is implied by the encrypt/decrypt purpose. Overall, it is complete enough for a well-equipped agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% top-level description coverage, but the description provides exhaustive semantics for every parameter: allowed machine models, per-model message constraints, rotor ordering, reflector guidance, and plugboard behavior. This fully compensates for the missing schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Encrypt or decrypt a message using a specified Enigma machine configuration,' which clearly states the verb and resource. However, there are no sibling tools to differentiate from, so it loses a point for not distinguishing alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives (though there are none), nor any prerequisites, exclusions, or context beyond the first sentence. The detailed parameter constraints are helpful but do not address usage scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.1.4- Changed
encrypt_message1 field changed- changed
Input schema / $defs / ReflectorConfig / properties / reflector_type / descriptionPrevious value: -"Exact Reflector identifier. Valid options: 'UKWA', 'UKWB', 'UKWC', 'UKWBThin', 'UKWCThin', 'UKW_EnigmaCommercial', 'UKW_EnigmaINorway', 'UKW_EnigmaISonder', 'UKW_EnigmaB_A133'."New value: +"Exact Reflector identifier. Valid options: 'UKWA', 'UKWB', 'UKWC', 'UKWBThin', 'UKWCThin', 'UKW_EnigmaCommercial', 'UKW_EnigmaINorway', 'UKW_EnigmaISonder', 'UKW_EnigmaB_A133', 'UKW_EnigmaT'."
1 tool update
v0.1.0- First observed
encrypt_message
TDQS
Only one tool exists, so there is no ambiguity between tools. The single tool's purpose is clear from its description.
The single tool name 'encrypt_message' follows a clear verb_noun pattern, and there are no other tools to create inconsistency. The name is slightly misleading as it also performs decryption, but this does not affect consistency across tools.
With only one tool, the server feels very thin for an Enigma machine library. However, the single tool is comprehensive, covering encryption and decryption for many machine models.
The tool covers both encryption and decryption, which are the core operations. It also supports a wide range of Enigma models. There could be additional tools for listing models or validating configurations, but these are minor gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.542014MIT
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.1163MIT
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server integrating with various LLM clients.2MIT
- FlicenseNot gradedqualityDmaintenanceA foundational implementation of a Model Context Protocol (MCP) server designed for educational purposes. It demonstrates the complete interaction between an LLM, an inference engine, and a client during an agentic call.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/denismaggior8/enigma-python-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server