About Hello MCP Go ๐
A starter project demonstrating how to build an MCP server in Go, aimed at Go developers learning the protocol or creating custom servers. It provides hello and calculate tools and explains use with GitHub Copilot Agent Mode in Visual Studio Code.
Key features
- 01Go MCP server example
- 02Provides the hello tool
- 03Provides the calculate tool
- 04Build and run instructions
- 05GitHub Copilot Agent Mode setup
Use cases
- 01Learn to build an MCP server in Go
- 02Test simple tool calls in Agent Mode
MCP support
The project implements an MCP server with hello and calculate tools for clients, and documents configuring it in Visual Studio Code.
Configuration
Local server config is the same for every client. Copy it into your clientโs MCP config file.
We havenโt collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEHello MCP Go ๐
Welcome to the Hello MCP Go repository! ๐ This project demonstrates how to build an MCP (Model Context Protocol) server in Go. Whether you're a Go enthusiast or just curious about MCP, you're in the right place! ๐ ๏ธ
What is this? ๐ค
This repository showcases:
- How to build an MCP server using Go ๐น.
- A simple and fun way to explore MCP Protocol ๐ฎ.
- A starting point for your own custom MCP server adventures! ๐
Tools ๐
- hello, takes the parameters Submitter and Content.
- calculate, takes the parameters A and B. Example use is "calculate 2 and 4".
Quick Start ๐
- Clone
- Install
- Build
- Run
-
Clone the repository:
git clone https://github.com/your-username/hello-mcp-go.git cd hello-mcp -
Install dependencies:
go mod tidy -
Build the project:
go build -ldflags="-s -w" -o server.exe main.goor for Linux:
go build -ldflags="-s -w" -o server main.goYou will use this later when you want to consume it from Visual Studio Code.
-
Run the server:
./server
Consuming the Server with GitHub Copilot Agent Mode ๐ด
-
Place yourself in mcp.json, make sure the server has been built (right now it's adjusted).
-
Adjust the "command" to point to the absolute path of your executable.
{ "servers": { "my-mcp-server-d73c20f3": { "type": "stdio", "command": "/path/to/your/executable" } } } -
Open Copilot and select Agent in dropdown
-
Select the play icon.
You should see the tool icon showing two tools.
-
Test it with a phrase like so "calculate 2 and 4". This should present a button that invokes the tool on the server.

Have Fun! ๐
This project is all about learning and having fun. Feel free to experiment, break things, and create something amazing! ๐
Happy coding! ๐ป
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.