go-boost is an MCP server for Go. It gives AI coding assistants structured, accurate context about your Golang codebase, so they stop guessing at your structs, your routes, and your database schema.
Laravel developers have Laravel Boost. This is the equivalent for Go.
It speaks the Model Context Protocol and works with Claude Code, Cursor, GitHub Copilot, Gemini CLI, Google Antigravity, Windsurf, and Zed. It reads your code statically through the Go AST, never executing it, and ships with zero module dependencies.
# 1. Install the MCP server binary (zero dependencies)
go get -tool github.com/wahyunoerr/go-boost/v2/cmd/go-boost@latest
# 2. Configure your AI coding assistant (Cursor, Claude Code, Copilot, Antigravity)
go tool go-boost init
⭐ Support Open Source: If
go-boostaccelerates your Go development workflow, please give it a star on GitHub to help other Go developers discover it!
[!TIP]
Go Boost Pro Agent Skill Suite ($9.99 on Agensi.io)
The open source binary gives you all 21 native MCP tools. For teams wanting autonomous multi tool agent orchestration without manual prompt tuning, the commercial Go Boost Pro Agent Skill Suite provides the verified
SKILL.mdorchestration protocol, Concurrency Audit Playbook, Live Database Migration Safety Playbook, and Hexagonal Refactoring Playbook. Available on Agensi.io (Go Boost).
Table of Contents
- Architecture and Advantages
- Key Features
- 21 Built-in MCP Tools
- Interactive MCP Prompts
- Dynamic MCP Resources
- How Tools Run When go-boost Is Activated
- Requirements
- Installation Guide
- Quick Start
- Exit Codes
- Editor & AI Assistant Setup
- CLI Commands Reference
- Context Architecture: Guidelines and Skills
- License
Architecture and Advantages
go-boost is built directly on the Go standard library (go/parser, go/ast, go/token) and has zero Go module dependencies. The database tools are the one exception to being self-contained: they drive the official sqlite3, psql, and mysql command line clients, which must be installed separately. See Requirements.
- Native Speed: Runs as a standalone compiled binary. Measured on an Apple Silicon Mac: a median 3.9 ms to start and print its version, 30 ms to complete an MCP handshake plus a full project scan, and a 6 MB peak resident set.
- Static AST Analysis: Reads structs, interfaces, methods, comments, and field tags statically without executing or compiling the application code.
- Implicit Interface Matcher: Computes method sets across the codebase to identify which concrete structs satisfy any given interface contract.
- Static Concurrency Hazard Detection: Audits AST patterns for goroutine leaks, context timer leaks (missing defer cancel), and mutex lock hygiene.
- Schema vs Struct Diff Engine: Compares live database schemas against Go struct tags (
db,gorm,json) to identify schema desynchronizations. - Automatic Multi-Stack Detection: Identifies web frameworks (Gin, Fiber, Echo, Chi, gorilla/mux, go-zero,
net/http), ORM/data access layers (GORM, Bun, SQLX, Ent, sqlc, pgx), caching engines (Redis, Memcached), message brokers (Kafka, RabbitMQ, NATS), RPC (gRPC), configuration libraries (Viper, envconfig), loggers (slog,zap,zerolog), and directory architecture patterns. - Execution Safety: Database tools accept only read-only statements (
SELECT,WITH,SHOW,EXPLAIN,DESCRIBE,PRAGMA) and, in addition, open the database itself in a read-only mode, so a statement that slips past validation still cannot write. Row capping and timeouts apply on top. - Zero External Dependencies: Adds zero third-party dependencies to your project
go.mod.
Key Features
- Dual-Mode Operation: Serves as a terminal CLI for developers and an MCP server over
stdio(JSON-RPC 2.0) for AI assistants. - Data Model Inspection: Extracts struct field tags such as
json,gorm,validate, anddbso AI understands payloads, validation rules, and schema contracts accurately. - HTTP Endpoint Discovery: Statically maps all routes across supported frameworks, complete with handler names and file locations.
- Structured Log and Diagnostic Reader: Parses JSON logs (
slog,zap,zerolog) and standard text logs, capturing recent panics and stack traces. - Targeted Test Runner: Executes specific tests using the
-runfilter and extracts failure diagnostics without overflowing the LLM context window. - Memory Allocation Profiling: Runs benchmarks with
-benchmemto extractns/op,B/op, andallocs/opfor algorithmic optimization. - Interface Mock & Test Scaffolding: Automatically generates thread-safe mock structs for Go interfaces.
- Static Security Auditing: Identifies SQL injection, hardcoded secrets, and TLS hazards in Go source code.
- OpenAPI 3.0 Generation: Scans AST route trees and DTO structs to generate OpenAPI specifications.
- Zero-Friction MCP & Skill Initializer: Generates tailored
.mcp.json,.cursor/mcp.json,.vscode/mcp.json, and.gemini/settings.json, and installs Agent Skills from.ai/skills/*into.claude/skills/*. Existing content you wrote is preserved. - Layout-Aware, Not Layout-Imposing: Reads the directory structure you already use, including non-standard names such as
controllers,services,storage, andmodels, and records the real paths in the guidelines so the agent writes new code where your existing code lives.
21 Built-in MCP Tools
The go-boost MCP server exposes 21 native tools:
Interactive MCP Prompts
go-boost registers interactive prompt templates for MCP clients (prompts/list and prompts/get):
generate_table_tests: Guides the AI to write idiomatic table-driven tests for a specific function or struct with positive and negative test cases.refactor_clean_arch: Prompts the AI to refactor a feature into Clean Architecture layers (Entity, Repository, Usecase, Handler).concurrency_audit: Prompts the AI to perform a comprehensive concurrency safety audit on a target package.diagnose_panic: Guides the AI through analyzing the most recent backend error or panic captured bylast_errorand formulating a defensive fix.
Dynamic MCP Resources
go-boost exposes dynamic context resources readable via standard URIs (resources/list and resources/read):
project://metadata: Real-time JSON document containing detected module, Go version, framework, ORM, and dependency versions.project://routes: Real-time JSON array of all registered HTTP endpoints and handlers.project://schema: Current database schema dump.project://diagnostics: Live compilation and static analysis report.
How Tools Run When go-boost Is Activated
This section explains how tools are initialized and executed between the developer, the editor, and the AI assistant.
1. Activation Lifecycle
When you open a project or trigger a chat prompt in an MCP-compatible environment (Google Antigravity, Cursor, Claude Code, VS Code Copilot, Windsurf, Zed), go-boost activates as a background subprocess communicating over standard input and output (stdio).
Sequence Flow Diagram
sequenceDiagram
autonumber
actor Dev as Developer
participant Client as AI Client / IDE<br/>(Cursor / Claude / Antigravity)
participant Pipe as OS Stdio Pipes<br/>(stdin / stdout / stderr)
participant MCP as go-boost mcp<br/>(Zero-Dep Subprocess)
participant Core as Go AST & Engine Core<br/>(Standard Library)
Note over Dev, Core: Phase 1: Boot and Handshake (< 3ms startup)
Dev->>Client: Opens project workspace or starts prompt
Client->>Pipe: Spawns "go-boost mcp" subprocess in background
Pipe->>MCP: Process starts (~8MB RAM, sub-millisecond boot)
Client->>MCP: JSON-RPC "initialize" (Protocol: 2025-11-25 / 2025-06-18 / 2025-03-26 / 2024-11-05)
MCP-->>Client: Result: capabilities {tools, prompts, resources, completions, logging}
Client->>MCP: Notification: "notifications/initialized"
Note over Dev, Core: Phase 2: Catalog and Capability Discovery
Client->>MCP: JSON-RPC "tools/list"
MCP-->>Client: Returns 21 native tools with complete JSON Schemas
Client->>MCP: JSON-RPC "prompts/list" and "resources/list"
MCP-->>Client: Returns 4 prompt templates and 4 dynamic resource URIs
Client->>MCP: JSON-RPC "completion/complete" (Argument Auto-completion)
MCP-->>Client: Autocomplete candidate symbols from AST
Note over Dev, Core: Phase 3: Autonomous Context Acquisition
Dev->>Client: "Refactor order service and verify database schema"
Note over Client: AI inspects AGENTS.md rules and queries tools
Client->>MCP: JSON-RPC "tools/call" (name: "ast_inspect", args: {"path":"internal/domain"})
MCP->>Core: Parses AST statically via go/parser and go/ast
Core-->>MCP: Extracted structs, tags (json, gorm, validate)
MCP-->>Client: TextContent with structured AST data (clean stdout)
Client->>MCP: JSON-RPC "tools/call" (name: "db_schema", args: {"summary": true})
MCP->>Core: Reads connection config and introspects tables
Core-->>MCP: Database schema, columns, foreign keys
MCP-->>Client: TextContent with table structures
Note over Dev, Core: Phase 4: Code Generation and Quality Verification
Note over Client: AI generates production-grade Go code
Client->>MCP: JSON-RPC "tools/call" (name: "code_check")
MCP->>Core: Runs static analysis and go vet
Core-->>MCP: Diagnostic output clean (exit code 0)
MCP-->>Client: "Verification passed"
Client->>MCP: JSON-RPC "tools/call" (name: "test_runner", args: {"package":"./internal/service"})
MCP->>Core: Runs targeted go test -run
Core-->>MCP: Test suite passed (exit code 0)
MCP-->>Client: Test execution summary and metrics
Client-->>Dev: Verified refactored code with 100% test passing guarantee
Process Architecture & Stream Isolation
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ DEVELOPER WORKSPACE │
│ │
│ ┌─────────────────────────────────────────┐ ┌───────────────────────────────────────────┐ │
│ │ AI Coding Client │ │ Go Project Files │ │
│ │ Cursor / Claude Code / Antigravity │ │ go.mod, *.go, migrations, .env, schemas │ │
│ └────────────────────┬────────────────────┘ └─────────────────────▲─────────────────────┘ │
└────────────────────────┼─────────────────────────────────────────────────────┼─────────────────────────┘
│ │
stdio pipes │ JSON-RPC 2.0 (MCP) │ Direct static AST read
▼ │ & read-only introspection
┌──────────────────────────────────────────────────────────────────────────────┼─────────────────────────┐
│ go-boost mcp Subprocess │ │
│ │ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │ │
│ │ JSON-RPC Stdio Router │ │ │
│ │ stdin: Requests & Notifications stdout: Pure JSON-RPC Responses│ │ │
│ │ stderr: Isolated Diagnostic Telemetry (Zero JSON stream corruption)│ │ │
│ └────────┬───────────────────────────┬───────────────────────────┬─────┘ │ │
│ │ │ │ │ │
│ ▼ ▼ ▼ │ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌────────────────┐ │ │
│ │ 20 Tools │ │ 4 Prompts │ │ 4 Resources │ │ │
│ │ Registry │ │ Registry │ │ Registry │ │ │
│ └───┬─────────┬───┘ └─────────────────┘ └────────────────┘ │ │
│ │ │ │ │
│ │ └─────────────────────────┐ │ │
│ ▼ ▼ │ │
│ ┌────────────────────────────┐ ┌─────────────────────────────────┐ │ │
│ │ Go AST Static Engine │ │ Database Introspect Engine │ │ │
│ │ - Struct & Tag Inspector │ │ - Connection Discovery │────┘ │
│ │ - Route Table Scanner │ │ - Schema & Column Discovery │ │
│ │ - Interface Matcher │ │ - Read-Only Query Guard │ │
│ │ - Concurrency Hazard Check│ │ - Schema vs Struct Diff │ │
│ │ - Dead Code Detection │ │ - SQL Migration Scaffolder │ │
│ └────────────┬───────────────┘ └─────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────┐ ┌─────────────────────────────────┐ │
│ │ Tooling & Quality Core │ │ Security & Scaffolding Engine │ │
│ │ - Targeted Test Runner │ │ - Static Security Scanner │ │
│ │ - Bench Allocation Profiler│ │ - Thread-Safe Mock Generator │ │
│ │ - go doc & go vet Checks │ │ - OpenAPI 3.0 Auto Generator │ │
│ │ - Log & Panic Pinpointer │ └─────────────────────────────────┘ │
│ └────────────────────────────┘ │
│ │
│ Boot Time: < 3ms | Memory: ~8MB | External Deps: 0 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Detailed Lifecycle Phases
- Configuration Detection: The editor reads
.mcp.json,.cursor/mcp.json,.gemini/antigravity/mcp/go-boost.json, or.vscode/mcp.json. These files definego-boostwith argument["mcp"]. - Zero-Latency Subprocess Spawn: The client launches
go-boost mcpas an isolated background child process. Becausego-boostis a statically compiled pure Go binary with zero external dependencies, initialization completes in under 3 milliseconds with approximately 8 MB memory footprint. - Protocol Handshake & Capability Negotiation: The client transmits a JSON-RPC
initializeframe.go-boostnegotiates across the published MCP revisions it supports (2025-11-25,2025-06-18,2025-03-26,2024-11-05), echoing the client's version when it is one of them and otherwise replying with the newest it speaks. It advertises only capabilities it actually implements: tools, prompts, resources, interactive argument completion (completions), and logging level control. The client acknowledges withnotifications/initialized. - Dynamic Catalog Discovery & Argument Completion: The client queries
tools/list,prompts/list, andresources/list.go-boostreplies with all 21 native tools in a stable, alphabetically sorted order, complete with JSON Schema validation specifications, prompt templates, and dynamic URI definitions. When an agent types tool arguments,completion/completeautocompletes candidates drawn from the project itself, such as its discovered connections and interfaces. - Autonomous Context Acquisition Loop: During active developer chat sessions, the AI agent consults
AGENTS.mdand triggers tools autonomously (tools/call).go-boostinspects Go ASTs or database structures statically, returning contextual answers instantly. - Stream Separation Guarantee: All JSON-RPC request and response payloads flow exclusively through
stdinandstdout. Internal engine logs, panic diagnostics, and debug traces are directed strictly tostderr. This architectural separation guarantees that stdout is never corrupted by unexpected terminal text or logs.
2. Three Ways Tools Are Executed
Once go-boost is active, tools can be triggered through three different mechanisms:
Method A: Autonomous Execution by AI Agent
Installing the Go-Boost Pro Agent Skill (from Agensi.io or .ai/skills/go-boost-pro/SKILL.md) instructs the AI assistant to invoke tools autonomously:
- At Session Start: The AI calls
app_infoproactively to inspect your Go version, router, and ORM dependencies. - When Reading or Writing Structs: The AI calls
ast_inspectto examine field names, types, and validation tags (json,validate,gorm), eliminating typos in DTOs. - When Finding Implementation Details: The AI calls
find_implementationsto locate which struct implements a repository or service interface. - When Adding HTTP Endpoints: The AI calls
route_listto check existing paths and avoid route collisions. - When Checking Concurrency Health: The AI calls
concurrency_checkto verify goroutines, mutex locks, and context cancellation. - When Auditing Security: The AI calls
security_scanto verify there are no SQL injections, hardcoded secrets, or insecure TLS configurations. - When Scaffolding Tests: The AI calls
mock_generateto build thread-safe mock implementations for interfaces. - When Generating API Docs: The AI calls
openapi_generateto produce OpenAPI 3.0 specifications from route definitions. - When Cleaning Up Code: The AI calls
deadcode_detectto locate unreferenced functions, structs, and interfaces. - When Debugging Errors or Panics: The AI calls
last_errorandread_logsto pinpoint file names and line numbers immediately without asking the developer to copy-paste terminal logs. - Before Completing Tasks: The AI calls
code_check(go vet) andtest_runner(go test) to ensure the generated code compiles cleanly and passes all test assertions.
Method B: Interactive Prompts in Chat
Developers can prompt the AI assistant directly to execute specific tools using natural language:
Method C: Direct Terminal Execution (Without AI)
Developers can also use go-boost directly from the terminal without opening an AI chat:
# All examples assume a global install. With a project tool install,
# prefix each command with "go tool".
# View all HTTP routes parsed statically from AST
go-boost routes
# Inspect any struct or interface statically
go-boost inspect User
# Run static concurrency audit and compiler vet
go-boost check
# Run benchmarks with memory profiling
go-boost bench ./pkg/...
# Run security audit for SQL injection and secrets
go-boost security
# Generate mock implementation for an interface
go-boost mock UserRepository
# Generate OpenAPI 3.0 specification
go-boost openapi
# Scaffold SQL migration from schema struct diff
go-boost migrate add_users_table
# Detect dead or unused code
go-boost deadcode
# View project stack health and diagnostics
go-boost status
# Inspect database tables directly in the terminal
go-boost schema --summary
3. End-to-End Real-World Scenario
Here is an example workflow when a developer requests a new feature:
User: "Please add a POST /api/v1/checkout endpoint with input validation"
[Step 1] AI invokes app_info
-> Discovers stack: Gin, GORM, slog, validator.v10.
[Step 2] AI invokes ast_inspect on path "./internal/domain"
-> Examines Order and Item structs, noting `validate:"required,min=1"`.
[Step 3] AI invokes find_implementations for "OrderRepository"
-> Locates GormOrderRepository in internal/repository/order.go.
[Step 4] AI invokes route_list
-> Reviews current route groups registered in routes.go.
[Step 5] AI writes handler and checkout service code.
[Step 6] AI invokes concurrency_check
-> Verifies context cancellation and mutex locking hygiene.
[Step 7] AI invokes security_scan
-> Confirms no SQL injection or parameter pollution vulnerabilities.
[Step 8] AI invokes code_check
-> Runs `go vet ./...` (Result: No issues found).
[Step 9] AI invokes test_runner on package "./internal/service"
-> Runs `go test` (Result: All tests passed successfully).
AI: "The checkout endpoint has been created, security audited, and all tests are passing."
4. How to Verify Tool Activation
To verify that the go-boost MCP server is running properly in your editor:
- Cursor:
- Open the Command Palette (
Cmd + Shift + PorCtrl + Shift + P). - Type
MCP: List Servers. - Verify that
go-boostshows an active status with a green indicator.
- Open the Command Palette (
- Claude Code:
- Type
/mcpin the Claude Code prompt. - Verify that
go-boostis listed with 20 active tools.
- Type
- Google Antigravity and Gemini CLI:
- Type in chat: "Run app_info via go-boost".
- The assistant will invoke the tool and display your application metadata.
- Manual Terminal Test:
Test the JSON-RPC stdio handshake directly via pipeline:
The binary will respond with formatted JSON containing all 20 registered tools.echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | go-boost mcp
Requirements
Go 1.22 or newer is the only requirement for the analysis, generation, and diagnostic tools. They read your source with the standard library and need nothing else installed.
The five database tools need a command line client for whichever engine you use. go-boost drives the official client rather than bundling a driver, which is what keeps it at zero Go module dependencies:
The tools affected are db_query, db_schema, db_connections, schema_struct_diff, and migration_generate. Every other tool works without them.
You do not have to guess what is available. app_info reports which clients it found on the machine, so an agent knows up front which tools it can use:
"capabilities": {
"external_tools": [
{ "name": "sqlite3", "available": true, "path": "/usr/bin/sqlite3" },
{ "name": "psql", "available": false, "install": "brew install libpq ..." }
]
}
When a client is missing, the error says exactly how to install it rather than only reporting the absence.
Installation Guide
1. As a project tool (recommended, Go 1.24+)
This pins go-boost in your go.mod the way composer require --dev pins a PHP
dev dependency. Everyone who clones the repository gets the same version, and
nobody has to install anything globally.
go get -tool github.com/wahyunoerr/go-boost/v2/cmd/go-boost@latest
Your go.mod gains a tool directive:
tool github.com/wahyunoerr/go-boost/v2/cmd/go-boost
The /v2 in the path is Go's semantic import versioning: any module at major
version 2 or above carries its major version in the path. The command you run
afterwards is still just go tool go-boost.
Run it through the Go toolchain:
go tool go-boost init
go tool go-boost status
This is the option to choose if you work in a team. Because the command is
go tool go-boost rather than a path on your disk, the generated MCP
configuration works on every machine and can be committed.
2. As a global binary (Go 1.22+)
go install github.com/wahyunoerr/go-boost/v2/cmd/go-boost@latest
Ensure $GOPATH/bin is on your PATH:
export PATH=$PATH:$(go env GOPATH)/bin
Then use go-boost directly:
go-boost init
3. Building from source
git clone https://github.com/wahyunoerr/go-boost.git
cd go-boost
go build -o bin/go-boost ./cmd/go-boost
sudo mv bin/go-boost /usr/local/bin/
Pinning a specific version
go get -tool github.com/wahyunoerr/go-boost/v2/cmd/[email protected]
Verification
go tool go-boost version # project tool install
go-boost version # global install
Which install method ends up in your MCP config
go-boost init writes the invocation that will actually work on other
machines, in this order:
init tells you which one it chose. If it falls back to an absolute path, add
the tool directive and run init again to make the config shareable.
Quick Start
Step 1: Navigate to Your Go Project
cd /path/to/your/go-project
Step 2: Initialize go-boost
go tool go-boost init # or: go-boost init
This command inspects your codebase, detects frameworks and libraries, reads your actual directory structure, and creates:
- MCP configurations:
.mcp.json,.cursor/mcp.json,.vscode/mcp.json,.gemini/settings.json - Agent Skills installed from
.ai/skills/into the.claude/skills/directory
init never discards work you did yourself. An existing .mcp.json keeps
every other server you had configured. Re-running init is safe and idempotent.
It adapts to your layout instead of imposing one
go-boost does not require a particular directory structure. init and app_info read the
directories you actually have, so the agent
places new code where your existing code lives. It recognises layer names
beyond the Go community defaults, including controllers, services,
storage, models, delivery, and transport, and it detects whether your
project is organised by layer, by feature, or kept flat.
For a project laid out by feature, the detected layout contains:
## Project Layout
- **Entry points**: `./cmd/api`, `./cmd/worker`
- **Source roots**: `internal`
- **HTTP handlers**: `internal/order/handler`, `internal/user/handler`
- **Business logic**: `internal/order/service`
- **Data access**: `internal/user/repository`
- **Feature modules**: `order`, `user`
- **Migrations**: `db/migrations`
This project groups code by feature. A new feature gets its own directory
containing every layer it needs; do not add a shared top-level layer directory.
The same command on a flat single-package project instead records that the project is flat and tells the agent not to introduce a directory tree.
Step 3: View Project Stack Status
go-boost status
Editor & AI Assistant Setup
1. Google Antigravity and Gemini CLI
go-boost init writes .gemini/settings.json for you, which is where Gemini CLI reads project-scoped MCP servers from. Nothing else is needed.
To register it by hand instead, after a project tool install:
gemini mcp add -s project -t stdio go-boost go tool go-boost mcp
Or after a global install:
gemini mcp add -s project -t stdio go-boost go-boost mcp
The generated file looks like this:
{
"mcpServers": {
"go-boost": {
"command": "go",
"args": ["tool", "go-boost", "mcp"]
}
}
}
Use -s user instead of -s project to register it globally in ~/.gemini/settings.json.
2. Cursor
Running go-boost init automatically generates .cursor/mcp.json.
To configure manually in Cursor settings:
- Press
Cmd + Shift + P(orCtrl + Shift + P). - Select
MCP: Open MCP Settings. - Add the following entry:
{
"mcpServers": {
"go-boost": {
"command": "go-boost",
"args": ["mcp"]
}
}
}
3. Claude Code
Claude Code automatically discovers .mcp.json and .claude/skills/ in the project root.
To add manually via the Claude CLI:
claude mcp add -s local -t stdio go-boost go-boost mcp
4. VS Code Copilot and Cline
.vscode/mcp.json is generated during go-boost init:
{
"mcpServers": {
"go-boost": {
"command": "go-boost",
"args": ["mcp"]
}
}
}
Reload the VS Code window (Developer: Reload Window) to discover the tools.
5. Windsurf
Windsurf reads MCP servers from a single file in your home directory rather than from the project, so go-boost init does not write it. Add the block yourself to ~/.codeium/windsurf/mcp_config.json.
After a project tool install:
{
"mcpServers": {
"go-boost": {
"command": "go",
"args": ["tool", "go-boost", "mcp"]
}
}
}
After a global install, use "command": "go-boost" with "args": ["mcp"]. Because this file is global, the project tool form only works for projects that declare the tool directive.
6. Zed Editor
Open the Zed settings file with the zed: open settings file command and add a context_servers entry. go-boost init does not write this one, because Zed documents MCP servers in the user settings file rather than a project file.
After a project tool install:
{
"context_servers": {
"go-boost": {
"command": "go",
"args": ["tool", "go-boost", "mcp"],
"env": {}
}
}
}
After a global install, use "command": "go-boost" with "args": ["mcp"].
CLI Commands Reference
Every example below is written as go-boost <command>, which is what you type
after a global install. If you installed go-boost as a project tool, prefix each
one with go tool:
go-boost status # global install
go tool go-boost status # project tool install
Commands that produce a document write it to standard output, so you choose where it goes:
go tool go-boost openapi > openapi.json
go tool go-boost mock UserRepository > internal/domain/user_mock.go
go-boost init
Scans the project, generates MCP configurations (.mcp.json, .cursor/mcp.json, .vscode/mcp.json, .gemini/settings.json), and installs custom Agent Skills from .ai/skills/. Re-running it is safe: your own content is preserved.
go-boost run [command...]
Supervises application or build execution with zero-latency streaming. Upon crash, compilation error, runtime panic, or port conflict, it immediately halts and displays an instant visual diagnostic box showing the exact file, line number, source code snippet with pointer arrow, root cause analysis, and actionable fix:
$ go-boost run make run
========================================================================
🚨 GO-BOOST INSTANT DIAGNOSTIC: Runtime Panic
========================================================================
📍 Location : cmd/api/main.go:45
💥 Message : runtime error: invalid memory address or nil pointer dereference
📄 Source Context:
------------------------------------------------------------------------
43 | cfg, err := config.Load()
-> 45 | dbVersion := cfg.Database.Version
46 | log.Printf("DB Version: %s", dbVersion)
------------------------------------------------------------------------
💡 Root Cause:
Attempted to read or write a struct field or invoke a method on a pointer that is nil.
🛠️ Suggested Fix:
Check if the pointer variable is nil before accessing its fields or methods.
📡 Saved to .go-boost/last_error.json (Synchronized with MCP)
========================================================================
If run without arguments, go-boost run automatically detects Makefile with a run: target, or locates the application entry point in cmd/ or main.go.
go-boost mcp
Runs the standard Model Context Protocol server over stdio (JSON-RPC 2.0).
go-boost status [--format=text|json]
Prints a diagnostic summary including module name, Go version, framework, ORM, logger, detected architecture, and route counts.
go-boost routes [--format=text|json]
Scans the AST and prints all registered HTTP endpoints. Group prefixes are resolved across functions, so routes registered in a helper keep the prefix the caller gave them:
METHOD PATH HANDLER LOCATION
-----------------------------------------------------------------------------------------
GET /api/v1/users HandleGetUsers internal/handler/user.go:24
POST /api/v1/users HandleCreateUser internal/handler/user.go:38
GET /health HandleHealth cmd/api/main.go:42
go-boost inspect <symbol>
Inspects any Go struct or interface statically:
$ go-boost inspect User
📦 Struct: User
Location: internal/domain/user.go:12
Fields:
- ID: uint `json:"id" gorm:"primaryKey"`
- Email: string `json:"email" validate:"required,email"`
go-boost check [--format=text|json]
Runs the concurrency audit and go vet in one command. The audit reports a mutex held across an early return, a cancel function that is never called, and goroutines started in a loop with nothing waiting on them. Returns exit code 2 when it finds something.
go-boost bench [package]
Runs benchmarks with memory allocation profiling (-benchmem):
$ go-boost bench ./pkg/parser/...
BENCHMARK ITERATIONS SPEED MEMORY ALLOCS
---------------------------------------------------------------------------------------------
BenchmarkParseAST-8 50000 24100.00 ns/op 4096 B/op 18 allocs/op
go-boost schema [--summary] [--filter=<table_name>]
Inspects the database schema directly in your terminal.
go-boost security [path] [--format=text|json|sarif]
Scans for SQL injection, hardcoded credentials, command injection, path traversal, and weak TLS configuration. An optional directory narrows the scan. Returns exit code 2 when it finds something, so it works as a CI gate:
$ go-boost security
🛡️ Running static security and vulnerability audit...
🚨 Found 1 potential security vulnerability(ies):
[HIGH] Suspected hardcoded secret or credential in 'apiKey' (File: internal/auth/token.go:3)
Remediation: Load secrets from environment variables or a secret manager, and rotate this value if it was ever real.
Use --format=sarif to upload the result to GitHub code scanning. Paths in the SARIF output are repository-relative, so findings map onto the right files. Code scanning is free for public repositories; for a private repository it needs GitHub Advanced Security, which is only available on a Team or Enterprise plan. The exit code works everywhere, so a private repository can gate on go-boost security alone without any of that.
Adopting the scanner on an existing codebase. A project that already has findings does not have to fix them all before the gate is useful. Record them once and the scanner will only report what is new:
go-boost security --write-baseline # writes .go-boost-security.baseline.json
go-boost security # reports only findings absent from the baseline
go-boost security --no-baseline # reports everything again
A finding is matched by its type, file, and message, so it survives the line moving. A finding that is not in the baseline still fails the build. Commit the baseline file and shrink it over time.
go-boost mock <interface>
Generates a compiling, concurrency-safe mock for an interface and prints it to standard output. Embedded interfaces, variadics, unnamed parameters, and generics are all handled, and the output includes a compile-time assertion that the mock satisfies the interface:
$ go-boost mock UserRepository > internal/domain/user_repository_mock.go
An interface that embeds one from another package cannot be expanded from the AST alone; go-boost reports that instead of emitting a mock that would not compile.
go-boost openapi [--title=...] [--version=...]
Scans the routes discovered in the AST and prints an OpenAPI 3.0 document to standard output. The title defaults to your module name and the version to 1.0.0:
$ go-boost openapi --title="Store API" --version="2.1.0" > openapi.json
The generated document describes paths, methods, and path parameters. Request and response schemas are not inferred from handler bodies.
go-boost migrate [name]
Compares the live database schema against your Go struct tags and writes timestamped up and down migrations for the columns that are missing. The name is optional and is used in the file names:
$ go-boost migrate add_users_table
🔄 Comparing database schema with Go struct models...
✨ Successfully generated migration files:
Up : migrations/20260916103000_add_users_table.up.sql
Down: migrations/20260916103000_add_users_table.down.sql
This requires a reachable database. It reports that the schema is already in sync when there is nothing to generate.
go-boost deadcode [path] [--format=text|json]
Scans the AST for unreferenced functions, structs, and interfaces, matching symbols per package so that same-named types in different packages are not confused. Returns exit code 2 when it finds something:
$ go-boost deadcode
🔍 Scanning AST for unreferenced/dead declarations...
⚠️ Found 2 unreferenced declaration(s):
KIND NAME LOCATION
--------------------------------------------------------------------------------
func legacyHelper internal/util/old.go:14
struct UnusedConfig internal/config/draft.go:7
go-boost update
An alias for init. Re-scans dependencies and layout, then refreshes the generated guideline block and installed skills.
Exit Codes
The analysis commands are usable as CI gates:
security, check, and deadcode return 2 when they find something, so a pipeline step fails without needing to parse output:
- name: Security audit
run: go-boost security --format sarif > results.sarif
go-boost run propagates the supervised process's own exit code.
Context Architecture: Guidelines and Skills
Context is split into two tiers to optimize LLM token usage:
1. Guidelines (Loaded Upfront)
Stored in AGENTS.md, CLAUDE.md, and .cursorrules. Covers baseline rules:
- Propagating
ctx context.Contextthrough I/O calls and handlers. - Wrapping errors with
fmt.Errorf("...: %w", err)and inspecting viaerrors.Isanderrors.As. - Idiomatic Go naming conventions.
- Calling
app_infoandast_inspectat the start of tasks.
2. Skills (Loaded On Demand)
Official Go Boost Pro Agent Skills (SKILL.md 21 tool orchestration + Concurrency, Database Migration, and Hexagonal Architecture reference playbooks) for Claude Code, Cursor, Copilot, Antigravity, and 20+ coding agents are available exclusively on Agensi.io (Go Boost).
After purchasing from Agensi.io, place the skill folder inside .claude/skills/ (or .ai/skills/ and run go-boost init / go-boost update).
License
The go-boost CLI and MCP server binary in this repository are licensed under the MIT License. The Go Boost Pro Agent Skill Suite (SKILL.md orchestration protocol and architecture playbooks) is licensed separately as a commercial product on Agensi.io.