warmaris/mcp-preview
If you are the rightful owner of mcp-preview and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This repository provides an example implementation of an MCP server in Go using the mark3labs/mcp-go library.
Go MCP Preview
This repository provides an example implementation of an MCP server in Go using the mark3labs/mcp-go library.
Learn more about MCP here.
In addition to implementing the MCP protocol, this project includes authentication token handling, metrics collection, and telemetry. This makes the solution production-ready where possible.
Local Setup
You'll need to install Docker and the following utilities:
Download and launch the test model:
ollama run qwen3:1.7b
Create a secret for JWT token generation. Create a .env
file in the project root with:
DB_HOST=db:3306
DB_NAME=mcp
DB_PASSWORD=rootpasswd
DB_USER=root
JWT_SECRET=[place your secret here]
OTEL_EXPORTER_ADDR=jaeger:4317
Generate a JWT token using any generator with your secret and payload (example):
{
"id": 1,
"name":"John Doe",
"role":"customer"
}
Add the generated token to config/mcphost.yml and use this file as the configuration for mcphost.
If you use a different model, remember to update the corresponding parameter in
mcphost.yml
You can also add the
system-prompt
parameter pointing to your LLM prompt file (example inprompts/status.txt
)
Launch the environment:
docker compose up -d
After launch, the following tools are available:
Tool | Address | Details |
---|---|---|
Grafana | http://localhost:3000 | Metrics visualization and dashboards. Default account: admin/admin . Add a Prometheus data source at http://prometheus:9090. |
Jaeger | http://localhost:16686 | Telemetry data inspection. No authentication by default. |
Adminer | http://localhost:28080 | Database management. Login: root, password and database name see in docker-compose.yaml |
Run the mcphost
utility and ask the model to show you the order list or get QR code.