- Home
- MCP servers
- Demo
Demo
- go
0
GitHub Stars
go
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"up1-demo-mcp-server-with-go": {
"command": "mcphost",
"args": [
"--config",
"./mcp-server.json"
],
"env": {
"ANTHROPIC_API_KEY": "YOUR_API_KEY"
}
}
}
}You run a self-contained MCP (Multi-Client Protocol) server that serves as an executable bridge between clients and an LLM provider. This setup lets you build, run, and test an MCP-backed service locally, with Docker for containerized builds and mcphost for local hosting with an LLM backend such as Anthropic.
How to use
To use this MCP server, start by launching the local host that serves your MCP configuration, then connect an MCP client to issue prompts and receive responses. Your client can interact with the server through the configured entry points, enabling you to run calculations or data queries via the integrated LLM provider.
How to install
Follow these steps to build and run the MCP server locally.
$docker compose build
$go install github.com/mark3labs/mcphost@latest
$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
## Additional sections
Configuration and runtime tips
- Ensure Docker is running to enable containerized builds. The server workflow typically uses a docker-based image to package the MCP server and its dependencies.
- The mcphost utility starts the MCP server with your specific configuration file (mcp-server.json). This file must define the server’s prompts, tools, and any required environment wiring to the Anthropic provider.