Hi there!
First off, thank you so much for creating GoMCP
I ran into a small bug when I was following your blog post here.
Once I've spun up Claude Desktop, after editing the Claude config to point to my MCP server, I get an error in the Claude UI, shown in the below screenshot:
If I look into Claude's logs, I see this:
2025-06-27T07:58:07.774Z [info] [golang-mcp-testing] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2025-06-27T07:58:08.067Z [error] [golang-mcp-testing] Unexpected token 'i', "time=2025-0"... is not valid JSON
2025-06-27T07:58:08.068Z [info] [golang-mcp-testing] Message from server: {"jsonrpc":"2.0","id":0,"result":{"protocolVersion":"2024-11-05","serverInfo":{"name":"ColeMCPServer","version":"1.0.0"},"capabilities":{"logging":{},"tools":{"listChanged":true}}}}
I believe this is coming from the fact that the slog configuration is not logging in JSON format that Claude was expecting (?).
My main file kicks off the server the same way yours does:
// Create a logger
logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelInfo,
}))
// Create a new server
// s := server.NewServer("GoCreate",
s := server.NewServer("ColeMCPServer",
server.WithLogger(logger),
).AsStdio()
Hi there!
First off, thank you so much for creating GoMCP
I ran into a small bug when I was following your blog post here.
Once I've spun up Claude Desktop, after editing the Claude config to point to my MCP server, I get an error in the Claude UI, shown in the below screenshot:
If I look into Claude's logs, I see this:
I believe this is coming from the fact that the
slogconfiguration is not logging in JSON format that Claude was expecting (?).My main file kicks off the server the same way yours does: