MCP Server Example (MCP Coffee Shop)
About
An MCP server implementation in Go that provides coffee shop information through tools, resources, and prompts. It supports stdio and HTTP with Server-Sent Events transports, follows Go project layout best practices, and is compliant with the MCP 2025-03-26 specification…
Explore
- MCP 2025-03-26 Specification Compliant
- Multiple Transport Support: stdio (default, compatible with MCP Inspector), http (with SSE)
- Coffee Shop Domain: Tools, resources, and prompts for coffee shop operations
- Graceful Shutdown & Configurable Timeouts
- Production Ready: Structured logging, error handling, validation
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Server Example (MCP Coffee Shop)Command (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
bash
go run ./... --transport http --port 9000 --request-timeout 45s
```
The server uses Go's built-in flag parsing. Configuration is primarily through command-line flags.
curl http://localhost:8080/health
getDrinkNames
Get list of available drinks
getDrinkInfo
Get detailed drink information
Interactive functions that can be called by the LLM:
| Tool | Description | Parameters |
|------|-------------|------------|
| getDrinkNames | Get list of available drinks | None |
| getDrinkInfo | Get detailed drink information | name: string (required) |
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": "1",
"params": {
"name": "getDrinkInfo",
"arguments": {"name": "Latte"}
}
}
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp server example (mcp coffee shop)": {
"go-mcp-server-example": {
"command": "docker",
"args": [
"build",
"-t",
"mcp-server",
"."
]
}
}
}
}
McpServers
{
"go-mcp-server-example": {
"command": "docker",
"args": [
"build",
"-t",
"mcp-server",
"."
]
}
}
A Model Context Protocol (MCP) server implementation in Go that provides coffee shop information through tools, resources, and prompts, following Go project layout best practices.
Features
- MCP 2025-03-26 Specification Compliant
- Multiple Transport Support: stdio (default, compatible with MCP Inspector), http (with SSE)
- Coffee Shop Domain: Tools, resources, and prompts for coffee shop operations
- Graceful Shutdown & Configurable Timeouts
- Production Ready: Structured logging, error handling, validation
Project Structure
simple-mcp-server-refactored/
├── cmd/mcpserver/ # Application entrypoint
├── pkg/ # Public library code
│ ├── mcp/ # Core MCP protocol types
│ ├── config/ # Configuration management
│ ├── transport/ # Transport implementations
│ └── handlers/ # Domain-specific handlers
├── internal/server/ # Server implementation
└── go.mod
Usage
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



