Creating an MCP Server in Go and Serving it with Docker
@ollama-tlms-golang
About Creating an MCP Server in Go and Serving it with Docker
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"05-make-your-mcp-server": {
"command": "docker",
"args": [
"build",
"-t",
"mcp-curl",
"."
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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.
Frequently asked questions
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.
Basic information
More Cloud & Infrastructure MCP servers
Firebase MCP
gannonh🔥 Model Context Protocol (MCP) server for Firebase.
Kubernetes MCP Server
manusaModel Context Protocol (MCP) server for Kubernetes and OpenShift
Sample Serverless MCP Servers
aws-samplesSample implementations of AI Agents and MCP Servers running on AWS Serverless compute
Muumuu Domain MCP Server
pepaboThe official MCP server for Muumuu Domain by GMO Pepabo, Inc — the first remote MCP server in the Japanese domain registrar industry. Search and register domains, manage owned domains and contracts, and configure DNS rec
Terraform MCP Server
hashicorpThe Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
Comments