Enigma Python MCP Server An MCP (Model Context Protocol) server that brings the capabilities of the enigmapython library to LLMs, allowing them to encrypt and decrypt messages using historically accurate Enigma machine emulators.
Enigma Python MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP (Model Context Protocol) server that brings the capabilities of the enigmapython library to LLMs, allowing them to encrypt and decrypt messages using historically accurate Enigma machine emulators.
This MCP Server is listed on Glama.ai with this score
Features
- **Exposes all known Enigma machine models**: Enigma M3, Enigma M4, Enigma I, Enigma K, Enigma Z, Enigma D, Enigma T, and more.
- **Dynamic Configuration**: LLMs can specify rotors, initial positions, ring settings, reflectors, and plugboard pairs for the encryption.
- **Local and Network Mode**: Supports both stdio transport for local MCP integrations (like Claude Desktop) and sse transport to expose the tools over a network.
- **Dockerized**: Easy portability and execution across platforms.
Exposed Tools
encrypt_message
Encrypt or decrypt a message using a configured Enigma machine.
**Arguments:**
- machine_model (str): Model name. Supported: 'M3', 'M4', 'I', 'I_Norway', 'I_Sondermaschine', 'K', 'K_Swiss', 'D', 'Z', 'B_A133', 'T'.
- message (str): The plaintext or ciphertext to process.
- rotors (list[object]): List of RotorConfig objects. Each object specifies rotor_type (str), ring_setting (int, default=0), and initial_position (int | str, default=0). IMPORTANT: The list MUST be ordered exactly as: [Fastest/Rightmost, Middle, Slowest/Leftmost, Greek (if M4)].
- reflector (object): A ReflectorConfig object specifying reflector_type (str), and optionally ring_setting (int) and initial_position (int | str) for rotating reflectors.
- plugboard_pairs (dict, optional): Dictionary mapping plugboard connections (e.g., {"A": "B", "C": "D"}).
Running the Server
Using Python
Requires Python 3.11+.
1. Install the package from PyPI:
*(Alternatively, you can just run uvx enigmapython-mcp if you have uv installed!)*
2. Run via stdio (for local MCP client):
3. Run via SSE (exposing over network):
Using Docker
1. Build the container:
2. Run via stdio (default):
3. Run via SSE:
Client Configuration (Claude Desktop)
We provide two distinct mcpb bundles for 1-click installation on Claude Desktop. Simply download your preferred bundle from the GitHub Releases page and drag-and-drop it into Claude Desktop's Extensions menu:
1. **enigmapython-mcp-docker.mcpb**: Extremely lightweight, relies on your local Docker daemon to run the server in an isolated container. *(Recommended)*
2. **enigmapython-mcp-python.mcpb**: Contains the full Python source. Claude Desktop will natively build a virtual environment and run the server without needing Docker.
If you prefer manual configuration via claude_desktop_config.json, use the settings below:
Using Python (uvx recommended)
Using Docker
*(Note: Make sure you have built the Docker image first: docker build -t enigmapython-mcp .)*
Client Configuration (OpenCode)
To use this server with OpenCode, add the following to your ~/.config/opencode/opencode.json (global) or opencode.json (project-level) under the mcp section:
Using Python (uvx recommended)
Using Docker
*(Note: Make sure you have built the Docker image first: docker build -t enigmapython-mcp .)*