- Home
- MCP servers
- Make Your
Make Your
- go
8
GitHub Stars
go
Language
6 months ago
First Indexed
2 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": {
"ollama-tlms-golang-05-make-your-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"mcp-curl"
]
}
}
}You can build a minimal MCP server in Go that exposes a single tool which fetches a webpage using curl, and run it inside Docker for easy deployment. This pattern demonstrates how an LLM can call an external tool to retrieve web content and return it as plain text.
How to use
You will run a small MCP server that provides one tool named use_curl. Your client can request a URL to fetch, and the server will execute curl on that URL and return the page content as text. With Docker, you can start the server container and then connect from an MCP client or host tool to request the tool and its results. You can also use a local host configurator to expose and manage the server from a central workflow.
How to install
Prerequisites you need before starting:
- Docker installed on your system.
Steps to build and run the MCP server locally:
# Build the MCP server image from a simple Go project used in this pattern
# The server code is prepared to expose a single curl-fetching tool
# Build the Docker image for the MCP server
docker build -t mcp-curl .
Additional content
Configure and run the MCP server via Docker, then connect it to an MCP client setup to manage tools and execute requests.
# Example MCP configuration for an MCP host to talk to the Docker-based MCP server
# This uses a docker run command to start the server container and connect via stdio
{
"mcpServers": {
"mcp-curl-with-docker": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"mcp-curl"
]
}
}
}
Using mcphost to interact with the server
Once you have the MCP server available, you can work with mcphost to start an LLM-assisted workflow that uses the server to fetch pages.
mcphost --config ./mcp.json --model ollama:qwen2.5-coder:14b
Notes on the server and tool
The server exposes a single tool named use_curl which accepts a required url parameter. The handler executes curl -s <url> and returns the page content as text. Errors are reported back to the caller as tool results.
Available tools
use_curl
Fetch a webpage by URL. The tool requires a single string parameter named url and returns the page content as text.