docs/en/documentation/getting-started/local_quickstart_go.md
This guide assumes you have already done the following:
psql client.{{< regionInclude "quickstart/shared/cloud_setup.md" "cloud_setup" >}}
{{< regionInclude "quickstart/shared/database_setup.md" "database_setup" >}}
{{< regionInclude "quickstart/shared/configure_toolbox.md" "configure_toolbox" >}}
In this section, we will write and run an agent that will load the Tools from MCP Toolbox.
Initialize a go module:
go mod init main
In a new terminal, install the Go SDK Module:
{{< notice warning >}}
Breaking Change Notice: As of version 0.6.0, this SDK has transitioned to a multi-module structure.
For new versions (v0.6.0+): You must import specific modules (e.g., go get github.com/googleapis/mcp-toolbox-sdk-go/core).
For older versions (v0.5.1 and below): The SDK remains a single-module library (go get github.com/googleapis/mcp-toolbox-sdk-go).
Please update your imports and go.mod accordingly when upgrading.
{{< /notice >}}
{{< tabpane persist=header >}} {{< tab header="LangChain Go" lang="bash" >}} go get github.com/googleapis/mcp-toolbox-sdk-go/core {{< /tab >}}
{{< tab header="Genkit Go" lang="bash" >}} go get github.com/googleapis/mcp-toolbox-sdk-go/core go get github.com/googleapis/mcp-toolbox-sdk-go/tbgenkit {{< /tab >}}
{{< tab header="Go GenAI" lang="bash" >}} go get github.com/googleapis/mcp-toolbox-sdk-go/core {{< /tab >}}
{{< tab header="OpenAI Go" lang="bash" >}} go get github.com/googleapis/mcp-toolbox-sdk-go/core {{< /tab >}}
{{< tab header="ADK Go" lang="bash" >}} go get github.com/googleapis/mcp-toolbox-sdk-go/core go get github.com/googleapis/mcp-toolbox-sdk-go/tbadk {{< /tab >}} {{< /tabpane >}}
Create a new file named hotelagent.go and copy the following code to create
an agent:
{{< tabpane persist=header >}} {{< tab header="LangChain Go" lang="go" >}}
{{< include "quickstart/go/langchain/quickstart.go" >}}
{{< /tab >}}
{{< tab header="Genkit Go" lang="go" >}}
{{< include "quickstart/go/genkit/quickstart.go" >}}
{{< /tab >}}
{{< tab header="Go GenAI" lang="go" >}}
{{< include "quickstart/go/genAI/quickstart.go" >}}
{{< /tab >}}
{{< tab header="OpenAI Go" lang="go" >}}
{{< include "quickstart/go/openAI/quickstart.go" >}}
{{< /tab >}}
{{< tab header="ADK Go" lang="go" >}}
{{< include "quickstart/go/adkgo/quickstart.go" >}}
{{< /tab >}} {{< /tabpane >}}
Ensure all dependencies are installed:
go mod tidy
Run your agent, and observe the results:
go run hotelagent.go
{{< notice info >}} For more information, visit the Go SDK repo. {{</ notice >}}