A CLI tool and MCP (Model Context Protocol) server for querying and analyzing TensorBoard event files without requiring a running TensorBoard server.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"tb-query": {
"env": {
"TB_QUERY_EVENTS_PATH": "/path/to/your/tensorboard/logs"
},
"command": "tb-query-mcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A CLI tool and MCP (Model Context Protocol) server for querying and analyzing TensorBoard event files without requiring a running TensorBoard server.
This server supports HTTP transport. Be the first to test it — help the community know if it works.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked tb-query against OSV.dev.
Click any tool to inspect its schema.
event_filesAutomatically lists available event files from the directory specified by TB_QUERY_EVENTS_PATH environment variable
event_files://
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml / analytics
Persistent memory using a knowledge graph
Dynamic problem-solving through sequential thought chains
Workspace template + MCP server for Claude Code, Codex CLI, Cursor & Windsurf. Multi-agent knowledge engine (ag-refresh / ag-ask) that turns any codebase into a queryable AI assistant.
MCP Server for GCP environment for interacting with various Observability APIs.
MCP Security Weekly
Get CVE alerts and security updates for Tb Query and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A CLI tool and MCP (Model Context Protocol) server for querying and analyzing TensorBoard event files without requiring a running TensorBoard server.
tb-query allows you to directly interact with TensorBoard's events.out.tfevents.* files to extract scalar data, calculate statistics, find correlations, and more. It's particularly useful for:
pip install tb-query
git clone https://github.com/Alir3z4/tb-query.git
cd tb-query
pip install -e .
Extract scalar data from a TensorBoard event file:
# Query all available tags
tb-query query path/to/events.out.tfevents.12345
# Query specific tags
tb-query query path/to/events.out.tfevents.12345 --tags loss --tags accuracy
# Query with step range filtering
tb-query query path/to/events.out.tfevents.12345 --start_step 100 --end_step 200
# Combine filters
tb-query query path/to/events.out.tfevents.12345 --tags loss --start_step 100 --end_step 200
Output format (JSON):
{
"loss": [
{"step": 100, "value": 0.5},
{"step": 101, "value": 0.48}
],
"accuracy": [
{"step": 100, "value": 0.85},
{"step": 101, "value": 0.86}
]
}
List all available scalar tags in an event file:
# List all tags
tb-query tags path/to/events.out.tfevents.12345
# Filter tags containing specific strings
tb-query tags path/to/events.out.tfevents.12345 --filter loss
tb-query tags path/to/events.out.tfevents.12345 --filter loss --filter accuracy
Output format (JSON):
{
"tags": ["train/loss", "train/accuracy", "eval/loss", "eval/accuracy"]
}
Locate all TensorBoard event files in a directory:
tb-query find path/to/logs
Output format (JSON):
{
"event_files": [
{
"path": "path/to/logs/run1/events.out.tfevents.12345",
"created_at": "2025-11-04T10:30:00.123456"
},
{
"path": "path/to/logs/run2/events.out.tfevents.67890",
"created_at": "2025-11-03T15:20:00.654321"
}
]
}
Files are sorted by creation time (newest first).
Get the step numbers for specific tags:
tb-query steps path/to/events.out.tfevents.12345 --tags loss --tags accuracy
Output format (JSON):
{
"loss": [0, 10, 20, 30, 40, 50],
"accuracy": [0, 10, 20, 30, 40, 50]
}
Calculate statistical measures for tag values:
tb-query stats path/to/events.out.tfevents.12345 --tags loss --tags accuracy
Output format (JSON):
{
"loss": {
"min": 0.15,
"max": 2.34,
"mean": 0.85,
"std": 0.42,
"count": 1000
},
"accuracy": {
"min": 0.65,
"max": 0.98,
"mean": 0.87,
"std": 0.08,
"count": 1000
}
}
Calculate Pearson correlations between scalar tags:
# Basic correlation
tb-query correlation path/to/events.out.tfevents.12345 --tags "loss,accuracy"
# With step range
tb-query correlation path/to/events.out.tfevents.12345 --tags "loss,accuracy" --start_step 100 --end_step 200
# With interpretation
tb-query correlation path/to/events.out.tfevents.12345 --tags "loss,accuracy" --display-interpretation true
# Custom rounding
tb-query correlation path/to/events.out.tfevents.1
... [View full README on GitHub](https://github.com/Alir3z4/tb-query#readme)