eithansmith/mcp-demo
3.1
If you are the rightful owner of mcp-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This document provides a structured summary of a simple MCP server demo using the mcp-go library.
Tools
1
Resources
0
Prompts
0
MCP Demo
A simple MCP server that demonstrates how to use the mcp-go library.
Setup Instructions
- Pull this repository (using git clone or download zip)
- Install Go and Claude Desktop
- Run
go run main.go(orgo build main.go && ./mainto ensure the binary is built) - Configure your server by creating a Claude Desktop config file:
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Add the following to that JSON file. Replace the username_here to match your username. Note that these instructions link to a batch file for Windows users. If you are on a different OS, please use the appropriate substitution.
{ "mcpServers": { "hello-world": { "command": "C:/Users/username_here/mcp-demo/run-mcp.bat" } } } - Start Claude Desktop. Test your tool by asking Claude: "Use the hello_world tool to greet someone"
How It Works
- The server initializes with tool capabilities enabled
- A
hello_worldtool is registered with a name parameter - When a client calls the tool, the
helloHandlerfunction processes the request - The handler validates the name parameter and returns a greeting message
- Communication happens over stdio following the MCP protocol
Development
To extend this demo:
- Add new tools using
mcp.NewTool() - Register tool handlers with
s.AddTool() - Implement handler functions that return
*mcp.CallToolResult
Please visit the mcp-go quickstart for further information on how to use the mcp-go library.
License
This project is licensed under the MIT License. See the file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.