Skip to Content
MCP ServersCommunitySlowtime MCP Server

Slowtime MCP Server

View original on GitHub 

A Model Context Protocol server for secure time-based operations with timing attack protection and timelock encryption.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Claude β”‚ β”‚ Desktop β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Timelock │◄──────────────────►│ Slowtime β”‚ β”‚ Encryption β”‚ β”‚ MCP β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ Server β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Timing │◄─────────────────►│ Interval β”‚ β”‚ Protection β”‚ β”‚ Manager β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Features

Time Fuzzing & Security

Input Time ──┐ β”Œβ–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Random Fuzz β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ (100-5000ms) β”œβ”€β”€β”€β”€β–Ίβ”‚ Jittered β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ Timestamp β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Timelock Encryption Flow

Data ───────┐ β”Œβ–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Encrypt β”‚ β”‚ Interval β”‚ β”‚ League of β”‚ β”‚ with β”œβ”€β”€β”€β–Ίβ”‚ Duration β”œβ”€β”€β”€β–Ίβ”‚ Entropy β”‚ β”‚ Timelock β”‚ β”‚ Remaining β”‚ β”‚ Network β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Interval Management

[Start]──►[Active]──┐ β–² β”‚ β”‚ β–Ό [Resume] [Pause] β”‚ β–² β–Ό β”‚ [Paused]

Installation

Add to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:

{ "mcpServers": { "slowtime": { "command": "node", "args": ["/path/to/slowtime-mcp-server/build/index.js"] } } }

Usage

Basic Interval Commands

start_interval "Focus Time" 25 ───► [25min Interval Created] β”‚ check_interval <id> β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ pause_interval <id> β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ resume_interval <id> β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Timelock Encryption

1. Start Interval: "Focus Time" (25min) ──► [Interval ID: abc123] 2. Encrypt Data: "secret" + abc123 ──► [Timelock ID: xyz789] 3. Attempt Decrypt: - Before interval ends: "Not yet decryptable" - After interval ends: "secret"

Security Features

Timing Attack Prevention

Operation ──┬──► Random Delay (100-5000ms) β”‚ β”œβ”€β”€β–Ί Jittered Timestamps β”‚ └──► Constant-time Comparisons

Timelock Security & Storage

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Encrypt β”‚ β”‚ Distributed β”‚ β”‚ Timelock β”‚ β”‚ DuckDB β”‚ β”‚ Data β”œβ”€β”€β”€β–Ίβ”‚ Randomness β”œβ”€β”€β”€β–Ίβ”‚ Protected β”œβ”€β”€β”€β–Ίβ”‚ TimeVault β”‚ β”‚ β”‚ β”‚ Network β”‚ β”‚ Data β”‚ β”‚ Storage β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–² β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–Ό β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β” β”‚ Analytics β”‚ β”‚ & Statistics β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

TimeVault Analytics

Query History ──┐ β”œβ”€β”€β–Ί β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” Filter Options β”˜ β”‚ DuckDB β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ WASM β”œβ”€β”€β”€β–Ίβ”‚ Analytics β”‚ Vault Stats ───────►│ Engine β”‚ β”‚ Results β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Architecture

The server consists of four main components:

  1. TimeFuzz: Provides timing attack protection through:

    • Random duration fuzzing
    • Constant-time comparisons
    • Jittered timestamps
    • Random operation delays
  2. TimeKeeper: Manages intervals with:

    • Creation/pause/resume operations
    • Progress tracking
    • Automatic cleanup
    • Fuzzing integration
  3. TimeLock: Handles encryption with:

    • drand network integration
    • Interval-based decryption
    • Automatic cleanup
    • Secure random number generation
  4. TimeVault: Provides persistent storage and analytics:

    • DuckDB WASM-based storage
    • Historical tracking of encrypted data
    • Analytics and statistics
    • Query capabilities with filtering

TimeVault Commands

Query historical data and statistics about encrypted timevaults:

# List vault history with filtering list_vault_history --interval_id=abc123 --decrypted_only=true --limit=10 # Get vault statistics get_vault_stats Example output: Total vaults: 150 Decrypted vaults: 75 Average decryption time: 45 seconds

Storage Schema

The TimeVault uses DuckDB WASM for persistent storage with the following schema:

CREATE TABLE timevaults ( id VARCHAR PRIMARY KEY, encrypted_data TEXT NOT NULL, round_number BIGINT NOT NULL, created_at TIMESTAMP NOT NULL, decrypted_at TIMESTAMP, interval_id VARCHAR NOT NULL, metadata JSON ); -- Indexes for efficient querying CREATE INDEX idx_interval_id ON timevaults(interval_id); CREATE INDEX idx_created_at ON timevaults(created_at);

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT License - see LICENSE file for details

Last updated on