G

mcp

...
Created 12/3/2024byacrmp

Language:

Go

Stars:

2

Forks:

1

mcp

Server implementation of the Model Context Protocol (MCP). Currently allows tools to be exposed to LLMs supporting the protocol.

Example

The example directory contains an example of exposing a tool to Claude to compute a SHA-256 sum.

$ cd mcp/example
$ GOOS=darwin GOARCH=arm64 go build

Add the example server to your Claude config:

$ vim ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "sha256": {
      "command": "/path/to/example/binary"
    }
  }
}

We can then ask Claude:

What is the sha256sum of "the rain in spain falls mainly on the plains"?

Claude will then perform a tool call against the server and return the following response:

The SHA-256 hash of "the rain in spain falls mainly on the plains" is: b65aacbdd951ff4cd8acef585d482ca4baef81fa0e32132b842fddca3b5590e9

Last updated: 12/21/2024

Publisher info

acrmp's avatar

Andrew Crump

130
followers
0
following
18
repos

More MCP servers built with Go

mcp-server

learn to make some mcp servers

By yiGmMk1
linear-mcp-go

linear MCP server based on mcp-go

By geropl1
gomcptest

A proof-of-concept demonstrating a custom-built host implementing an OpenAI-compatible API with Google Gemini, function calling, and interaction with a dummy MCP server.

By owulveryck2