05-make-your
MCP server from ollama-tlms-golang/05-make-your-mcp-server
claude mcp add --transport stdio ollama-tlms-golang-05-make-your-mcp-server docker run --rm -i mcp-curl
How to use
This MCP server implements a simple Go-based MCP server that exposes a single tool named use_curl. The tool accepts a required parameter url and executes curl -s on that URL, returning the page content as text. The server is designed to be run inside a Docker image alongside a curl-enabled runtime, enabling you to combine MCP tooling with your preferred LLM workflows. You can interact with the server via mcphost, which will expose the available tools and allow you to pass a URL for content retrieval. This setup is useful for enabling an LLM to fetch web content, summarize pages, or extract code snippets by delegating the fetch task to the MCP server rather than making direct network calls from the LLM environment.
How to install
Prerequisites:
- Go tooling (the project is demonstrated in Go, but the runtime is wrapped in Docker for portability)
- Docker (for the provided docker-based deployment)
- mcphost (to connect to MCP servers) or an MCP client compatible with the MCP Go SDK
Step 1: Install prerequisites
- Install Go (if you want to build locally): https://go.dev/doc/install
- Install Docker: https://docs.docker.com/get-docker/
- Install mcphost or your preferred MCP client: follow the MCP documentation or repository examples
Step 2: Build the Go MCP server locally (optional)
- Ensure go.mod and main.go are present as shown in the README
- Run: go mod tidy go build -o mcp-curl ./mcp-curl
Step 3: Build the Docker image (as described in the README)
- docker build -t mcp-curl .
Step 4: Run the Docker-based MCP server and connect with mcphost
- Create an mcp.json file consistent with the example: { "mcpServers": { "mcp-curl-with-docker": { "command": "docker", "args": [ "run", "--rm", "-i", "mcp-curl" ] } } }
- Start mcphost using your configuration: mcphost --config ./mcp.json --model ollama:your-model
Step 5: Verify the tools
- Use the mcphost UI or CLI to query available tools (e.g., /tools) and invoke the use_curl tool with a URL parameter.
Additional notes
Notes:
- The Docker setup uses a multi-stage Dockerfile: the first stage builds the Go MCP server, and the second stage uses curlimages/curl to provide curl in the runtime image. This keeps the final image lightweight while ensuring curl is available.
- The example tool is named use_curl and requires a single parameter url (string). Ensure the LLM or client passes a valid URL string.
- If you want to add more tools later, follow the pattern in main.go: define tools with mcp.NewTool and register handlers with s.AddTool.
- Environment variables can be added to the mcp.json under env if you need to pass API keys or config to the server in Docker.
- If you encounter permissions or network issues inside Docker, ensure the container has network access and that curl is available inside the image.
Related MCP Servers
shellfirm
Terminal guardrails for humans and AI agents — intercepts dangerous commands with context-aware challenges before the damage is done.
mcp-cli
mcpc is a CLI client for MCP. It supports persistent sessions, stdio/HTTP, OAuth 2.1, JSON output for code mode, proxy for AI sandboxes, and much more.
mcp-shell
Give hands to AI. MCP server to run shell commands securely, auditably, and on demand.
hackerone-graphql
MCP server for the HackerOne GraphQL API
terminal
A minimal, zero-dependency terminal MCP (Model Context Protocol) client built for coding agents like OpenAI Codex.
opensearch
OpenSearch 3.0 with MCP Server