MCPInstall
demo-mcp-server-with-go logo

demo-mcp-server-with-go

by up1 up1/demo-mcp-server-with-go

The demo MCP server facilitates data retrieval from a database and integrates with the Anthropic LLM provider. It supports easy deployment via Docker, making it simple to build and run. Key features include efficient data handling and seamless server initialization.

READMEmain

Demo 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