claude-subagent-mcp
by chrisliebaer
README.md
# claude-subagent-mcp
MCP server that gives an agent structured and complete views into a Claude Code agent's `.jsonl` log without reading the raw file.
It speaks MCP 2026-07-28 over stdio through `mcp==2.0.0`.
## Tools
* `get_last_status(path, count, after_line=0)` returns the last `count` assistant lines carrying visible text blocks and includes all text blocks of each returned line.
* `get_last_tools(path, count, after_line=0)` returns the last `count` assistant lines carrying tool calls with name and input but without results and includes all tool calls of each returned line.
`count` is applied after filtering, so exactly `count` qualifying lines are returned whenever that many exist.
`after_line` is a lower bound on raw line numbers and only lines strictly greater than it are considered.
Pass the highest `line` already seen as `after_line` to suppress repeats.
Returned `line` values are raw file line numbers and therefore contain gaps.
An incomplete trailing line is ignored.
Any other line that does not parse makes the tool report a format error.
## Install into Claude Code
```bash
claude mcp add --scope user claude-subagent-log -- uvx --from git+https://github.com/chrisliebaer/claude-subagent-mcp claude-subagent-mcp
```
Pin a tag or commit with `@<ref>` behind the repository URL to keep the server from changing under an agent.
For a local checkout use `uv --directory <checkout> run claude-subagent-mcp` as the command instead.
## Development
```bash
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypy src tests
```
TDQS
A3.9/5.0
Scored across 2 tools
Disambiguation5/5
The two tools are clearly distinct: one retrieves text/status messages, the other retrieves tool call details. There is no overlap in purpose or output.
Naming Consistency5/5
Both tool names follow a consistent `get_last_<entity>` pattern, making it easy for an agent to predict the naming convention.
Tool Count3/5
With only 2 tools, the server feels thin for a general subagent monitoring use case. However, it may be appropriately minimal if the server's scope is intentionally limited to just observing agent output.
Completeness3/5
The tools cover reading status and tool calls, which are core observation needs. However, there are no tools for filtering by type, searching, or managing the agent's state, leaving notable gaps for a monitoring server.
Maintenance
ActivitySlowing
ResponsivenessNo issues