claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] MCP Fails to connect

Open sameehj opened this issue 7 months ago • 1 comments

Environment

  • Platform:
    • [ ] Other: Claude CLI
  • Claude CLI version: 1.0.17 (Claude Code)
  • Operating System: 14.3.1 (23D60)
  • Terminal: Cursor Terminal

Bug Description

I try to add the mcp server [0] which is mainly running [1] for mcp

claude mcp add -t sse ebpf http://localhost:8080/mcp

Steps to Reproduce

  1. clone ebpf-mcp & run make
  2. run ebpf-mcp-server (can be ran locally / on vm)
  3. attach to claude mcp using the command above
  4. run claude --debug

[0] https://github.com/sameehj/ebpf-mcp [1] https://github.com/mark3labs/mcp-go

Expected Behavior

MCP connected successfully

Actual Behavior

 ※ Tip: Send messages to Claude while it works to steer Claude in real-time
[DEBUG] MCP server "ebpf": SSE Connection error: {"url":"http://localhost:8080/mcp","error":"SSE error: Non-200 status code (202)","stack":"Error: SSE error: Non-200 status code (202)\n    at _eventSource.onerror (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1364:13931)\n    at wm.ro (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1364:4946)\n    at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1364:1799\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"}
[ERROR] MCP server "ebpf" Error: SSE error: Non-200 status code (202)

Additional Context

sameehj avatar Jun 11 '25 16:06 sameehj

@sameehj does this server work with other MCP clients (like the MCP inspector)?

ashwin-ant avatar Jun 11 '25 18:06 ashwin-ant

It seems that the issue was caused by the mcp-go implementation I was using and is now fixed.

Thank you!

sameehj avatar Jun 19 '25 09:06 sameehj

For the record, the issue was fixed here: https://github.com/mark3labs/mcp-go/pull/379

rafaeljusto avatar Jul 01 '25 17:07 rafaeljusto

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 10 '25 14:08 github-actions[bot]