# mcpspy documentation
`mcpspy` is a transparent stdio proxy for MCP servers. It forwards JSON-RPC 2.0 frames byte-for-byte between an MCP host and a child server while recording latency, token estimates, errors, and redacted payload previews into a local SQLite database. One binary provides the proxy, CLI reporting, a live TUI, and a self-inspecting MCP server.
## Guides
- [Usage guide](usage.md) — every command, flag, default, and worked example, plus the duration syntax.
- [MCP and agent reference](mcp.md) — registering `mcpspy mcp`, the `get_mcp_stats` / `get_slow_calls` tools, and self-audit workflows.
- [Architecture guide](architecture.md) — module responsibilities, proxy data flow, hard invariants, database schema, and feature flags.
- [Troubleshooting](troubleshooting.md) — symptom-first fixes for missing telemetry, protocol issues, lock contention, and redaction.
For the product vision and the five hard architectural invariants, see [SPEC.md](../SPEC.md). For release history, see [CHANGELOG.md](../CHANGELOG.md). Contributor setup and verification live in [CONTRIBUTING.md](../CONTRIBUTING.md).