Fix golangci-lint issues instantly with AI agents

When an agent encounters a golangci-lint diagnostic, it calls a single tool and immediately understands what the issue means and how to fix it.

629 Guides 5 MCP Tools Zero Config Single Binary

MCP Tools

golangci_lint_run

Primary entry point. Runs golangci-lint, parses results, and returns fix guidance with package breakdown and strategy recommendation.

golangci_lint_run(path="./pkg/auth/...")

golangci_lint_parse

Parse existing golangci-lint JSON output. Returns fix guidance for all unique (linter, rule) pairs with Related Context.

golangci_lint_parse(output="<json>")

golangci_lint_guide

Per-diagnostic lookup by linter name and optional rule ID. Returns XML-tagged guidance with instructions, examples, patterns, and related sections.

golangci_lint_guide(linter="errcheck")

golangci_lint_list

Discover all supported linters with compound/simple classification and rule counts.

golangci_lint_list()

golangci_lint_summarize

Strategy summary of raw JSON: unique issue count, package breakdown, and recommended approach.

golangci_lint_summarize(output="<json>")

Guide Coverage

staticcheck
172 rules
gocritic
108 checkers
revive
101 rules
gosec
61 rules
govet
35 analyzers
30+ more linters
testifylint, modernize, ginkgolinter, errorlint...

Architecture

📦

Single Binary

All 629 guides embedded via go:embed. No external files, no database, no network calls.

🔌

MCP Server

Built with mcp-go, stdio transport. Five tools exposed for lint diagnosis and fix guidance.

🤖

Agent Integration

Plugin hooks, platform rules, and skill files for opencode, Claude Code, and Cursor.

Linter Relationship Graph

Linter relationship graph: 629 nodes, 2,232 edges, 10 communities. Explore the interactive graph →

Installation

Install the MCP server binary:

go install github.com/wavilen/golangci-lint-mcp@latest

Install the OpenCode skill:

npx @wavilen/golangci-lint-guide

Configure in opencode.json:

{ "$schema": "https://opencode.ai/config.json", "mcp": { "golangci-lint": { "type": "local", "command": ["golangci-lint-mcp"] } } }