Skip to content

feat(functions): add claude_mcp_logs viewer - #36

Closed
sha1n wants to merge 2 commits into
masterfrom
feat/claude-mcp-logs
Closed

feat(functions): add claude_mcp_logs viewer#36
sha1n wants to merge 2 commits into
masterfrom
feat/claude-mcp-logs

Conversation

@sha1n

@sha1n sha1n commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

Adds claude_mcp_logs, a shell command that shows the stderr log Claude Code captures for a stdio MCP server. It replaces a manual search through the Claude Code cache directory.

Changes

  • Add claude_mcp_logs and its private helpers, with a completion for the server names.
  • Resolve the default Claude Code log root per platform, not only for macOS.

Review notes

  • CLAUDE_MCP_LOG_ROOT overrides the log root. It is a test hook, and include/exports does not declare it.
  • The command needs jq, and it stops with an error when jq is absent.

sha1n and others added 2 commits August 30, 2026 07:56
Read the stderr log that Claude Code captures for a stdio MCP server.
Flags select every session, the connection lines, a single print, and
another project directory. A completion gives the server names that have
logs in the current project.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
claude_mcp_logs used the macOS cache path on every platform, so on Linux
it reported that no logs exist. Read the XDG cache directory there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sha1n sha1n added the enhancement New feature or request label Aug 30, 2026
@sha1n sha1n self-assigned this Aug 30, 2026
@sha1n
sha1n marked this pull request as draft August 30, 2026 05:31
@sha1n

sha1n commented Aug 30, 2026

Copy link
Copy Markdown
Owner Author

Half baked. A serious solution would be more complicated than that.

@sha1n sha1n closed this Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant