Go MCP Server
A simple Model Context Protocol (MCP) server implementation in Go.
Features
- Basic MCP protocol support
- Echo tool for testing
- JSON-RPC communication via stdin/stdout
Usage```bash
Build the server
go build -o mcp-server cmd/server/main.go
Run the server
./mcp-server
## Development```bash
# Run directly with go
go run cmd/server/main.go
# Test with a simple request
echo '{"id":"1","method":"tools/list"}' | go run cmd/server/main.go
Architecture
cmd/server/- Application entry pointinternal/server/- Core server logicinternal/types/- Type definitionspkg/- Reusable packages (future use)
MCP Protocol Support
Currently supported methods:
- tools/list - List available tools
- tools/call - Execute a tool
Available tools:
- echo - Echo back input text
