mcp-go
mcp-go copied to clipboard
bug: 404s with example streamable http server
Description
Hi, I'm running this code example locally and I'm unable to access any of the default MCP endpoints.
Also, please note, with the example I have also tried specifying WithEndpointPath:
httpServer := server.NewStreamableHTTPServer(s,
server.WithEndpointPath("/mcp"),
)
Logs or Error Messages
But everything 404s:
curl -X GET http://localhost:8080/mcp/health
curl: (7) Failed to connect to localhost port 8080 after 0 ms: Could not connect to server
Environment
- Go version (see
go.mod): [e.g. 1.24.4]
Additional Context
I know the server is running as I can form a HTTP connection using telnet.
I have the same problem, the default /health and /capabilities endpoints do not work using a browser/curl.