Skip to main content
  .-----.
  |  🔴  |
  |  🟡  |
  |  🟢  |
  '-----'
   greenlight

greenlight

PyPI Python License: MIT

See what your MCP server is actually doing.

A transparent stdio proxy for the Model Context Protocol. Point it at your real server command instead of running that command directly, and it relays every byte exactly as before -- while recording every JSON-RPC message to a structured log you can watch live or replay.

Right now, if an MCP integration isn't working, you're debugging blind: no visibility into what got sent, what came back, or why a call failed. Greenlight exists to fix that.

greenlight tail, showing a real session: a normal call, a slow call flagged yellow, and a failed tool call flagged red

Real trace, from an actual recorded session (examples/demo-session.jsonl) -- not staged text. Green for a clean success, yellow for a slow-but-fine call, red for a tool that actually failed.

Install

pip install greenlight-mcp

Or from source:

pip install -e .

Use it

Wherever you'd normally configure a server command, wrap it:

greenlight run -- npx -y @some/mcp-server

instead of

npx -y @some/mcp-server

For a remote Streamable HTTP server, proxy it instead of spawning a process:

greenlight run --http http://127.0.0.1:9000/mcp

Greenlight prints the local URL to point your client at (the same path as the target, just on 127.0.0.1:8808 -- see the printed message, which includes the exact path). Same session log, same tail/stats downstream, regardless of which transport produced it.

Every message that passes through gets logged to ./sessions/. Watch it:

greenlight tail                 # replay the most recent session
greenlight tail -f              # follow a session that's still running
greenlight tail path/to/log.jsonl

Trace output is colorized by status: green for a clean success, yellow for a slow-but-fine call, red for anything that actually failed -- including MCP tool-level failures (result.isError), not just transport-level JSON-RPC errors, which are a different thing and easy to miss if you only check for the obvious one. See notes/day1.md for why that distinction mattered enough to write a whole note about it.

Or skip watching it and just get the summary:

greenlight stats                # message counts, latency, pass/fail
greenlight stats --json         # same thing, machine-readable

stats exits non-zero if anything failed -- transport error or tool error -- so it works as a CI check, not just an interactive summary:

greenlight run -- npx -y @some/mcp-server &
# ... drive a real session against it ...
greenlight stats || exit 1

How it works

greenlight run spawns your real server as a subprocess and sits between it and the real MCP client, relaying stdin/stdout on two threads. Every line is parsed as JSON-RPC, correlated by request id (so a response knows its own method name and latency), and written to a JSONL file. The one rule the whole thing depends on: nothing but the child process's actual bytes ever reaches Greenlight's own stdout -- logging and UI output only ever go to stderr or to disk. A single stray print to stdout would corrupt the protocol stream the real client is parsing.

Status

  • greenlight run -- transparent proxy, validated end-to-end against a real MCP server (not a mock)
  • greenlight tail -- live trace viewer, both static replay and genuine live-follow (verified separately, not assumed)
  • Windows PATH resolution for npx-style commands, validated against a real third-party npx-launched server (the official MCP reference server), not just the Python fixture
  • Published to PyPI -- pip install greenlight-mcp
  • greenlight stats -- summary + CI-usable exit code (non-zero on any failure, transport or tool-level)
  • Streamable HTTP transport (greenlight run --http <url>), validated end-to-end against a real HTTP+SSE server, not just stdio

Notes

notes/ is a running engineering log, not a cleaned-up retrospective -- what broke, how it was found, why the fix is what it is.

Download files

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

Source Distribution

greenlight_mcp-0.2.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

greenlight_mcp-0.2.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file greenlight_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: greenlight_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for greenlight_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1c59937f94948284359810683b11df8a5eee528e35784425ecd696840eff1ce4
MD5 a00281828063618ef499690037294348
BLAKE2b-256 428cb8c042c45a24d7cf9c5da3f5cb29365059c1bca8b68266cb47576f0aad4f

See more details on using hashes here.

File details

Details for the file greenlight_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: greenlight_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for greenlight_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6031a8fcf6300cff6bcb504cdbafd4717bbd90112c2cbd008e3418d515298afe
MD5 98318cf684aff5be5c6ef255d8326c1b
BLAKE2b-256 44e52fa0691b1a28972b61802542ef0f8d52bb6a240f2326dcb99d89f2d60fab

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

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