make build- Build the binarymake test- Run all tests with coveragego test ./pkg/buildkite/...- Run tests for specific packagego test -run TestName- Run single test by namemake lint- Run golangci-lintmake lint-fix- Run golangci-lint with auto-fixmake check- Run linting and testsmake all- Full build pipeline
- Main binary:
cmd/buildkite-mcp-server/main.go- MCP server for Buildkite API access - Core packages:
pkg/buildkite/- API wrappers and tool handlers,internal/commands/- CLI commands,pkg/toolsets/- tool registry,pkg/server/- MCP server setup - Key dependencies:
github.com/modelcontextprotocol/go-sdk(MCP protocol),github.com/buildkite/go-buildkite/v5(API client) - Configuration: Environment variables (BUILDKITE_API_TOKEN, OTEL tracing)
- CI/CD:
buildkiteorganization,buildkite-mcp-serverpipeline slug for build and test (.buildkite/pipeline.yml),buildkite-mcp-server-releasepipeline slug for releases (.buildkite/pipeline.release.yml)
- Use
zerologfor logging,testify/requirefor tests - Mock interfaces for testing (see
MockPipelinesClientpattern) - Import groups: stdlib, external, internal (
github.com/buildkite/buildkite-mcp-server/internal/...) - Error handling: return errors up the stack, log at top level
- Package names: lowercase, descriptive (buildkite, commands, trace, tokens)
- Use contexts for cancellation and tracing throughout
- Use
utils.NewToolResultErrororutils.NewToolResultErrorFromErrto handle errors in tools. - Tool handlers use typed pattern:
func(ctx, *mcp.CallToolRequest, Args) (*mcp.CallToolResult, any, error) - Dependencies injected via context middleware, accessed with
DepsFromContext(ctx)