AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Godig

mcp-samber-godig Β· by samber

πŸ”Œ CLI & MCP server for pkg.go.dev

β€” No reviews yet
0 installs
43 views
0.0% view→install

Install

$ agentstack add mcp-samber-godig

βœ“ scanned Β· βœ“ verified, works with Claude Code, Cursor, and more.

Security review

βœ“ Passed

No issues found. Passed automated security review. Β· v0.1.0 How review works β†’

  • βœ“ Prompt-injection patterns
  • βœ“ Secret / credential exfiltration
  • βœ“ Dangerous shell & filesystem operations
  • βœ“ Untrusted network calls
  • βœ“ Known-malicious package signatures

What it can access

  • βœ“ Network access No
  • βœ“ Filesystem access No
  • βœ“ Shell / process execution No
  • βœ“ Environment & secrets No
  • βœ“ Dynamic code execution No

From automated source analysis of v0.1.0. β€œUsed” means the capability is present in the source β€” more access means more to trust, not that it’s unsafe.

View the full security report β†’

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-samber-godig)

Reliability & compatibility

βœ“ Security review passed
0 installs to date
β€” no reviews yet
● 2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work β†’
Are you the author of Godig? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

godig - CLI & MCP server for pkg.go.dev

[](https://github.com/samber/godig/releases)

[](https://pkg.go.dev/github.com/samber/godig)

[](https://goreportcard.com/report/github.com/samber/godig) [](https://github.com/samber/godig/graphs/contributors) [](./LICENSE)

godig is a CLI and an MCP server for exploring Go packages and modules via the pkg.go.dev API: search, documentation, symbols, versions, importers and vulnerabilities β€” from your shell or from an AI agent.

Its commands and MCP tools are built from a small hand-written catalog ([internal/spec](internal/spec)) and call the typed go-pkggodev-client. All operations are read-only and need no authentication.

> [!TIP] > Looking for a Go library instead of a CLI? Use samber/go-pkggodev-client β€” the typed pkg.go.dev client that powers godig.

πŸš€ Install

go install github.com/samber/godig/cmd/godig@latest

# AI Agent Skill:
npx skills add https://github.com/samber/cc-skills-golang --skill golang-pkg-go-dev

# Register the MCP server into Claude Code (stdio)
claude mcp add pkg-go-dev -- godig mcp

Requires Go >= 1.25. See [Skill](#-skill) to also register the MCP server with your agent.

πŸ’‘ Quick start

# Overview β€” one compact call: metadata, latest + recent versions, licenses, vulns
godig overview github.com/samber/ro

# Search
godig search "result option monad" --limit 5

# Package facets
godig package info github.com/samber/ro
godig package imports github.com/samber/ro
godig package doc github.com/samber/ro --format md
godig package examples github.com/samber/ro
godig package examples github.com/samber/ro --symbol Map   # examples for one symbol only
godig package licenses github.com/samber/ro

# Single symbol (token-efficient vs the full package doc/examples)
godig symbol doc github.com/samber/ro Map
godig symbol examples github.com/samber/mo Either.ForEach

# Module facets
godig module info github.com/samber/ro            # incl. download size + min Go version
godig module readme github.com/samber/ro
godig module licenses github.com/samber/ro
godig dependencies github.com/samber/oops         # go.mod requires/replaces/excludes

# Lists (auto-paginated; --limit to cap, -o md for a Markdown table)
godig versions github.com/samber/ro -o md
godig major-versions github.com/samber/do        # v1, v2, v3 ... (separate modules)
godig major-versions github.com/samber/do --exclude-pseudo   # drop majors whose latest is a pseudo-version
godig packages github.com/samber/ro
godig imported-by github.com/samber/ro --limit 20
godig symbols github.com/samber/ro

# Filter (a Go boolean expression over item fields) and build context (goos/goarch)
godig versions github.com/samber/ro --filter 'hasPrefix(version, "v0.3")'
godig symbols github.com/samber/ro --goos linux --goarch amd64

# Vulnerabilities
godig vulns github.com/samber/ro

# Run as an MCP server (stdio; --transport http for HTTP)
godig mcp

Global flags: -o, --output (table default, json, raw, md), --base-url, --vuln-base-url (Go vulnerability database, default https://vuln.go.dev), --timeout, --log-level (debug|info|warn|error|off, default error; logs go to stderr). All flags can also be set via GODIG_-prefixed environment variables.

Exit codes: 0 success, 1 runtime error (e.g. network, package not found), 2 usage error (missing/invalid arguments or flags, or a group invoked without a subcommand).

🧠 Commands

| Command | Description | | ----------------------------------------- | ------------------------------------ | | godig overview | One-call compact summary (start here)| | godig search [--symbol ] | Search packages and symbols | | godig package info | Package metadata | | godig package imports | Packages that a package imports | | godig package doc --format | Package documentation (md/text/html) | | godig package examples | Documentation with examples (--symbol to scope) | | godig package licenses | Package licenses | | godig symbol doc | One symbol's signature + doc | | godig symbol examples | One symbol's runnable examples | | godig module info | Module metadata (incl. size + min Go version) | | godig module licenses | Module licenses | | godig module readme | Module README | | godig dependencies | Module dependencies from its go.mod | | godig packages | List a module's packages | | godig versions | List module versions | | godig major-versions | List major versions (v1, v2, v3 ...) | | godig imported-by | Packages that import a package | | godig symbols | Exported symbols of a package | | godig vulns | Known vulnerabilities | | godig mcp | Run the MCP server (stdio or http) |

Run godig --help (or godig package --help) for per-command flags. Each operation is also exposed as an MCP tool (e.g. overview, package-info, module-readme). Utility commands: godig version and godig completion (bash/zsh/fish/powershell).

For AI agents (token-efficient): start with overview β€” one call returns a compact summary (no large docs). Fetch doc, examples, module readme or licenses only when the full text is actually needed, and cap long lists (versions, imported-by) with --limit.

πŸ”Ž Filters

The --filter flag (on search, versions, packages, imported-by, symbols, major-versions) takes a Go boolean expression evaluated server-side over each item. The identifiers are the item's fields β€” which differ per command, so a field valid for one list is not valid for another (e.g. search exposes packagePath, not path). Helper functions include hasPrefix, hasSuffix and contains.

godig search "result option" --filter 'hasPrefix(packagePath, "github.com/samber/")'
godig versions github.com/samber/ro --filter 'hasPrefix(version, "v0.3")'
godig symbols github.com/samber/ro  --filter 'kind == "Function"'
godig imported-by github.com/samber/ro --filter 'contains(path, "/internal/")'

Available fields per command (string unless noted):

| Command | Filterable fields | | ---------------- | --------------------------------------------------------------------------------- | | search | modulePath, packagePath, synopsis, version | | versions | version, modulePath, deprecated (bool), retracted (bool), hasGoMod (bool), commitTime | | packages | path, name, synopsis, isRedistributable (bool) | | imported-by | path (the importing package path) | | symbols | name, kind (Function/Method/Type/Variable/Constant), synopsis, parent | | major-versions | modulePath, major, version, isLatest (bool) |

> [!NOTE] > Identifiers follow the pkg.go.dev API's filter schema, using the lowercase JSON field name. > kind values are capitalized (Function, not func). An unknown identifier is rejected > by the API with HTTP 400 undefined identifier: , which names the offending field.

πŸ“« MCP server

godig mcp runs an MCP server exposing one read-only tool per operation, over either transport.

stdio (default) β€” the client launches the binary on demand:

claude mcp add pkg-go-dev -- godig mcp
{ "mcpServers": { "pkg-go-dev": { "command": "godig", "args": ["mcp"] } } }

streamable HTTP β€” a shared, long-running server at /mcp (--addr, default :8080):

godig mcp --transport http --addr :8080
claude mcp add --transport http pkg-go-dev http://localhost:8080/mcp
{ "mcpServers": { "pkg-go-dev": { "type": "http", "url": "http://localhost:8080/mcp" } } }

A public instance is hosted on Clever Cloud at https://godig.samber.dev/mcp β€” register it without running anything locally:

claude mcp add --transport http pkg-go-dev https://godig.samber.dev/mcp
{ "mcpServers": { "pkg-go-dev": { "type": "http", "url": "https://godig.samber.dev/mcp" } } }

πŸ₯· Skill

A companion AI-agent skill, golang-pkg-go-dev, lives in samber/cc-skills-golang. It covers both setup (registering the MCP server) and usage workflows (intent β†’ command/tool), and triggers when exploring Go packages: docs, versions, importers, vulnerabilities.

npx skills add https://github.com/samber/cc-skills-golang --skill golang-pkg-go-dev

πŸ”§ How it works

  • internal/spec is a hand-written catalog of the operations (name, flags, types).
  • The CLI (cmd/godig) and the MCP server (internal/mcpserver) both build their surface by looping over that catalog β€” one Cobra command and one MCP tool per operation.
  • internal/dispatch is the shared core: it maps each operation name to the matching typed go-pkggodev-client call; results render as table, json or raw.

🀝 Contributing

# Install dev dependencies
make tools

# Run tests
make test

# Lint
make lint

# Build (with version ldflags)
make build

πŸ‘€ Contributors

πŸ™ Acknowledgements

Thanks to Clever Cloud for hosting the public godig.samber.dev MCP server.

πŸ’« Show your support

Give a ⭐️ if this project helped you!

[](https://github.com/sponsors/samber)

πŸ“ License

Copyright Β© 2026 Samuel Berthe.

This project is [MIT](./LICENSE) licensed.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source β€” we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.