MCP integration broken on Windows: OAuth reconciliation re-flags as "needs auth" after success; stdio MCPs connect but tools never surface
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment:
OS: Windows
Claude Code: (run claude --version and paste the result)
Tested MCP: Sentry — both sentry@claude-plugins-official (hosted HTTP + OAuth) and @sentry/mcp-server@latest via stdio with a user auth token
Bug 1: Plugin OAuth reconciliation loop
Reproduction:
claude plugin install sentry@claude-plugins-official (or claude plugin install sentry-mcp@sentry-mcp)
In a Claude Code session, run /mcp and authenticate the Sentry server. Complete OAuth in browser successfully.
Observed: a toast says "connected." ~/.claude/.credentials.json is updated with a valid OAuth credential.
Bug: ~/.claude/mcp-needs-auth-cache.json is also updated at the same instant to keep the entry marked as needing auth.
claude mcp list reports ! Needs authentication.
Restart Claude Code; entry is re-added to the auth cache automatically on every startup, even after manually deleting it. Tools are never exposed to the LLM.
Expected: after successful OAuth, the entry should be removed from mcp-needs-auth-cache.json, and the MCP's tools should be available in-session.
Bug 2: Stdio MCP tools/list not surfaced
Reproduction:
Create a Sentry user auth token with read scopes (org:read, project:read, event:read, team:read, member:read)
claude mcp add-json -s user sentry '{"command":"npx","args":["-y","@sentry/mcp-server@latest"],"env":{"SENTRY_ACCESS_TOKEN":"<token>"}}'
Restart Claude Code.
claude mcp list reports ✓ Connected.
Bug: No mcp__sentry__* tools are available in-session. ToolSearch returns no matches for any Sentry tool, even searched by exact name.
Verified the server itself works correctly: a standalone Node script sending initialize and tools/list JSON-RPC requests to the same npx -y @sentry/mcp-server@latest process returns the full tool list (whoami, find_organizations, find_issues, get_event_details, etc.).
Expected: tools returned by tools/list should be registered as mcp__sentry__* for the LLM.
Notes:
Stderr from the Sentry server during stdio handshake emits a non-fatal warning: Warning: No LLM API key found (OPENAI_API_KEY or ANTHROPIC_API_KEY). Agent-assisted search and use_sentry will be unavailable. — Possibly the harness is mis-classifying this as a startup failure?
Both bugs reproduce consistently across multiple restart cycles, plugin reinstalls, manual cache cleanup, and credential cleanup.
What Should Happen?
Environment:
OS: Windows
Claude Code: (run claude --version and paste the result)
Tested MCP: Sentry — both sentry@claude-plugins-official (hosted HTTP + OAuth) and @sentry/mcp-server@latest via stdio with a user auth token
Bug 1: Plugin OAuth reconciliation loop
Reproduction:
claude plugin install sentry@claude-plugins-official (or claude plugin install sentry-mcp@sentry-mcp)
In a Claude Code session, run /mcp and authenticate the Sentry server. Complete OAuth in browser successfully.
Observed: a toast says "connected." ~/.claude/.credentials.json is updated with a valid OAuth credential.
Bug: ~/.claude/mcp-needs-auth-cache.json is also updated at the same instant to keep the entry marked as needing auth.
claude mcp list reports ! Needs authentication.
Restart Claude Code; entry is re-added to the auth cache automatically on every startup, even after manually deleting it. Tools are never exposed to the LLM.
Expected: after successful OAuth, the entry should be removed from mcp-needs-auth-cache.json, and the MCP's tools should be available in-session.
Bug 2: Stdio MCP tools/list not surfaced
Reproduction:
Create a Sentry user auth token with read scopes (org:read, project:read, event:read, team:read, member:read)
claude mcp add-json -s user sentry '{"command":"npx","args":["-y","@sentry/mcp-server@latest"],"env":{"SENTRY_ACCESS_TOKEN":"<token>"}}'
Restart Claude Code.
claude mcp list reports ✓ Connected.
Bug: No mcp__sentry__* tools are available in-session. ToolSearch returns no matches for any Sentry tool, even searched by exact name.
Verified the server itself works correctly: a standalone Node script sending initialize and tools/list JSON-RPC requests to the same npx -y @sentry/mcp-server@latest process returns the full tool list (whoami, find_organizations, find_issues, get_event_details, etc.).
Expected: tools returned by tools/list should be registered as mcp__sentry__* for the LLM.
Notes:
Stderr from the Sentry server during stdio handshake emits a non-fatal warning: Warning: No LLM API key found (OPENAI_API_KEY or ANTHROPIC_API_KEY). Agent-assisted search and use_sentry will be unavailable. — Possibly the harness is mis-classifying this as a startup failure?
Both bugs reproduce consistently across multiple restart cycles, plugin reinstalls, manual cache cleanup, and credential cleanup.
Error Messages/Logs
Environment:
OS: Windows
Claude Code: (run claude --version and paste the result)
Tested MCP: Sentry — both sentry@claude-plugins-official (hosted HTTP + OAuth) and @sentry/mcp-server@latest via stdio with a user auth token
Bug 1: Plugin OAuth reconciliation loop
Reproduction:
claude plugin install sentry@claude-plugins-official (or claude plugin install sentry-mcp@sentry-mcp)
In a Claude Code session, run /mcp and authenticate the Sentry server. Complete OAuth in browser successfully.
Observed: a toast says "connected." ~/.claude/.credentials.json is updated with a valid OAuth credential.
Bug: ~/.claude/mcp-needs-auth-cache.json is also updated at the same instant to keep the entry marked as needing auth.
claude mcp list reports ! Needs authentication.
Restart Claude Code; entry is re-added to the auth cache automatically on every startup, even after manually deleting it. Tools are never exposed to the LLM.
Expected: after successful OAuth, the entry should be removed from mcp-needs-auth-cache.json, and the MCP's tools should be available in-session.
Bug 2: Stdio MCP tools/list not surfaced
Reproduction:
Create a Sentry user auth token with read scopes (org:read, project:read, event:read, team:read, member:read)
claude mcp add-json -s user sentry '{"command":"npx","args":["-y","@sentry/mcp-server@latest"],"env":{"SENTRY_ACCESS_TOKEN":"<token>"}}'
Restart Claude Code.
claude mcp list reports ✓ Connected.
Bug: No mcp__sentry__* tools are available in-session. ToolSearch returns no matches for any Sentry tool, even searched by exact name.
Verified the server itself works correctly: a standalone Node script sending initialize and tools/list JSON-RPC requests to the same npx -y @sentry/mcp-server@latest process returns the full tool list (whoami, find_organizations, find_issues, get_event_details, etc.).
Expected: tools returned by tools/list should be registered as mcp__sentry__* for the LLM.
Notes:
Stderr from the Sentry server during stdio handshake emits a non-fatal warning: Warning: No LLM API key found (OPENAI_API_KEY or ANTHROPIC_API_KEY). Agent-assisted search and use_sentry will be unavailable. — Possibly the harness is mis-classifying this as a startup failure?
Both bugs reproduce consistently across multiple restart cycles, plugin reinstalls, manual cache cleanup, and credential cleanup.
Steps to Reproduce
Environment:
OS: Windows
Claude Code: (run claude --version and paste the result)
Tested MCP: Sentry — both sentry@claude-plugins-official (hosted HTTP + OAuth) and @sentry/mcp-server@latest via stdio with a user auth token
Bug 1: Plugin OAuth reconciliation loop
Reproduction:
claude plugin install sentry@claude-plugins-official (or claude plugin install sentry-mcp@sentry-mcp)
In a Claude Code session, run /mcp and authenticate the Sentry server. Complete OAuth in browser successfully.
Observed: a toast says "connected." ~/.claude/.credentials.json is updated with a valid OAuth credential.
Bug: ~/.claude/mcp-needs-auth-cache.json is also updated at the same instant to keep the entry marked as needing auth.
claude mcp list reports ! Needs authentication.
Restart Claude Code; entry is re-added to the auth cache automatically on every startup, even after manually deleting it. Tools are never exposed to the LLM.
Expected: after successful OAuth, the entry should be removed from mcp-needs-auth-cache.json, and the MCP's tools should be available in-session.
Bug 2: Stdio MCP tools/list not surfaced
Reproduction:
Create a Sentry user auth token with read scopes (org:read, project:read, event:read, team:read, member:read)
claude mcp add-json -s user sentry '{"command":"npx","args":["-y","@sentry/mcp-server@latest"],"env":{"SENTRY_ACCESS_TOKEN":"<token>"}}'
Restart Claude Code.
claude mcp list reports ✓ Connected.
Bug: No mcp__sentry__* tools are available in-session. ToolSearch returns no matches for any Sentry tool, even searched by exact name.
Verified the server itself works correctly: a standalone Node script sending initialize and tools/list JSON-RPC requests to the same npx -y @sentry/mcp-server@latest process returns the full tool list (whoami, find_organizations, find_issues, get_event_details, etc.).
Expected: tools returned by tools/list should be registered as mcp__sentry__* for the LLM.
Notes:
Stderr from the Sentry server during stdio handshake emits a non-fatal warning: Warning: No LLM API key found (OPENAI_API_KEY or ANTHROPIC_API_KEY). Agent-assisted search and use_sentry will be unavailable. — Possibly the harness is mis-classifying this as a startup failure?
Both bugs reproduce consistently across multiple restart cycles, plugin reinstalls, manual cache cleanup, and credential cleanup.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.72
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