mcp-server-go-quality

mcp-server-go-quality
One MCP server for golangci-lint, govulncheck, and nilaway — a unified Diagnostic[] array with consistent file:line:column navigation, parallel execution, and zero-config auto-install.
Demo

Related MCP server: gopls-mcp
What it does
Wraps three Go code quality tools into a single MCP interface. Designed for AI coding agents (Claude Code, Codex, OpenCode, ...) but also useful for CI pipelines and local development. Call one tool (run_code_checks) and get a flat, sorted Diagnostic[] array — all three checkers run in parallel under independent timeouts. Tools auto-install on first use.
Concern | Raw CLI | This server |
Entry points | 3 separate | 1 MCP tool call |
Output format | 3 incompatible schemas | 1 unified |
Tool install | Manual per machine | Auto-install with version pinning |
Concurrency | Sequential by default | Parallel goroutines, per-tool timeouts |
Error handling | Parse exit codes and stderr manually | Canonical |
Path normalization | Raw absolute paths | Relative to project root |
Workspace support | Manual | Two-pass root discovery ( |
Tools bundled
Tool | Version | Checks |
v2.11.4 (pinned) | Lint violations, complexity ( | |
latest | Known CVEs reachable from your code via call-graph analysis | |
latest | Inter-procedural nil-panic paths the compiler won't catch |
MCP tools exposed
Tool | Description |
| Run all 3 checkers in parallel (or a subset via |
| Run golangci-lint only. |
| Run govulncheck only. |
| Run nilaway only. |
| Pre-install all three tools with pinned/latest versions. Call this at session start. |
Output schema
Every tool returns a flat array of this shape, sorted by file then line:
[
{
"tool": "golangci-lint",
"file": "cmd/main.go",
"line": 115,
"column": 1,
"severity": "warning",
"message": "cognitive complexity 18 is high (> 15)",
"error": "",
"native": {"FromLinter": "gocognit", "Text": "...", "SuggestedFixes": [...]}
}
]Field | Notes |
| Absent (not |
| Full raw tool output. |
| Non-empty on tool failure or panic. Check this first before reading |
Installation
For AI agents (Claude Code, etc.)
claude mcp add go-quality -- go run github.com/afshinator/mcp-server-go-quality/cmd/mcp-server-go-quality@latestFor other MCP clients, add to your config:
{
"mcpServers": {
"go-quality": {
"command": "mcp-server-go-quality",
"args": []
}
}
}For humans (local install)
go install github.com/afshinator/mcp-server-go-quality/cmd/mcp-server-go-quality@latestThen run it directly on a Go project:
cd ~/my-go-project
mcp-server-go-quality
# Or specify a project path and config:
mcp-server-go-quality --config ./my-config.yamlThe server starts in stdio mode — connect any MCP client or test it interactively by piping JSON-RPC. Tools auto-install into $GOBIN on first use.
Prerequisites: Go 1.21+ on PATH (the toolchain directive in go.mod downloads the exact required version automatically).
Agent workflow
Install tools — call
install_toolsat session start. Returnsinstalled,already_present, andfailedlists. A fast no-op if binaries are at the correct version.Run checks — call
run_code_checkswithproject_pathset to the project root (or any subdirectory — the server walks up togo.workorgo.mod).Process diagnostics — check
errorfirst (non-empty = tool failure), then navigate tofile:line:column. Thenativefield carries full raw output for remediation.
Full contract and processing loop: docs/agents/AGENTS.md
Error tables, remediation, and troubleshooting: docs/agents/reference.md
Configuration (.go-quality.yaml)
Place at the project root. All fields optional.
timeout: 5m # per-tool deadline; increase for big monorepos or first vuln DB download
tools:
golangci-lint:
version: v2.11.4
extra_args: []
govulncheck:
version: latest
extra_args: []
nilaway:
version: latest
extra_args: ["--exclude-pkgs=github.com/myorg/vendor"]Precedence: --config flag > .go-quality.yaml at server CWD > compiled-in defaults.
Go workspace support
Supports single-module go.mod and go.work multi-module workspaces. Pass any subdirectory as project_path — the server walks up to find go.work first, then go.mod. Nilaway automatically collects module paths from use directives and passes them via -include-pkgs.
Contributing
TDD enforced — nearly every source file has a companion _test.go file. Integration tests run against testdata/sample_project/, a small Go module with intentional issues for all three tools.
make test # unit tests (fast)
make test-all # full suite including integration
make lint # golangci-lint
make fmt # gofumpt + goimports
make build # compile the binaryMIT License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceA Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.97Apache 2.0
- Alicense-qualityAmaintenancehttps://gopls-mcp.org/ MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.57BSD 3-Clause
- AlicenseAqualityAmaintenanceMCP server that keeps language server sessions warm and routes multiple languages through one process. Agents get persistent cross-file awareness, speculative execution (simulate edits before writing to disk), and 20 skills that encode correct multi-step operations like safe rename, blast-radius analysis, and end-to-end refactoring. Single Go binary, no runtime dependencies.50106MIT
- Alicense-qualityAmaintenanceSelf-hosted MCP proxy and aggregation platform. Register multiple upstream MCP servers and expose them through a single unified endpoint with namespace routing, multi-transport support (HTTP/SSE, stdio, OpenAPI→MCP), per-tool overrides, and a web admin UI.16MIT
Related MCP Connectors
Go MCP server for GitLab: 2 dynamic tools reach 1000+ REST/GraphQL actions. Free/CE, no paid tier.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/afshinator/mcp-server-go-quality'
If you have feedback or need assistance with the MCP directory API, please join our Discord server