nats-view
A command line utility for watching NATS and NATS JetStream topics with support for filtering, pretty-printing JSON, and historical replay.
Features
- Real-time Monitoring: Watch core NATS subjects with ease.
- JetStream Support: Replay historical data using
--since,--deliver-all, or--deliver-last. - Visualization: Pretty-printed JSON, colorized output, timestamps, and headers.
- Filtering: Server-side subject filtering and client-side regex payload filtering.
- Security: Support for User/Pass, Token, Credentials, and TLS/SSL.
- MCP Compatible: Ready to be used as a tool for LLMs via the Model Context Protocol.
Installation
Via pipx (Recommended)
pipx install .
Via Poetry (Development)
poetry install
poetry run nats-view --help
Usage
Basic
Watch all subjects on localhost:
nats-view
Watch specific subjects:
nats-view "orders.>" "logs.*"
JetStream History
Replay messages from the last hour:
nats-view --js --since 1h "orders.>"
Get the last known value for a subject:
nats-view --js --deliver-last "status.system"
Filtering & formatting
Show only messages containing "error", pretty-print the JSON, and exit after 5 matches:
nats-view --filter "error" --pretty --count 5 ">"
MCP Tool Usage
This tool includes a definition for the Model Context Protocol (MCP), allowing AI assistants to inspect your NATS clusters.
Tool Definition
The tool definition is located in mcp-tool.json.
Configuration Example (Claude Desktop / Generic MCP Client)
To use this with an MCP server that runs CLI commands (like a generic "command-runner" MCP server), map the arguments as follows:
Executable: nats-view (ensure it is in your PATH)
Argument Mapping:
subjects-> Positional argumentshost->-hport->-pcount->-nfilter->--filterjs->--jssince->--sincedeliver_all->--deliver-alldeliver_last->--deliver-lasttimestamp->--timestampheaders->--headers
Note for LLMs: When using this tool, always specify a count (e.g., 10 or 50) to prevent the tool from running indefinitely when watching high-traffic subjects.
Metadata
Release files for nats-view 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nats_view-0.2.1.tar.gz | 5.3 kB | Without provenance | Details for nats_view-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nats_view-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for nats_view-0.2.1-py3-none-any.whl |
Total release size: 11.5 kB
Release files / nats_view-0.2.1.tar.gz
| Download URL | nats_view-0.2.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b497b7069d768f4ad8d28ca850d73f6324f5c67316181331e31da19d73e5d89a
|
|
BLAKE2b-256 checksum How to use checksums |
e0767fa2f7e5c21c7159415124299bf5e524248ab5b79bb6ded3be5548bede73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.11 Windows/11
|
Release files / nats_view-0.2.1-py3-none-any.whl
| Download URL | nats_view-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b97ef19662e6a92082d467cc5d1e158f77f21c255589aa8cb795b45db6c54648
|
|
BLAKE2b-256 checksum How to use checksums |
bc315ad1c4034aa3000940c995cfc16ec197f9a2449ea8af197bb80baf3742d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.11 Windows/11
|
Security for nats-view 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.