enigma-python-mcp
This server provides an MCP interface to historically accurate Enigma machine emulators, enabling LLMs to encrypt and decrypt messages via the encrypt_message tool.
10 supported Enigma models:
M3,M4(Naval),I,I_Norway,I_Sondermaschine(Army/Luftwaffe),K,K_Swiss(Commercial/Swiss),D,Z(digits only),B_A133(Swedish letters only)Full machine configuration:
Rotors: type (
I–VIII,Beta,Gamma), ring settings, initial positions, ordered Fastest→Middle→Slowest (→Greek for M4)Reflector: choose model-appropriate type (e.g.,
UKWA,UKWB,UKWBThin), with optional ring/position settingsPlugboard: define letter-swap pairs (e.g.,
{"A": "B", "C": "D"})
Model-specific character sets: A–Z for standard models, digits (0–9) for Enigma Z, Swedish letters for B_A133
Flexible deployment: run locally via
stdioor over a network via SSE (HTTP), with Docker supportClient integration: compatible with Claude Desktop and OpenCode
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.

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
stdiotransport for local MCP integrations (like Claude Desktop) andssetransport to expose the tools over a network.Dockerized: Easy portability and execution across platforms.
Related MCP server: MCP Server Example
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 ofRotorConfigobjects. Each object specifiesrotor_type(str),ring_setting(int, default=0), andinitial_position(int | str, default=0). IMPORTANT: The list MUST be ordered exactly as:[Fastest/Rightmost, Middle, Slowest/Leftmost, Greek (if M4)].reflector(object): AReflectorConfigobject specifyingreflector_type(str), and optionallyring_setting(int) andinitial_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+.
Install the package from PyPI:
pip install enigmapython-mcp(Alternatively, you can just run
uvx enigmapython-mcpif you haveuvinstalled!)Run via stdio (for local MCP client):
enigmapython-mcp --transport stdioRun via SSE (exposing over network):
enigmapython-mcp --transport sse --host 0.0.0.0 --port 8000
Using Docker
Build the container:
docker build -t enigmapython-mcp .Run via stdio (default):
docker run -i enigmapython-mcpRun via SSE:
docker run -p 8000:8000 enigmapython-mcp --transport sse --host 0.0.0.0 --port 8000
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:
enigmapython-mcp-docker.mcpb: Extremely lightweight, relies on your local Docker daemon to run the server in an isolated container. (Recommended)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)
{
"mcpServers": {
"enigma": {
"command": "uvx",
"args": ["enigmapython-mcp", "--transport", "stdio"]
}
}
}Using Docker
(Note: Make sure you have built the Docker image first: docker build -t enigmapython-mcp .)
{
"mcpServers": {
"enigma": {
"command": "docker",
"args": ["run", "-i", "--rm", "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)
{
"mcp": {
"enigma": {
"type": "local",
"command": [
"uvx",
"enigmapython-mcp",
"--transport",
"stdio"
],
"enabled": true
}
}
}Using Docker
(Note: Make sure you have built the Docker image first: docker build -t enigmapython-mcp .)
{
"mcp": {
"enigma": {
"type": "local",
"command": [
"docker",
"run",
"-i",
"--rm",
"enigmapython-mcp"
],
"enabled": true
}
}
}Example Prompts
Once the server is configured, you can test it by sending the following prompts to your LLM:
Example 1: Basic Encryption (Enigma M3)
"I need to encrypt the message 'TOPSECRET' using an Enigma M3. The rotors, ordered from fastest to slowest, are III, II, and I. All starting at position 0 with ring settings at 0. Use reflector 'UKWB' and no plugboard. What is the ciphertext?"
Example 2: Historical Decryption (Enigma I)
"Decrypt this 1930 Enigma I message. The ciphertext is 'GCDSEAHUGWTQGRK'. The machine settings, strictly ordered from Fastest to Slowest, are: Rotors III, I, and II. Their respective ring settings are 21, 12, and 23. Their initial positions are 11, 1, and 0. The reflector is 'UKWA'. The plugboard swaps are: A/M, F/I, N/V, P/S, T/U, W/Z."
Example 3: Complex M4 Configuration
"Use the Enigma M4 to encrypt the message 'DIVE DIVE DIVE'. The machine uses the 'UKWBThin' reflector. The rotors, explicitly ordered as [Fastest, Middle, Slowest, Greek], are: VIII (pos 2), III (pos 6), IV (pos 12), and Gamma (pos 21). All ring settings are 0. Please process this."
Testing
A comprehensive test suite is included in tests/test_server.py. It tests the encryption and decryption reversibility for all 10 supported Enigma models.
To run the tests:
# Activate your virtual environment first
source .venv/bin/activate
pip install pytest
export PYTHONPATH=$PYTHONPATH:$(pwd)/src/enigmapython_mcp && pytest tests/* Testing the SSE Server interactively
Because the Model Context Protocol requires a stateful initialization handshake before any tools can be called, manually testing the SSE endpoint with curl is quite complex.
The easiest and officially recommended way to test the server is using the MCP Inspector:
Ensure your server is running in SSE mode:
uv run enigmapython-mcp --transport sse --host 0.0.0.0 --port 8000In a second terminal, launch the Inspector:
npx @modelcontextprotocol/inspectorA web interface will open in your browser (usually at
http://localhost:5173).Change the Transport Type to SSE.
Enter
http://localhost:8000/sseas the URL and click Connect.You can now visually configure and execute the
encrypt_messagetool!
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.
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