inspect-logs-mcp
# inspect-logs-mcp
MCP server for exploring [inspect_ai](https://github.com/UKGovernmentBEIS/inspect_ai) evaluation logs from Claude Code.
## What it does
This MCP server gives Claude Code, Cursor, and other LLMs direct access to your inspect_ai evaluation logs, allowing you to:
- **List logs**: See all your evaluation runs with metadata
- **View summaries**: Get detailed evaluation results, scores, and token usage
- **Inspect samples**: View full conversation history for any sample
- **Search & filter**: Find logs by task, model, date, or status
- **Compare runs**: Side-by-side comparison of two evaluation runs
- **Aggregate stats**: Get statistics across multiple runs
## Installation
Currently only source installation is supported.
```bash
git clone https://github.com/PranshuSrivastava/inspect-logs-mcp.git
cd inspect-logs-mcp
pip install -e .
```
## Configuration
To use with Claude code in your current directory, run the following command:
```bash
claude mcp add --transport stdio inspect-logs inspect-logs-mcp
```
To use with Claude code in your global configuration, run the following command:
```bash
claude mcp add --scope user --transport stdio inspect-logs inspect-logs-mcp
```
To use with Cursor, Antigravity or other IDEs, add the following to your mcp config file:
```json
{
"mcpServers": {
"inspect-logs": {
"command": "inspect-logs-mcp",
"env": {
"INSPECT_LOG_DIR": "./logs"
}
}
}
}
```
## Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| `INSPECT_LOG_DIR` | Directory containing `.eval` log files | `./logs` |
| `INSPECT_LOGS_MCP_DEFAULT_LIMIT` | Default number of logs limit | `50` |
| `INSPECT_LOGS_MCP_MAX_LIMIT` | Maximum number of logs limit | `500` |
## How it Works
The server reads `.eval` files (which are ZIP archives containing JSON) using the `inspect_ai.log` API. All file operations happen in memory - no files are extracted to disk, so your logs directory stays clean.
## Requirements
- Python 3.10+
- inspect-ai >= 0.3.70
- mcp >= 1.0.0
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: compare_runs compares two specific runs, get_aggregate_stats provides cross-run statistics, get_eval_summary gives detailed metadata for a single run, get_sample retrieves granular sample data, list_logs enumerates available logs, and search_logs filters logs by criteria. The descriptions clearly differentiate their scopes, making misselection unlikely.
All tools follow a consistent verb_noun pattern with 'tool_' prefix (e.g., tool_compare_runs, tool_get_aggregate_stats). The verbs are descriptive and appropriate for their functions (compare, get, list, search), and the nouns precisely indicate the target resources (runs, stats, summary, sample, logs). This consistency aids predictability and usability.
With 6 tools, this server is well-scoped for inspecting evaluation logs. The count aligns with the domain's needs: listing and searching logs, retrieving summaries and samples, comparing runs, and aggregating statistics. Each tool earns its place without redundancy, covering essential operations without being overwhelming or insufficient.
The toolset provides complete coverage for log inspection: list_logs and search_logs for discovery, get_eval_summary and get_sample for detailed analysis, compare_runs for comparison, and get_aggregate_stats for cross-run insights. There are no obvious gaps; agents can navigate from discovery to deep analysis seamlessly, supporting typical evaluation workflows.