MCP Gateway · OpenCode
Connect dbt Cloud to OpenCode
From an OpenCode session, an analytics engineer can browse a dbt Cloud project, inspect semantic models and test SQL against the warehouse. Each dbt Cloud call passes through the Speakeasy MCP Gateway, which OpenCode reaches as a remote server from its config, and agents never hold a dbt Cloud credential. Speakeasy's OpenCode plugin reports token and cost totals per turn.
- Category
- Data & analytics
- Tools
- 24
- Authentication
- API key
- OpenCode
- Terminal
Behind the MCP Gateway
Run dbt Cloud MCP behind the MCP Gateway
One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every dbt Cloud call inspected and logged.
Set up
Add dbt Cloud to OpenCode in 4 steps
- 01
Add dbt Cloud from the catalog
An admin finds dbt Cloud in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.
dbt Cloud authenticates with an API key. Enter it under Upstream headers in the install dialog, or later on the server's Settings tab. The key is stored on the server, sent with every upstream request, and never reaches anyone's client configuration.
Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.
- 02
Choose who can use dbt Cloud
Give teams the
mcp:connectscope on the dbt Cloud server through team access or a role. OpenCode connects to the dbt Cloud server's own URL, and the server's authorization decides who can connect and which tools they can call. - 03
Connect OpenCode
Add the server to OpenCode's own mcp config block as a remote server.
Copy the server's URL from its hosted install page in Speakeasy.
Add it to the
mcpblock of your OpenCode config withtypeset toremote.Restart OpenCode and sign in when prompted.
{ "mcp": { "<server slug>": { "type": "remote", "url": "<URL from the hosted install page>" } } } - 04
Sign in and use dbt Cloud from OpenCode
The first time OpenCode connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.
From then on, dbt Cloud's tools appear in OpenCode, limited to what the person's access allows, and every call lands in the gateway's tool logs.
OpenCode doesn't receive MCP servers from plugins. The observability package is installed separately, from a ZIP or with speakeasy-hooks install --provider=opencode, and the device agent can maintain it.
Use cases
What OpenCode users do with dbt Cloud
Generate and test a query
Describe the data you want, have OpenCode generate the SQL, and run it against the warehouse to check the result before it goes into a model.
Learn an unfamiliar project's marts
OpenCode lists the mart models in the environment with their descriptions, a quick way to learn the presentation layer of a project you just joined.
Inspect a semantic model
Before changing a MetricFlow semantic model, OpenCode fetches its metadata and the entities its metrics rely on, so the edit doesn't break a join.
Tools
24 tools
Each dbt Cloud tool can be allowed or denied per team and role at the MCP Gateway before OpenCode sees it.
get_mart_models
Get the name and description of all mart models in the environment. A mart model is part of the presentation layer of the dbt project. It's where cleaned, transformed data is organized for consumption by end-users, like analysts, dashboards, or business tools.
get_all_models
Get the name and description of all dbt models in the environment.
get_model_details
Retrieves information about a specific dbt model, including compiled SQL, description, database, schema, alias, and column details.
get_model_parents
Retrieves the parent models of a specific dbt model. These are the models that the specified model depends on.
get_model_children
Retrieves the child models (downstream dependencies) of a specific dbt model. These are the models that depend on the specified model.
get_model_health
Retrieves information about the health of a dbt model, including the last time it ran, the last test execution status, and whether the upstream data for the model is fresh.
Control
What Speakeasy can see and stop in OpenCode
The gateway covers every client the same way. The rest depends on what OpenCode exposes to Speakeasy.
Tool logs
Gateway
Every dbt Cloud call is logged with the person and the client that made it.
Access by role
Gateway
People reach only the dbt Cloud tools their team or role allows.
Request and response blocking
Gateway
A risk policy scoped to dbt Cloud can reject a tool request before it reaches the server, or withhold a result from OpenCode. MCP-scoped policies are enabled per organization.
Prompt and tool-call blocking
OpenCode
The OpenCode plugin sends each prompt and tool call to Speakeasy, which allows or denies it before it runs.
Usage telemetry
OpenCode
Token and cost totals flow through the plugin, reported per turn.
Device agent
OpenCode
The device agent installs and maintains the observability package.
- OpenCode has no OpenTelemetry exporter, so session data comes through the plugin.
- Tool output is blocked at the gateway rather than in OpenCode's hooks.
Questions
Frequently asked questions
Can query results from dbt Cloud be blocked in OpenCode?
Can OpenCode users be limited to dbt Cloud metadata?
How do OpenCode users get dbt Cloud?
Are dbt Cloud calls from OpenCode logged?
Connect more