Creating an MCP Server in Go and Serving it with Docker
@ollama-tlms-golang
Creating an MCP Server in Go and Serving it with Docker について
概要はまだありません
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"05-make-your-mcp-server": {
"command": "docker",
"args": [
"build",
"-t",
"mcp-curl",
"."
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is mcp-curl?
mcp-curl is a Model Context Protocol (MCP) server written in Go that exposes a single tool to fetch the content of a webpage using curl. It is designed to be packaged with Docker and used with an MCP client like mcphost to give LLMs the ability to retrieve and analyze web content.
How to use mcp-curl?
Build the Docker image with docker build -t mcp-curl . from the provided Dockerfile. Then create an mcp.json file for mcphost that runs the Docker container interactively. Start mcphost with mcphost --config ./mcp.json --model ollama:qwen2.5-coder:14b to make the server available to the LLM.
Key features of mcp-curl
- Written in Go using the
mcp-goSDK. - Exposes a single tool
use_curlthat takes a requiredurlparameter. - Communicates via standard input/output (stdio).
- Packaged in a Docker image that includes both the Go binary and
curl. - Designed for simplicity – easy to extend or modify.
Use cases of mcp-curl
- Let an LLM fetch and summarize the content of a webpage.
- Allow an LLM to extract information from a URL for analysis.
- Provide a lightweight, containerized MCP server for local or remote use.
- Serve as a starting template for building custom MCP tools in Go.
FAQ from mcp-curl
What dependencies are required to build and run mcp-curl?
Building requires Go 1.23.4 and Docker. Running requires Docker and an MCP client like mcphost (or any stdio‑based MCP client). The Docker image bundles curl from the curlimages/curl:8.6.0 image.
What transport does mcp-curl use?
mcp-curl uses standard input/output (stdio) as its transport layer, as set up by server.ServeStdio.
How do I configure mcphost to use the Docker container?
Create an mcp.json file with the command "docker" and arguments ["run", "--rm", "-i", "mcp-curl"]. Then run mcphost --config ./mcp.json --model <model>.
Can I modify mcp-curl to add more tools?
Yes. The README shows the minimal implementation, and the mcp-go library supports adding additional tools and handlers. You can extend main.go with new mcp.NewTool calls.
Where does my data live when using mcp-curl?
The server runs inside a Docker container and fetches web content on demand. Data is passed back to the MCP client via stdio and is not persistently stored by the server.
「クラウドとインフラ」の他のコンテンツ
Run Model Context Protocol (MCP) servers with AWS Lambda
awslabsRun existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
MCP Server that interacts with Azure AI Foundry (experimental)
azure-ai-foundryA MCP Server for Azure AI Foundry: it's now moved to cloud, check the new Foundry MCP Server
K8s MCP Server
alexei-ledK8s-mcp-server is a Model Context Protocol (MCP) server that enables AI assistants like Claude to securely execute Kubernetes commands. It provides a bridge between language models and essential Kubernetes CLI tools including kubectl, helm, istioctl, and argocd, allowing AI syste
container-use
aluzzardiDevelopment environments for coding agents. Enable multiple agents to work safely and independently with your preferred stack.
MCP Server Kubernetes
Flux159MCP Server for kubernetes management commands
コメント