mcp-preview

warmaris/mcp-preview

3.3

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.

Tools
2
Resources
0
Prompts
0

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:

  • mcphost for interacting with the LLM
  • ollama for running the LLM

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 in prompts/status.txt)

Launch the environment:

docker compose up -d

After launch, the following tools are available:

ToolAddressDetails
Grafanahttp://localhost:3000Metrics visualization and dashboards. Default account: admin/admin.
Add a Prometheus data source at http://prometheus:9090.
Jaegerhttp://localhost:16686Telemetry data inspection. No authentication by default.
Adminerhttp://localhost:28080Database 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.