convez.ai
MCP ServerIntegração & APIsIntermediário
dimasd-angga

Servidores MCP em Go — Filesystem, PostgreSQL, Redis, Shell, HTTP e Home Assistant

dimasd-angga/go-mcp-servers

MCP servers prontos para produção em Go — filesystem, BD, shell, HTTP, automação

Ver no GitHub
InicialPluginScore · de 0 a 100

Conjunto de servidores Model Context Protocol (MCP) prontos para produção, implementados em Go. Oferece integração com filesystem, PostgreSQL, Redis, shell, HTTP e Home Assistant como binários estáticos ou pacotes Go importáveis. Ideal para agentes de IA nativos em Go com baixo overhead e sem dependências externas.

Instalação

$npx convez-ai dimasd-angga/go-mcp-servers

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
3
Acompanhando
0
Saúde
57%
Último commit
há 4 dias
Versão
—
Issues abertas
9
Contribuidores
3

Casos de uso

  • Conectar agentes Claude/Cursor a bancos PostgreSQL e Redis
  • Executar comandos shell sandboxed via IA com controle de segurança
  • Automação de Home Assistant através de clientes MCP
  • Integrar leitura/escrita de arquivos em projetos Go com isolamento de caminho

Veredito

Preenche lacuna crítica de implementações MCP em Go com qualidade produção-ready. Excelente para Go shops que querem agentes de IA sem overhead de runtime TypeScript/Python.

README

A tradução para o português deste README ainda está na fila.

go-mcp-servers

Production-ready Model Context Protocol (MCP) servers in Go — filesystem, PostgreSQL, Redis, shell, HTTP, and Home Assistant. Embed as static binaries or import as Go packages.

CI License: MIT Go 1.23+ MCP Spec

go-mcp-servers fills the gap left by the official MCP reference servers — which only ship in TypeScript and Python. Use these in Claude Desktop, Cursor, custom Go agents, or any MCP-compatible host. Each server is a single static binary (~9 MB) and also importable as a Go package.


Servers

ServerDescriptionDocs
filesystemSandboxed read / write / search / list / move under a configurable root.README
postgresQuery, introspect, and optionally mutate PostgreSQL. Tools for schema, indexes, EXPLAIN.README
shellSandboxed shell execution with allowlist, denylist, ANSI strip, timeout.README
redisStrings, lists, hashes, pub/sub, TTL — with namespace prefix.README
httpHTTP client (GET/POST/PUT/DELETE/custom) with allowlist, JSON / HTML parsing.README
homeassistantHome Assistant entity control via the HA REST API.README

Quick start

Build from source

git clone https://github.com/dimasd-angga/go-mcp-servers
cd go-mcp-servers
make build-all
# binaries appear in ./bin/

Run one

FS_ROOT=$HOME/workspace ./bin/mcp-filesystem

Use in Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "filesystem": {
      "command": "/absolute/path/to/bin/mcp-filesystem",
      "env": { "FS_ROOT": "/Users/me/workspace" }
    }
  }
}

Restart Claude Desktop. The filesystem tools appear automatically. Ask: "Read README.md and summarize it."


Why Go?

The official modelcontextprotocol/servers repo ships only TypeScript and Python. For Go-native AI agent runtimes — like Tauri desktop agents, Ollama-adjacent Go services, or anything embedding MCP into a Go process — that's a friction point. go-mcp-servers exists so Go projects can:

  • Ship single static binaries — no Node or Python runtime on the host.
  • Embed in-process — import the server as a Go package, host the tools without a subprocess.
  • Run with low overhead — ~9 MB binaries, ~15 MB RSS idle, sub-500ms cold start.
  • Pass go vet, race detector, gosec — production-ready guarantees from the toolchain.

If you're on TypeScript or Python, use the official reference servers. If you're on Go, use this.


All six in one config

{
  "mcpServers": {
    "filesystem":    { "command": "/usr/local/bin/mcp-filesystem",    "env": { "FS_ROOT": "/Users/me/workspace" } },
    "postgres":      { "command": "/usr/local/bin/mcp-postgres",      "env": { "POSTGRES_DSN": "postgres://reader:secret@db:5432/app?sslmode=require" } },
    "shell":         { "command": "/usr/local/bin/mcp-shell",         "env": { "SHELL_WORKDIR": "/Users/me/workspace", "SHELL_ALLOWED_CMDS": "go,npm,git,make" } },
    "redis":         { "command": "/usr/local/bin/mcp-redis",         "env": { "REDIS_ADDR": "localhost:6379", "REDIS_PREFIX": "claude:" } },
    "http":          { "command": "/usr/local/bin/mcp-http",          "env": { "HTTP_ALLOWED_HOSTS": "api.github.com,httpbin.org" } },
    "homeassistant": { "command": "/usr/local/bin/mcp-homeassistant", "env": { "HA_URL": "http://homeassistant.local:8123", "HA_TOKEN": "..." } }
  }
}

