Ultratimonel — Pre-flight Gate Enforcement MCP Server
Ultratimonel is an MCP (Model Context Protocol) server that enforces a deterministic pre-flight gate protocol in Hermes. It ensures that every LLM generation has consulted AgentMemory (1a), Checkpoint (1b), and Deck (1e) before generating a response.
Quick Start
# Set up
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Run (stdio transport — default for Hermes integration)
python main.py
# Run (with custom DB path)
ULTRATIMONEL_DB_PATH=/tmp/test.db python main.py
# Deploy SOUL.md rules
./scripts/deploy_soul.sh
# Run tests
pytest tests/ -v
Tools
assert_gates(message, session_id, sender="user")
Run all three pre-flight gates and return structured results.
- Input: message string, Hermes session ID, optional sender
- Output: JSON with
gates[],status(PASS/BLOCK/WARN),context,context_envelope,timestamp - Execution order: 1a AgentMemory → 1b Checkpoint → 1e Deck
check_gate(name, session_id)
Read the current status of a single gate from SQLite persistence.
- Input: gate name (
1a,1b,1e), session ID - Output: JSON with
name,state,mandatory,message,updated_at
complete_gate(name, session_id, reason)
Explicitly mark a BLOCK or WARN gate as PASS. Only works when current state is BLOCK or WARN.
- Input: gate name, session ID, optional reason string
- Output: JSON with
name,state(PASS),updated_at,message
Gate States
| State | Meaning | Generation Action |
|---|---|---|
PASS |
Gate completed successfully | Continue |
SKIP |
Gate does not apply / N/A | Continue |
WARN |
Gate failed (non-critical) | Warn + continue |
BLOCK |
Gate failed (mandatory) | Halt generation |
Architecture
ultratimonel/
├── main.py # Entry point (stdio transport)
├── requirements.txt # fastmcp, httpx
├── ultratimonel/
│ ├── __init__.py # Package metadata
│ ├── server.py # FastMCP tool registration
│ ├── persistence.py # SQLite layer (WAL, migrations)
│ ├── context_extractor.py# Message → sender/topic/project
│ ├── gate_engine.py # State machine (PASS/SKIP/WARN/BLOCK)
│ ├── triple_match.py # 1a→1b→1e orchestration
│ └── bridge.py # mcp-capabilities bridge stub
├── scripts/
│ └── deploy_soul.sh # SOUL.md rule injection
└── tests/
├── test_gate_engine.py
├── test_context_extractor.py
├── test_persistence.py
├── test_triple_match.py
└── test_integration.py
Database
SQLite database at ~/.hermes/ultratimonel.db (configurable via
ULTRATIMONEL_DB_PATH). Six tables:
schema_version— migration trackingsessions— per-generation contextgate_state— per-gate status per session+projectgate_logs— audit trail of state transitionscheckpoints— triple-match snapshotsmissions— top-level mission lifecycle
WAL journal mode, NORMAL synchronous, 5s busy timeout.
SOUL.md Deployment
Run scripts/deploy_soul.sh to inject the pre-flight protocol rules
into ~/.hermes/SOUL.md. The script:
- Backs up the existing SOUL.md
- Checks for the
## Protocolo Pre-flight (OBLIGATORIO)section - Updates in-place or appends as needed
- Supports
--force,--dry-runflags
Error Handling
All external MCP tool calls (AgentMemory, Checkpoint, Deck) are wrapped in try/except with SKIP fallback. The server never crashes from external failures. See the SDD for detailed error scenarios.
Dependencies
- Python ≥ 3.13
fastmcp— MCP frameworkhttpx— HTTP client for external MCP callssqlite3— stdlib persistence
License
MIT
Release files for ultratimonel 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ultratimonel-1.0.1.tar.gz | 22.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ultratimonel-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.7 kB
Release files / ultratimonel-1.0.1.tar.gz
| Download URL | ultratimonel-1.0.1.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6772160a8a779c0db020ad195007cb376d546c8137e6aee1aff2eaab68296a0a
|
|
BLAKE2b-256 checksum How to use checksums |
7ea82e66813ed7040934eb456ebebe39356c81d62bae8003ad34976c3fa228d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / ultratimonel-1.0.1-py3-none-any.whl
| Download URL | ultratimonel-1.0.1-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e381e931908a7a8fad53dfd2d41ed6d8badae212a4eff26f29ba132c5281657e
|
|
BLAKE2b-256 checksum How to use checksums |
363e407a20988c5f65b6833cb5746e16fdcb620f448bed7151dacda4442d0292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|