feat(mcp): add stdio transport for Glama registry compatibility#409
feat(mcp): add stdio transport for Glama registry compatibility#409ajitpratap0 merged 3 commits intomainfrom
Conversation
- Add glama.json with full metadata: 7 tool definitions, categories, keywords, features, transport, license, related_servers - Add Glama score badge to README.md badge row Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add --stdio flag to gosqlx-mcp binary, enabling it to serve the MCP protocol over stdin/stdout when spawned as a subprocess by mcp-proxy. Glama's test infrastructure wraps any CMD with `mcp-proxy --`, which expects a stdio-based MCP subprocess. This change allows Glama to inspect tools and run server checks, unlocking the "Server inspectable" and "Tool detection" score items for AAA registry rating. The existing HTTP transport (default) is unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ajitpratap0's task —— View job Code Review for stdio Transport Addition
|
| Aspect | Score | Notes |
|---|---|---|
| Code Quality | ⭐⭐⭐⭐⭐ | Clean, well-structured, follows conventions |
| Security | ⭐⭐⭐⭐⭐ | No concerns, actually improves isolation |
| Performance | ⭐⭐⭐⭐⭐ | Zero overhead, efficient implementation |
| Maintainability | ⭐⭐⭐⭐⭐ | Clear separation, good documentation |
| Test Coverage | ⭐⭐⭐⭐ | Existing tests pass, minor gap for new features |
Verdict: ✅ Ready to merge - This is a high-quality implementation that achieves its goal with minimal, clean changes. The code is production-ready and follows all project conventions.

Summary
--stdioflag togosqlx-mcpbinary to serve MCP protocol over stdin/stdoutMCPServer()accessor onpkg/mcp.Serverfor use with stdio transportWhy
Glama's test infrastructure automatically wraps any CMD with
mcp-proxy --, which expects a stdio-based MCP subprocess. The existing HTTP-only server couldn't work in this mode, causing all builds to fail with ENOENT.With
--stdio, mcp-proxy spawnsgosqlx-mcp --stdio, which reads JSON-RPC from stdin and writes responses to stdout — exactly what mcp-proxy expects.The Glama Dockerfile CMD will be:
Transport modes
gosqlx-mcpmcp.gosqlx.devgosqlx-mcp --stdioTest plan
go test -race ./...— all packages pass🤖 Generated with Claude Code