This guide provides instructions for setting up your development environment to
contribute to the mcp-toolbox-sdk-go repository, which is a multi-module workspace.
Before you begin, ensure you have the following installed:
- Go (v1.24.4 or higher)
This repository contains multiple Go modules:
core: The core SDK.tbadk: ADK Go integration.tbgenkit: Genkit Go integration.
We use a go.work file to manage local development across these modules.
-
Clone the repository:
git clone https://github.com/googleapis/mcp-toolbox-sdk-go.git cd mcp-toolbox-sdk-go -
Initialize Workspace (Optional but Recommended): Create a
go.workfile in the root to easily work with all modules simultaneously.go work init ./core ./tbadk ./tbgenkit
Note:
go.workis git-ignored to prevent conflicts between developers. -
Install Dependencies: Navigate to each module and install dependencies if needed:
cd core && go mod tidy cd ../tbadk && go mod tidy cd ../tbgenkit && go mod tidy
Tests are separated into Unit Tests and End-to-End (E2E) Tests.
Unit tests are fast and do not require external dependencies.
- Run all unit tests:
Note: If using
go test -tags=unit ./core/... ./tbadk/... ./tbgenkit/...go.work, this runs tests for all modules.
E2E tests require a running Toolbox server and specific environment variables. They are guarded by the e2e build tag.
- Run E2E tests:
go test -tags=e2e -p 1 ./core/... ./tbadk/... ./tbgenkit/...
This project uses golangci-lint.
- Run Linter:
You generally need to run this within each module directory:
cd core && golangci-lint run cd ../tbadk && golangci-lint run cd ../tbgenkit && golangci-lint run
- Conventional Commits: Please follow Conventional Commits.
- Prefix keys:
core:,tbadk:,tbgenkit:,chore:,docs:. - Example:
feat(core): add new transport protocol
- Prefix keys:
- Pre-submit checks: Ensure all tests (unit) pass before sending a PR.
Releases are managed by Release Please.
- Each module (
core,tbadk,tbgenkit) is released independently. - Tags will be in the format
module/vX.Y.Z(e.g.,core/v0.6.0).
- If you encounter issues, please open an issue.