Use from custom Go agents

Each server is also a Go package — import it and host the MCP server in-process.

package main

import (
    "log"

    fsserver "github.com/dimasd-angga/go-mcp-servers/servers/filesystem"
    "github.com/mark3labs/mcp-go/server"
)

func main() {
    fs, err := fsserver.NewFilesystemServer()
    if err != nil {
        log.Fatal(err)
    }
    if err := server.ServeStdio(fs.MCP()); err != nil {
        log.Fatal(err)
    }
}

Architecture

flowchart LR
    Host["MCP host<br/>Claude Desktop / Cursor / custom Go agent"]
    Transport["JSON-RPC 2.0<br/>stdio or SSE"]

    Host --> Transport
    Transport --> Filesystem["mcp-filesystem binary"]
    Transport --> Postgres["mcp-postgres binary"]
    Transport --> Redis["mcp-redis binary"]
    Transport --> Shell["mcp-shell binary"]
    Transport --> HTTP["mcp-http binary"]
    Transport --> HomeAssistant["mcp-homeassistant binary"]

    Filesystem --> FS["Filesystem root"]
    Postgres --> PG["Postgres database"]
    Redis --> RD["Redis instance"]
    Shell --> SH["Sandboxed shell"]
    HTTP --> API["HTTP endpoints"]
    HomeAssistant --> HA["Home Assistant API"]

    Filesystem -. logs .-> Stderr["stderr"]
    Postgres -. logs .-> Stderr
    Redis -. logs .-> Stderr
    Shell -. logs .-> Stderr
    HTTP -. logs .-> Stderr
    HomeAssistant -. logs .-> Stderr
MCP host (Claude Desktop / Cursor / your Go agent)
         │
         ▼  JSON-RPC 2.0  (stdio or SSE)
go-mcp-server binary
         │
         ▼
External resource (filesystem, Postgres, Redis, shell, HTTP, HA)
  • Transport: stdio by default (for Claude Desktop and embedded use) or SSE (--transport=sse --port=N).
  • Tools: each server registers a fixed catalog. No dynamic tool generation.
  • Auth: optional MCP_AUTH_TOKEN enables bearer-token gating across servers.
  • Logging: structured logs (zerolog) to stderr only. stdout is reserved for the MCP transport.

Comparison with official servers

Featuremodelcontextprotocol/serversgo-mcp-servers
LanguageTypeScript, PythonGo
Distributionnpm / pipSingle static binary or go install
Cold start~1–3 s<500 ms
Idle RAM50–150 MB~15 MB
Embeddable in Go❌ (subprocess only)✅ (import)
Built onofficial SDKmark3labs/mcp-go

Pick the one that fits your stack.


Local development

# Bring up Postgres + Redis on alternate ports (55432, 56379) to avoid host clashes
docker compose -f deploy/docker-compose.yml up -d postgres redis

# Run everything
export POSTGRES_TEST_DSN="postgres://mcptest:mcptest@127.0.0.1:55432/mcptest?sslmode=disable"
export REDIS_TEST_ADDR="127.0.0.1:56379"
export POSTGRES_DSN="$POSTGRES_TEST_DSN"
export REDIS_ADDR="$REDIS_TEST_ADDR"

make test-all      # unit + integration tests
make build-all     # build into ./bin/
make smoke         # exercise each binary via real stdio JSON-RPC
make verify        # lint + test-all + smoke (release gate)

CI runs the same make verify on every push.


Roadmap

  • mongodb server
  • slack server (Slack Web API)
  • github server (REST + GraphQL)
  • Resources and prompts (currently tools-only)
  • Streamable HTTP transport once the spec stabilizes
  • Pre-built Docker images on ghcr.io
  • Homebrew formula

Vote in Discussions.


License

MIT — see LICENSE.

Acknowledgments

Ver o original no GitHub

Bom para

Relacionados