G

mcp-go-example

...
Created 11/27/2024bymasacento

Language:

Go

Stars:

6

Forks:

1

mcp-go-example

Model Context Protocol sqlite example server using Go. This is just for learning purpose. No security implications, No multiuser support.

Python version is here. https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite

Python version quickstart is here. https://modelcontextprotocol.io/quickstart

Usasge

Edit Claude Desktop config at ~/Library/Application\ Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "sqlite": {
      "command": "path/to/mcp-go-example",
       "args": []
    }
  }
}

build and follow quickstart.

Tasks

test

go test

build

Requires: test

CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath .

inspect

Requires: build

npx -y @modelcontextprotocol/inspector ./mcp-go-example 

log

tail -f /tmp/mcp-go-example.log

License

MIT License

Copyright (c) 2024 Masa Cento

Last updated: 11/27/2024

Publisher info

masacento's avatar

Masa Cento

Tokyo, Japan
8
followers
36
following
7
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