Skip to main content

See what your AI agent would do, without letting it do anything. Zero-config dry-run proxy for MCP servers.

Project description

Ghost Mode

See what your AI agent would do, without letting it do anything.

Ghost Mode is a safe first step before giving an AI agent real authority.

It's a zero-config dry-run layer for AI agents. It intercepts every write and lets reads through. Think of it as a flight simulator for AI agents — nothing gets modified, but you see everything the agent tried to do.

Requires Python 3.9+.

Quick Start

MCP Client Users (Claude Desktop, Cursor, etc.)

pip install ghostmode
ghostmode -- npx @modelcontextprotocol/server-filesystem ~/Documents

Point your agent at Ghost Mode instead of the real server. When the session ends, a summary is written to ghostmode-summary.txt in your working directory and printed to stderr.

OpenClaw Users

# 1. Install Ghost Mode
pip install ghostmode

# 2. Install the OpenClaw plugin
openclaw plugins install @unwind/ghostmode-openclaw

# 3. Restart the gateway

Ghost Mode hooks into OpenClaw's tool-call system. Every write is intercepted. Every read passes through.

What it does

Ghost Mode intercepts state-modifying tool calls — file writes, deletions, emails, API posts, shell commands — and returns fake success responses. The agent thinks it completed the action. Your filesystem, email, and APIs are untouched.

A shadow virtual filesystem keeps the agent consistent: if it "writes" a file and then reads it back, Ghost Mode serves the written content from memory. The agent doesn't know it's in a sandbox.

Example output

=======================================================
  GHOST MODE SESSION SUMMARY
=======================================================
  Duration:     47.3s
  Total events: 12
  Intercepted:  4 writes blocked
  Passed:       7 reads forwarded
  Shadow reads: 1 served from VFS

  Files the agent tried to write:
    /home/user/Documents/report.md
    /home/user/Documents/summary.txt

  Files the agent tried to delete:
    /home/user/Documents/old_draft.md

  4 write(s) were blocked. Nothing was modified.

  Full timeline:
  14:23:01  [PASSED]  fs_read  /home/user/Documents/notes.txt
  14:23:02  [PASSED]  fs_list  /home/user/Documents
  14:23:03  [BLOCKED] fs_write /home/user/Documents/report.md
  14:23:04  [SHADOW]  fs_read  /home/user/Documents/report.md
  14:23:05  [BLOCKED] fs_delete /home/user/Documents/old_draft.md
  14:23:06  [BLOCKED] send_email
  14:23:07  [PASSED]  fs_read  /home/user/Documents/config.json
=======================================================

Use cases

Testing untrusted tools. Install a new MCP server and see what it actually does before giving it real access.

Reviewing agent behaviour. Let your agent plan and "execute" a complex task, then review the timeline before running it for real.

Demos and training. Show stakeholders what an AI agent workflow looks like without risking real data.

Compliance dry runs. Verify that an agent workflow stays within policy boundaries before going live.

What Ghost Mode is not

Ghost Mode does not enforce policy or provide rollback. It is a visibility tool, not a security system. If you need enforcement, audit trails, or recovery, that's what UNWIND is for.

CLI options (MCP proxy mode)

ghostmode -- <upstream command>        Basic usage
ghostmode -v -- <command>              Verbose: log every action to stderr
ghostmode --export log.json -- <cmd>   Export session log on exit
ghostmode --also-block my_tool -- ...  Add custom tool names to intercept

How it knows what to block

Ghost Mode recognises 50+ common MCP tool names as state-modifying (filesystem writes, email sends, API posts, shell commands, database mutations, git operations). It also uses prefix heuristics: any tool starting with create_, delete_, send_, write_, execute_, etc. gets intercepted. The block list is heuristic-based and configurable.

If a tool slips through, use --also-block tool_name to add it.

Zero dependencies

Ghost Mode has no external dependencies. It uses only Python 3.9+ stdlib (asyncio, json, pathlib). It installs in under a second.

Known limitations

Shell commands can't see ghost-written files. If the agent writes a file through Ghost Mode and then tries to run it via bash_exec or shell_exec, the shell will fail because the file only exists in the in-memory shadow VFS, not on disk. Ghost Mode works best for tool-call-level dry runs, not multi-step build/execute workflows.

Session summary in background clients. Claude Desktop and Cursor run MCP servers in the background and may not surface stderr output. Ghost Mode automatically writes a ghostmode-summary.txt file to your working directory on exit. You can also use --export log.json for a machine-readable session log.

Want more?

Ghost Mode shows you what happened. UNWIND lets you control it:

  • 15-stage enforcement pipeline (path jail, SSRF shield, DLP, canary honeypots)
  • Smart snapshots with one-command rollback
  • CRAFT tamper-evident audit chain
  • Real-time trust light dashboard
  • Detects encoded/obfuscated data exfiltration attempts
pip install unwind-mcp

github.com/unwind-mcp/unwind

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghostmode-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghostmode-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file ghostmode-0.1.0.tar.gz.

File metadata

  • Download URL: ghostmode-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ghostmode-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1613bef571fa3f7635b0a68feb4da690a569699d5950178d7a39c149f4bd03a
MD5 5dd5103f548da401212b539b3c304bb8
BLAKE2b-256 e000db9c1e2cffe0dbe253b6d72796b2156b01a87c99005c447f356b1b62c8ae

See more details on using hashes here.

File details

Details for the file ghostmode-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ghostmode-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ghostmode-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be2564b2da6c8ce9af7d414aa8ecfa89a91ef96995e23aef04cd8eeaf425ad58
MD5 1d479dd1b812dfdec3b909b65310339e
BLAKE2b-256 f360bf6bea468e5110d4bf0344fce941df91095480ed93223e8be86bbd0bb5cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page