About Demo MCP server
A Go example MCP server showing database data retrieval with curl and startup through MCPHost. The README does not detail the specific data or tools exposed.
Key features
- 01Go MCP server example
- 02Retrieve database data with curl
- 03Build a Docker image
- 04Run through MCPHost
Use cases
- 01Use as a Go MCP server reference
- 02Build and run a Docker image
- 03Start the server with MCPHost
MCP support
This project is an MCP server example. The README describes starting it with MCPHost, and sample logs show one tool being loaded.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEDemo MCP server
- My MCP server
- curl
- get data from database
- MCPHost
Build docker image
$docker compose build
Run MCP Server with mcphost
Install mcphost
$go install github.com/mark3labs/mcphost@latest
Start server with LLM provider
- Anthropic
$export ANTHROPIC_API_KEY='your-api-key'
$mcphost --config ./mcp-server.json
2025/02/18 23:50:07 INFO Model loaded provider=anthropic model=claude-3-5-sonnet-latest
2025/02/18 23:50:07 INFO Initializing server... name=mcp-calculator-with-docker
2025/02/18 23:50:09 INFO Server connected name=mcp-calculator-with-docker
2025/02/18 23:50:09 INFO Tools loaded server=mcp-calculator-with-docker count=1
┃ Enter your prompt (Type /help for commands, Ctrl+C to quit)
┃
┃
┃
┃
┃
┃
alt+enter / ctrl+j new line • ctrl+e open editor • enter submit
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.