- Explore MCP Servers
- mcp-example-golang
Mcp Example Golang
What is Mcp Example Golang
mcp-example-golang is an example implementation of a Model Context Protocol (MCP) server written in Go, designed for use with the Cursor IDE.
Use cases
Use cases include greeting users in a chat application, providing real-time Bitcoin price updates, and serving as a foundation for developing more complex MCP tools.
How to use
To use mcp-example-golang, build the server using ‘go build -o mcp-example’, then install it in Cursor by navigating to the MCP Tools section and adding it from the directory. Once installed, you can interact with the tools via chat prompts.
Key features
Key features include a simple ‘hello’ tool for personalized greetings, a ‘bitcoin_price’ tool that fetches real-time Bitcoin prices in various currencies, a test prompt, and a test resource.
Where to use
mcp-example-golang can be used in applications that require real-time data retrieval and interactive tools, particularly in financial technology, chatbots, and educational environments.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Example Golang
mcp-example-golang is an example implementation of a Model Context Protocol (MCP) server written in Go, designed for use with the Cursor IDE.
Use cases
Use cases include greeting users in a chat application, providing real-time Bitcoin price updates, and serving as a foundation for developing more complex MCP tools.
How to use
To use mcp-example-golang, build the server using ‘go build -o mcp-example’, then install it in Cursor by navigating to the MCP Tools section and adding it from the directory. Once installed, you can interact with the tools via chat prompts.
Key features
Key features include a simple ‘hello’ tool for personalized greetings, a ‘bitcoin_price’ tool that fetches real-time Bitcoin prices in various currencies, a test prompt, and a test resource.
Where to use
mcp-example-golang can be used in applications that require real-time data retrieval and interactive tools, particularly in financial technology, chatbots, and educational environments.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP Example Server for Cursor
Learn more about how to use this here
This is an example implementation of a Model Context Protocol (MCP) server in Go for use with Cursor.
Features
- Implements a simple “hello” tool that responds with a greeting
- Provides a “bitcoin_price” tool that fetches real-time Bitcoin prices in various currencies
- Includes a test prompt
- Provides a test resource
Prerequisites
- Go 1.24 or later
- Cursor IDE
- Internet connection (for the Bitcoin price API)
Building the Server
go build -o mcp-example
Installing in Cursor
- Build the server using the command above
- Open Cursor settings
- Navigate to the “MCP Tools” section
- Click “Add Tool”
- Select “From Directory”
- Browse to this directory and select it
- Click “Install”
Usage
Once installed, you can use the MCP tools in Cursor by:
- Opening a chat in Cursor
- The “hello” tool can be triggered with prompts like “Can you greet me with a personalized message?”
- The “bitcoin_price” tool can be triggered with prompts like “What’s the current Bitcoin price in USD?” or “Show me the Bitcoin price in EUR”
Development
If you want to modify this example:
- Edit the
main.gofile to add or modify tools, prompts, or resources - Rebuild the server using
go build -o mcp-example - Restart Cursor to load the changes
Structure
main.go- The main server implementationcursor-mcp-config.json- Configuration file for Cursorgo.modandgo.sum- Go module files
API Usage
The Bitcoin price tool uses the free CoinGecko API to fetch real-time cryptocurrency prices. No API key is required for basic usage, but there are rate limits.
License
MIT
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










