# denismaggior8/enigma-python-mcp [Health: Active]

**Category:** 🔑 Cryptography  
**Repository:** https://github.com/denismaggior8/enigma-python-mcp  
**GitHub Stars:** 5  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/denismaggior8-enigma-python-mcp

## Description
A Model Context Protocol server that brings the capabilities of enigmapython library to LLMs, allowing them to encrypt and decrypt messages using historically accurate Enigma machine emulators.

## Tools
Capabilities this server exposes over MCP:

- **encrypt_message** — 
    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.
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "enigma-python-mcp": {
    "command": "uvx",
    "args": ["enigmapython-mcp"]
  }
}
```

## Documentation

## What denismaggior8/enigma-python-mcp does

The denismaggior8/enigma-python-mcp MCP server connects an MCP-compatible client to the enigmapython library. It exposes Enigma emulators for the M3, M4, I, I_Norway, I_Sondermaschine, K, K_Swiss, D, Z, B_A133, and T models. The available operation can process either plaintext for encryption or ciphertext for decryption, provided the machine settings are supplied correctly.

The server is intended for historical Enigma configurations and controlled message processing. It is not described as a general-purpose encryption service, and the input rules vary by machine. Enigma Z accepts digits only, B_A133 accepts its specified Swedish character set, and the other models require standard A–Z letters. Spaces, punctuation, and other special characters are not accepted.

## How it works

An MCP client calls `encrypt_message` with a model name, message, rotor list, reflector object, and, where applicable, plugboard mappings. Encryption and decryption use the same operation; the direction depends on whether the supplied message is plaintext or ciphertext and whether the settings match the original machine configuration.

Rotor entries include a rotor type, ring setting, and initial position. Their order is significant: provide them from the fastest or rightmost rotor to the slowest or leftmost rotor, followed by the Greek rotor for M4. The reflector must match the selected machine. For example, M3 and I use UKWA, UKWB, or UKWC, while M4 uses UKWBThin or UKWCThin. Other models have their own required reflector families.

## Setup and configuration

The denismaggior8/enigma-python-mcp package requires Python 3.11 or newer. Install it from PyPI with `pip install enigmapython-mcp`, or run it through `uvx enigmapython-mcp`. Local clients can start the server over stdio with `enigmapython-mcp --transport stdio`.

For network access, start the SSE transport with a host and port, such as `--transport sse --host 0.0.0.0 --port 8000`. Docker is also supported: build the image from the repository and run it interactively for stdio, or publish port 8000 for SSE.

Claude Desktop can use either a Python/uvx command or a Docker command in its MCP configuration. Release bundles are also provided for Claude Desktop, including Docker-based and Python-based packages. The README additionally documents a local OpenCode configuration.

## Tools and capabilities

The server provides one MCP tool:

- `encrypt_message`: Encrypts or decrypts a message using a selected Enigma model and complete machine settings.
- Supports rotor types, ring settings, initial positions, reflectors, and optional plugboard pairs.
- Handles rotating reflector fields where the selected reflector requires them.
- Supports stdio for local integrations and SSE for network connections.

## Limitations and notes

Correct rotor ordering, reflector selection, character set, and initial settings are required. Plugboard pairs are optional and are ignored for machines without a plugboard. The README’s M4 example contains spaces in its prompt, but the tool specification states that spaces and special characters are forbidden, so input should follow the stricter tool constraint.

The repository includes tests covering encryption and decryption reversibility across the supported models. SSE calls require the MCP initialization handshake; the README recommends MCP Inspector rather than direct, unauthenticated curl requests for interactive testing.

The denismaggior8/enigma-python-mcp project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/denismaggior8-enigma-python-mcp/readme_

