Creating an MCP Server in Go and Serving it with Docker
Overview
The MCP Server is a tool created in Go that allows users to fetch webpage content using the Model Context Protocol (MCP) and the curl utility.
To use the MCP Server, you need to build it using Docker and then run it with a configuration file for mcphost. You can request webpage content by providing a URL.
- Fetches webpage content using curl - Simple implementation in Go - Dockerized for easy deployment
- Retrieving content from web pages for analysis.
- Integrating with LLMs to enhance their capabilities.
- Serving as a backend tool for applications needing web data.
Add to your AI client
Use these steps to connect Creating an MCP Server in Go and Serving it with Docker in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"05-make-your-mcp-server-ollama-tlms-golang": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-05-make-your-mcp-server-ollama-tlms-golang"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"05-make-your-mcp-server-ollama-tlms-golang": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-05-make-your-mcp-server-ollama-tlms-golang"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"05-make-your-mcp-server-ollama-tlms-golang": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-05-make-your-mcp-server-ollama-tlms-golang"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"05-make-your-mcp-server-ollama-tlms-golang": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-05-make-your-mcp-server-ollama-tlms-golang"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"05-make-your-mcp-server-ollama-tlms-golang": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-05-make-your-mcp-server-ollama-tlms-golang"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"05-make-your-mcp-server-ollama-tlms-golang": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-05-make-your-mcp-server-ollama-tlms-golang"
]
}
}
}FAQ
What is required to run the MCP Server?
You need Docker installed and a basic understanding of Go.
Can I customize the tools provided by the MCP Server?
Yes! You can add more tools by modifying the server code.
Is the MCP Server open-source?
Yes! The MCP Server is available on GitHub.