claude-subagent-mcp
claude-subagent-mcp
MCP 서버로, 에이전트가 Claude Code 에이전트의 .jsonl 로그를 원시 파일로 읽지 않고도 구조화되고 완전한 뷰를 제공합니다. mcp==2.0.0을 통해 stdio 위에서 MCP 2026-07-28을 사용합니다.
도구
get_last_status(path, count, after_line=0)— 마지막count개의 보이는 텍스트 블록을 포함하는 어시스턴트 라인을 반환하며, 반환된 각 라인의 모든 텍스트 블록을 포함합니다.get_last_tools(path, count, after_line=0)— 마지막count개의 도구 호출(이름과 입력 포함, 결과 제외)을 포함하는 어시스턴트 라인을 반환하며, 반환된 각 라인의 모든 도구 호출을 포함합니다.
count는 필터링 후 적용되므로, 정확히 count개의 조건을 만족하는 라인이 존재하는 경우 반환됩니다.
after_line은 원시 라인 번호의 하한이며, 이보다 큰 라인만 고려됩니다.
이미 본 가장 높은 line을 after_line으로 전달하여 중복을 방지합니다.
반환된 line 값은 원시 파일 라인 번호이므로 간격이 있습니다.
완성되지 않은 마지막 라인은 무시됩니다.
구문 분석되지 않는 다른 라인은 도구가 형식 오류를 보고하도록 합니다.
Related MCP server: mcp-session-insight
Claude Code에 설치
claude mcp add --scope user claude-subagent-log -- uvx --from git+https://github.com/chrisliebaer/claude-subagent-mcp claude-subagent-mcp에이전트가 서버를 변경하지 못하도록 하려면 저장소 URL 뒤에 @<ref>로 태그 또는 커밋을 고정하세요.
로컬 체크아웃을 사용하는 경우 명령어 대신 uv --directory <checkout> run claude-subagent-mcp를 사용하세요.
개발
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypy src testsAvailable Tools
2 toolsget_last_statusA
Return the last count status messages the agent emitted.
Status messages are the visible text blocks of assistant lines. Every assistant line carrying at least one text block counts as one entry and all of its text blocks are returned. Entries are ordered oldest first and tagged with their raw line number.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the agent's .jsonl log file. | |
| count | Yes | Number of qualifying log lines to return, counted after filtering. | |
| after_line | No | Only lines with a number strictly greater than this are considered. Pass the highest `line` you already received to suppress repeats, 0 means all. |
Output Schema
| Name | Required | Description |
|---|---|---|
| entries | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the full burden and does well by explaining that entries are ordered oldest first, tagged with line numbers, and that every assistant line with at least one text block counts as one entry. This provides clear behavioral context beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, well-structured, and front-loaded with the core purpose. Every sentence adds value without redundancy, though it could be slightly more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is straightforward with only three parameters, has an output schema (though not shown), and the description thoroughly explains return behavior. No obvious gaps remain for an agent to successfully invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with detailed parameter descriptions for `path`, `count`, and `after_line`. The description adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool returns the last `count` status messages, specifies that it deals with assistant line text blocks, and distinguishes it from potential sibling tools like get_last_tools by focusing on status messages only.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use this tool versus get_last_tools, nor does it mention any preconditions or alternative scenarios. The agent must infer use cases from the description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_last_toolsA
Return the last count tool-calling lines the agent emitted.
Every assistant line carrying at least one tool call counts as one entry and all of its tool calls (name and input, without results) are returned. Entries are ordered oldest first and tagged with their raw line number.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the agent's .jsonl log file. | |
| count | Yes | Number of qualifying log lines to return, counted after filtering. | |
| after_line | No | Only lines with a number strictly greater than this are considered. Pass the highest `line` you already received to suppress repeats, 0 means all. |
Output Schema
| Name | Required | Description |
|---|---|---|
| entries | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses several behavioral traits: each assistant line with at least one tool call counts as one entry, only tool call names and inputs (not results) are returned, entries are ordered oldest first, and each is tagged with the raw line number. This goes beyond the schema and gives important context, though it does not explicitly state read-only behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: the first sentence delivers the core purpose, and the second provides necessary clarifications about counting, ordering, and tagging. Every sentence provides substantive value with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains the tool's return semantics, filtering behavior, and ordering well, and an output schema exists to further clarify the response shape. It is complete enough for a simple retrieval tool, though it does not mention error conditions or explicitly frame when this tool is preferable over the sibling, leaving a small gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already contains 100% coverage with detailed descriptions for all three parameters, including after_line's pagination use. The description adds some context for count ('counted after filtering') but largely does not enhance beyond what the schema already provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Return the last `count` tool-calling lines the agent emitted,' which clearly states the verb (Return), resource (tool-calling lines from the agent's log), and scope (last count). It also distinguishes itself from the sibling get_last_status by focusing specifically on tool calls rather than status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides thorough operational details (e.g., counting rules, ordering, after_line suppression) but does not explicitly state when to use this tool versus get_last_status or any alternative. Its usage is implied from the main verb and context, but clear exclusions or alternatives are absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
get_last_status - First observed
get_last_tools
TDQS
Scored across 2 tools
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.
Both tool names follow a consistent `get_last_<entity>` pattern, making it easy for an agent to predict the naming convention.
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.
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
Related MCP Connectors
Ingest and search LogsLoom logs from coding agents.
Read a tool-call log from an AI agent run and see which calls failed, looped or were slow.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to automatically inspect and analyze application runtime log files for debugging and troubleshooting. Supports monitoring multiple log directories simultaneously with tools for listing, reading, searching, and paginating through log files.8MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to query and analyze past Claude Code sessions, providing structured insights like file changes, decisions, errors, and git history across projects.1111 npm1MIT
- AlicenseNot gradedqualityBmaintenanceIndexes and searches agent conversation logs from Antigravity and Cursor workspaces, enabling semantic search, token analysis, and benchmarking over local SQLite storage.7 npmMIT
- AlicenseAqualityBmaintenanceA read-only MCP server that exposes local coding-agent session logs as three tools for introspection of recent work, debugging tool failures, and tracking token usage and estimated cost without parsing log files.3MIT