{"id":28941223,"url":"https://github.com/cbrgm/go-mcp-server","last_synced_at":"2026-03-01T14:04:20.758Z","repository":{"id":300645110,"uuid":"1006705220","full_name":"cbrgm/go-mcp-server","owner":"cbrgm","description":"A Model Context Protocol (MCP) server implementation from scratch in Go. Made for learning purposes only","archived":false,"fork":false,"pushed_at":"2026-02-11T21:00:28.000Z","size":123,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T01:18:23.484Z","etag":null,"topics":["example","go","mcp","modelcontextprotocol"],"latest_commit_sha":null,"homepage":"https://cbrgm.net","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbrgm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"chrisbargmann"}},"created_at":"2025-06-22T20:43:13.000Z","updated_at":"2026-02-11T16:51:52.000Z","dependencies_parsed_at":"2025-06-22T21:45:20.508Z","dependency_job_id":"add657f0-d3b8-48ea-872d-5a77319dfa86","html_url":"https://github.com/cbrgm/go-mcp-server","commit_stats":null,"previous_names":["cbrgm/go-mcp-server"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/cbrgm/go-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fgo-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fgo-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fgo-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fgo-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbrgm","download_url":"https://codeload.github.com/cbrgm/go-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fgo-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T13:32:00.443Z","status":"ssl_error","status_checked_at":"2026-03-01T13:32:00.084Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example","go","mcp","modelcontextprotocol"],"created_at":"2025-06-23T02:09:37.875Z","updated_at":"2026-03-01T14:04:15.742Z","avatar_url":"https://github.com/cbrgm.png","language":"Go","funding_links":["https://ko-fi.com/chrisbargmann"],"categories":[],"sub_categories":[],"readme":"# Go MCP Server\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server implementation in Go that provides tea information through tools, resources, and prompts.\n\n**Note**: This project is for learning purposes only. I built this MCP server from scratch to understand the Model Context Protocol specification. For production use, consider using [mcp-go](https://github.com/mark3labs/mcp-go) or wait for the official MCP Go SDK to be released (expected end of June 2025).\n\nThis MCP server, especially the `mcp` package, was written with the help of [Claude Code](https://claude.ai/code) using the latest version of the [MCP specification](https://modelcontextprotocol.io/llms-full.txt) (2025-06-21).\n\n## Features\n\n- **MCP 2025-03-26 Specification Compliant**\n- **Multiple Transports**: `stdio` (default), `http` with SSE\n- **Tea Collection**: 8 premium teas (Green, Black, Oolong, White)\n- **Full MCP Capabilities**: Tools, Resources, and Prompts\n\n## Quick Start\n\n```bash\n# Build the binary\ngo build ./cmd/go-mcp-server\n\n# Run with stdio transport (default)\n./go-mcp-server\n\n# Run with HTTP transport\n./go-mcp-server -transport http -port 8080\n\n# Test with MCP Inspector\necho '{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"id\":1}' | ./go-mcp-server\n```\n\n## Usage\n\nThe server binary accepts several command line arguments to configure its behavior:\n\n```bash\n./go-mcp-server [options]\n```\n\n### Command Line Arguments\n\n| Argument | Type | Default | Description |\n|----------|------|---------|-------------|\n| `-transport` | string | `stdio` | Transport protocol to use (`stdio` or `http`) |\n| `-port` | int | `8080` | HTTP server port (only used with `-transport http`) |\n| `-request-timeout` | duration | `30s` | Maximum time to wait for request processing |\n| `-shutdown-timeout` | duration | `10s` | Maximum time to wait for graceful shutdown |\n| `-log-level` | string | `info` | Log level (`debug`, `info`, `warn`, `error`) |\n| `-log-json` | bool | `false` | Output logs in JSON format |\n| `-server-name` | string | `MCP Server` | Server name returned in initialization |\n| `-server-version` | string | `1.0.0` | Server version returned in initialization |\n\n### Examples\n\n```bash\n# Default stdio transport with debug logging\n./go-mcp-server -log-level debug\n\n# HTTP transport on custom port with JSON logs\n./go-mcp-server -transport http -port 9000 -log-json\n\n# Custom timeouts for production use\n./go-mcp-server -transport http -request-timeout 60s -shutdown-timeout 30s\n\n# Custom server identification\n./go-mcp-server -server-name \"My Tea Server\" -server-version \"2.0.0\"\n```\n\n## MCP Capabilities\n\n### Tools\n- `getTeaNames` - List all available teas\n- `getTeaInfo` - Get detailed tea information and brewing instructions\n- `getTeasByType` - Filter teas by type (Green Tea, Black Tea, Oolong Tea, White Tea)\n\n### Resources\n- `menu://tea` - Complete tea collection with prices and details\n\n### Prompts\n- `tea_recommendation` - Personalized recommendations based on mood/preferences\n- `brewing_guide` - Detailed brewing instructions for specific teas\n- `tea_pairing` - Food pairing suggestions\n\n## Tea Collection Example\n\nTry these commands to explore the tea collection:\n\n```bash\n# List all available teas\necho '{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"id\":1,\"params\":{\"name\":\"getTeaNames\",\"arguments\":{}}}' | ./go-mcp-server\n\n# Get information about a specific tea\necho '{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"id\":2,\"params\":{\"name\":\"getTeaInfo\",\"arguments\":{\"name\":\"earl-grey\"}}}' | ./go-mcp-server\n\n# Get all oolong teas\necho '{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"id\":3,\"params\":{\"name\":\"getTeasByType\",\"arguments\":{\"type\":\"Oolong Tea\"}}}' | ./go-mcp-server\n\n# Read the complete tea menu resource\necho '{\"jsonrpc\":\"2.0\",\"method\":\"resources/read\",\"id\":4,\"params\":{\"uri\":\"menu://tea\"}}' | ./go-mcp-server\n\n# Get a brewing guide for gyokuro\necho '{\"jsonrpc\":\"2.0\",\"method\":\"prompts/get\",\"id\":5,\"params\":{\"name\":\"brewing_guide\",\"arguments\":{\"tea_name\":\"gyokuro\"}}}' | ./go-mcp-server\n```\n\n## Web UI\n\nWhen using HTTP transport, a web status page is available at the root path (`/`) of the server. This page shows server information, active sessions, and available endpoints.\n\n## MCP Client Configuration\n\n### Claude Desktop / VS Code / Other MCP Clients\n\nAdd this configuration to your MCP client settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"tea\": {\n      \"command\": \"podman\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"ghcr.io/cbrgm/go-mcp-server:v1\"]\n    }\n  }\n}\n```\n\nFor local development, you can also use:\n\n```json\n{\n  \"mcpServers\": {\n    \"tea\": {\n      \"command\": \"go\",\n      \"args\": [\"run\", \"./cmd/go-mcp-server\"],\n      \"cwd\": \"/path/to/go-mcp-server\"\n    }\n  }\n}\n```\n\n## Testing with MCP Inspector\n\n1. Install: `npm install -g @modelcontextprotocol/inspector`\n2. Start: `npx @modelcontextprotocol/inspector`\n3. Connect with command: `go run ./cmd/go-mcp-server`\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrgm%2Fgo-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbrgm%2Fgo-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrgm%2Fgo-mcp-server/lists"}