josharsh / josharsh/claude-utils
MCP server fails to authenticate in Claude Code despite working curl tests (Windows)
- Dominant language
- Rust
- Stars
- 6
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
# Environment:
OS: Windows 11
2.1.76 (Claude Code)
claude-utils 0.1.1
node v22.20.0
Rust toolchain: stable-x86_64-pc-windows-gnu (also tested with MSVC)
# Description
The MCP server works perfectly when tested with curl, but Claude Code consistently fails to authenticate, even with correct configuration and token.
# Steps to Reproduce
## Start claude-utils (MCP server + watch mode):
powershell
claude-utils start --watch --write
Output shows:
Authentication token: 8b2a176df35e2a2520cf94d39a3b1c2f314246ac0d9635f031e3bedb4057d301
MCP server listening on http://127.0.0.1:3830
Verify MCP server with curl (✅ works):
## curl
powershell
```
curl.exe -X POST http://127.0.0.1:3830 `
-H "Authorization: Bearer 8b2a176df35e2a2520cf94d39a3b1c2f314246ac0d9635f031e3bedb4057d301" `
-H "Content-Type: application/json" `
-d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}'
```
Returns expected tool list (✅ success).
powershell
```
curl.exe -v -H "Accept: text/event-stream" "http://127.0.0.1:3830/sse?token=8b2a176df35e2a2520cf94d39a3b1c2f314246ac0d9635f031e3bedb4057d301"
* Trying 127.0.0.1:3830...
* Connected to 127.0.0.1 (127.0.0.1) port 3830
> GET /sse?token=8b2a176df35e2a2520cf94d39a3b1c2f314246ac0d9635f031e3bedb4057d301 HTTP/1.1
> Host: 127.0.0.1:3830
> User-Agent: curl/8.7.1
> Accept: text/event-stream
>
< HTTP/1.1 200 OK
< content-type: text/event-stream
< cache-control: no-cache
< vary: origin, access-control-request-method, access-control-request-headers
< access-control-allow-origin: *
< access-control-expose-headers: *
< transfer-encoding: chunked
< date: Sun, 15 Mar 2026 11:54:53 GMT
```
## Configure Claude Code (C:\Users\\.claude.json):
```
"mcpServers": {
"claude-utils": {
"type": "sse",
"url": "http://127.0.0.1:3830/sse?token=8b2a176df35e2a2520cf94d39a3b1c2f314246ac0d9635f031e3bedb4057d301"
}
}
```
## Start Claude Code and check MCP status:
/mcp
Shows:
```
Status: × failed
Auth: × not authenticated
URL: http://127.0.0.1:3830
Error: HTTP 404: Invalid OAuth error response: SyntaxError: JSON Parse error: Unexpected EOF. Raw body:
```
Contributor guide
Assessment
This issue has not been assessed yet.