Skip to main content
Glama
Humotica

tibet-phantom-mcp

by Humotica
README.md
# tibet-phantom-mcp

**MCP server for Phantom Resume — cross-device AI session portability with TIBET provenance.**

Start an AI session on your laptop, seal it, walk to any other device, resume exactly where you left off. Every action is cryptographically signed via [TIBET](https://datatracker.ietf.org/doc/draft-vandemeent-tibet/) tokens.

Part of the [TIBET ecosystem](https://humotica.com) by [HumoticaOS](https://github.com/Humotica).

## Install

```bash
pip install tibet-phantom-mcp
```

## Setup

You need a running Phantom server. Set the `PHANTOM_URL` environment variable to point to your server.

## Claude Code / Claude Desktop Config

Add to your MCP settings:

```json
{
  "mcpServers": {
    "phantom": {
      "command": "tibet-phantom-mcp",
      "env": {
        "PHANTOM_URL": "https://your-phantom-server.example.com"
      }
    }
  }
}
```

## Available Tools

| Tool | Description |
|------|-------------|
| `phantom_status` | Server health check — uptime, sessions, backends |
| `phantom_sessions` | List all sealed/active sessions |
| `phantom_backends` | Available compute backends (GPU, Gemini, Claude, Ollama) |
| `phantom_seal` | Seal a session for cross-device resume |
| `phantom_fork` | Inject an intervention into a session (multi-AI handoff) |
| `phantom_audit` | Full forensic audit trail (Open Blackbox) |
| `phantom_fork_history` | History of all forks/interventions |

## How It Works

```
Device A                    Phantom Server              Device B
────────                    ──────────────              ────────
Start session ──────────►   Stores context
Work with AI                TIBET tokens
/exit ──────────────────►   Session sealed
                                                        curl .../resume | sh
                            ◄───────────────────────── Resume request
                            L4 integrity verify ──────► Session restored
                            TIBET chain intact           AI picks up where
                                                         you left off
```

### Multi-AI Fork

Any actor (human or AI) can fork into a session:

```python
# Claude corrects something Gemini said
phantom_fork(
    session_id="phantom-1234-abc",
    intervention="That's not quite right — TIBET uses hash chains, not blockchain.",
    actor="jis:agent:root_ai",
    intent="correct_misconception"
)
```

### Open Blackbox (Audit)

```python
# See exactly what happened inside a session
phantom_audit(session_id="phantom-1234-abc")
# → chronological events, all actors, backends, forks, TIBET provenance
```

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `PHANTOM_URL` | `http://localhost:8000` | Phantom server URL |
| `PHANTOM_TIMEOUT` | `30` | HTTP timeout in seconds |

## Related TIBET Packages

- [`tibet-audit`](https://pypi.org/project/tibet-audit/) — Core TIBET provenance
- [`tibet-triage`](https://pypi.org/project/tibet-triage/) — Process triage with HITL
- [`tibet-ipoll-mcp`](https://pypi.org/project/tibet-ipoll-mcp/) — AI-to-AI messaging MCP server
- [`tibet-pol`](https://pypi.org/project/tibet-pol/) — Machine health monitoring

## License

MIT — HumoticaOS

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: audit, list backends, fork, fork history, seal, list sessions, and status. No two tools overlap in functionality.

Naming Consistency5/5

All tool names follow the consistent pattern 'phantom_<noun>' or 'phantom_<noun_noun>' in snake_case, making them predictable and easy to distinguish.

Tool Count5/5

7 tools is well-scoped for a session management server covering creation, listing, forking, auditing, and status checks. Not too many or too few.

Completeness4/5

Core session lifecycle is covered: create (seal), list, fork, audit, and status. Missing a dedicated 'get_session' tool, but audit provides full details. Minor gap.

Maintenance

ActivityInactive
ResponsivenessNo issues