接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
A Go symbol and call-graph database backed by SQLite. Index any Go module and query symbols, callers, callees, blast radius, dead code, interface implementors, and type references — all with structured JSON output designed for programmatic consumption.
Project page: https://projects.mioli.dev/gosymdb/ · Blog: https://blog.mioli.dev · Author: Stefano Mioli
gosymdb is a local, Go-specific symbolic query CLI for coding agents. It uses Go's own package/type analysis (go/packages, go/types — the same loader the compiler uses) to build a persistent SQLite index, then answers repeatable JSON queries such as:
gopls. It complements gopls — see gosymdb and gopls.brew tap walkindude/tap
brew install --cask gosymdb
The cask strips macOS Gatekeeper's quarantine flag post-install so the binary runs on first invocation without xattr gymnastics.
go install github.com/walkindude/gosymdb@latest
Requires Go 1.26+ on your machine, since this path builds gosymdb from source. The other install methods in this section (Homebrew, scripted installer, Nix, Linux packages) ship pre-compiled binaries and have no Go dependency at install or runtime.
Download .deb, .rpm, or .apk for amd64 / arm64 from the latest GitHub release.
nix profile install github:walkindude/gosymdb
# or one-off:
nix run github:walkindude/gosymdb -- --help
# or drop into a dev shell with go + gopls:
nix develop github:walkindude/gosymdb
curl -sSL https://raw.githubusercontent.com/walkindude/gosymdb/master/install.sh | sh
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/walkindude/gosymdb/master/install.ps1 | iex
Both installers download the binary, verify its SHA-256 checksum against the release's checksums.txt, and — if Claude Code is installed — generate the cli-bridge spec so gosymdb registers as a first-class MCP tool (see below).
# 1. Index a Go module
cd ~/your-go-project
gosymdb index --root .
# 2. Query it
gosymdb find --q Store --json
gosymdb callers --symbol 'github.com/you/repo/pkg.MyFunc' --json
gosymdb blast-radius --symbol 'github.com/you/repo/pkg.MyFunc' --depth 5 --json
gosymdb exposes a self-describing manifest (gosymdb cli-bridge-manifest) that the cli-bridge plugin turns into first-class MCP tools. Once set up, agents can call gosymdb_callers, gosymdb_blast-radius, gosymdb_implementors etc. as MCP tools — typed inputs, structured outputs, no grep fallback.
This is the recommended path for agentic use. Agents lose track of CLI tools mentioned only in CLAUDE.md once the conversation gets long; MCP tools live in the agent's tool registry and don't decay under context pressure. (For background on why, see cli-bridge's "The problem" section.)
Three steps:
go install github.com/walkindude/gosymdb@latest (or use the installer above; install.sh auto-generates the cli-bridge spec when Claude Code is detected, in which case skip step 3)./plugin marketplace add walkindude/cli-bridge && /plugin install cli-bridge@cli-bridge) or standalone (npm i -g cli-bridge && claude mcp add cli-bridge -s user -- cli-bridge)./cli-bridge:register gosymdb (uses the canonical cli-bridge-manifest subcommand — no --help scraping).Restart Claude Code and all gosymdb_* tools appear in the MCP tool list. After upgrading the gosymdb binary, cli-bridge auto-refreshes the spec on its next startup — no manual re-register.
All query commands support --json for structured output.
gosymdb uses go/packages (the same loader the Go compiler uses) to parse and type-check your code, then walks the AST to extract:
Everything is stored in a single SQLite file for fast, offline querying.
The index goes stale the moment you edit a file. gosymdb closes the loop on its own.
Every JSON response carries an env envelope that always includes env.stale_packages — the list of packages whose source has drifted from what's indexed. The agent sees it on every query, regardless of the command:
$ gosymdb find --q Store --json | jq '.env.stale_packages'
["github.com/you/repo/store"]
Pass --auto-reindex to any query command and stale modules get re-indexed in place before the query runs. The staleness check itself is cheap enough to run on every call: a git fast-path uses git diff against the commit stamped at index time (one subprocess for the whole repo, sub-second on Kubernetes-scale codebases), with a per-file FNV-64a hash fallback for when git isn't usable.
gosymdb callers --symbol 'github.com/you/repo/store.Open' --auto-reindex --json
The shipped CLAUDE.md wires this up for agents: watch env.stale_packages, rebuild or pass --auto-reindex. A silent failure mode (querying a stale index) becomes a self-correcting feedback loop the agent doesn't have to be reminded about.
gosymdb is a static symbolic index, not a runtime tracer. Some things it cannot know:
implementors to find concrete types, then run callers/callees against the concrete method. Caller responses include a hint field that flags this when relevant.reflect.Value.Call, method-value lookups) is not statically resolved.go:linkname, plugin loading, and runtime dispatch are not modeled.go/packages loads. Symbols behind tags not active for your host won't be indexed.--cgo to index when indexing CGO-dependent modules.--tests to include *_test.go symbols and the calls they contain.env.stale_packages flags drift on every response, and --auto-reindex self-heals before the query runs.gosymdb complements gopls; it is not a replacement.
gopls is the live Language Server view of a workspace — interactive, in-process, built for the IDE inner loop.--json output that diffs cleanly across runs.If you're editing code in an IDE, use gopls. If an agent needs to ask structural questions across a long session without maintaining an LSP conversation, use gosymdb.
gosymdb runs entirely on your machine. It does not send your source code, symbols, or any data to external servers. There is no telemetry, no phoning home, no network access of any kind. The SQLite database stays on your local disk.
gosymdb is designed for AI coding agents. Every command produces structured JSON with:
error_code, hint, and recovery fieldsenv.stale_packages always; env.git branch/dirty state when GOSYMDB_ENV_GIT=1)agent-context command for one-shot API discoveryRun gosymdb agent-context at the start of any agent session to get the full command reference.
GOSYMDB_ENV_GIT=1 — populate the env.git block (branch, dirty count, fetch age, etc.) on every response. Off by default because it costs ~7 subprocess git calls per query; turn it on if your agent consumes this info.During v0.x, the supported contract is:
index, find, def, callers, callees, blast-radius, dead, implementors, references, packages, health, agent-context, cli-bridge-manifest, version.--db, --json, --auto-reindex.error_code, hint, recovery) as emitted when --json is set.env block on every JSON response: always env.db and env.stale_packages; env.git when GOSYMDB_ENV_GIT=1.Breaking changes to any of the above bump the minor version and are called out in release notes. Additive changes (new commands, new fields, new optional flags) are non-breaking and can land in patch releases. Tests consuming gosymdb's JSON should be resilient to unknown fields.
gosymdb is primarily a CLI. A few Go packages are publicly exported — store, store/sqlite, indexer — to make it possible to plug in alternative store.Store backends or drive the indexer from your own code. They are not intended as a stable library API.
While gosymdb is in v0.x, these packages may change in any minor release: signatures, types, or whole packages can be renamed, moved, or removed. If you import them, pin an exact version and expect to read the changelog on every bump.
Apache 2.0 — see LICENSE.
A Go symbol and call-graph database backed by SQLite. Query symbols, callers, callees, blast radius, dead code, and interface implementors as structured JSON — typed code navigation for AI agents (MCP
總覽
A Go symbol and call-graph database backed by SQLite. Query symbols, callers, callees, blast radius, dead code, and interface implementors as structured JSON — typed code navigation for AI agents (MCP) and humans.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Gosymdb 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 A Go symbol and call-graph database backed by SQLite. Query symbols, callers, callees, blast radius, dead code, and interface implementors as structured JSON — typed code navigation for AI agents (MCP) and humans.