Skip to main content
This guide shows how to connect Goose to the TrueFoundry AI Gateway. You add the gateway as a custom provider, either in Goose Desktop or with a JSON file that both Desktop and the CLI read, and then select a gateway model.

Quick setup

With Goose installed, install the setup tool, then run:
Select Goose and any other agents you want to configure. To set up only Goose, run:
Sign in to your organization, choose models and any MCP servers or Skills you need, then review and approve the changes. Follow the completion summary for any remaining steps. See Set Up Your IDEs for the full walkthrough. For manual configuration, follow the instructions below.

Prerequisites

  1. A TrueFoundry account with at least one model provider configured. See the Gateway quick start.
  2. A TrueFoundry API key. See Authentication.
  3. Goose Desktop or the Goose CLI. See the Goose installation guide.
Get your gateway base URL and model IDs from the unified code snippet in the AI Gateway playground. Model IDs use the provider-account/model format, for example openai-main/gpt-4o. See how to find the gateway base URL.
TrueFoundry playground showing the unified code snippet with base URL and model name

Add TrueFoundry as a provider

1

Open provider settings

Open Goose Desktop, click Settings in the left sidebar, and click Add Custom Provider.
Goose settings page displaying LLM provider options including OpenAI, Anthropic, Groq, and custom provider configuration

Goose provider settings

2

Configure the provider

Fill in the dialog:
  • Provider Type: OpenAI Compatible
  • Display Name: TrueFoundry
  • API URL: {GATEWAY_BASE_URL}
  • API Key: your TrueFoundry API key. Goose stores it in your system keychain.
  • Available Models: comma-separated model IDs, for example openai-main/gpt-4o, anthropic-main/claude-sonnet-4-5
Click Create Provider.
Goose Add Provider dialog showing OpenAI Compatible configuration with TrueFoundry API URL and model settings

Add Provider dialog for TrueFoundry

3

Select a model

Open Chat, click the model selector at the bottom of the window, and choose a TrueFoundry model.
Goose chat window showing a conversation using a model routed through TrueFoundry AI Gateway

Goose chat using a TrueFoundry model

Provider file fields

Goose Desktop has no field for headers. To add them to a provider you created in Desktop, edit its JSON file in ~/.config/goose/custom_providers/ and restart Goose.

Use Claude models over the Messages API

The openai engine works for every gateway model, including Claude. To send Claude models over the Anthropic Messages API instead, add a second provider with the anthropic engine and the gateway base URL:
~/.config/goose/custom_providers/truefoundry_anthropic.json

Connect MCP Gateway servers

Goose adds remote MCP servers as extensions of type streamable_http. Point an extension at a server registered on the MCP Gateway and its tool calls get the gateway’s access control, guardrails, and audit logs. Copy the server URL from the How To Use tab on the server’s page in TrueFoundry. It has the form {GATEWAY_BASE_URL}/<tenant>/mcp/<server>/server. Add the extension to ~/.config/goose/config.yaml:
Leave out the headers. The first time Goose connects, it opens a browser window to sign in to TrueFoundry, then stores the token in its secrets.
~/.config/goose/config.yaml
Restart Goose. The server’s tools are available in the next session, and every call appears in the MCP Gateway logs.

Fleet-wide enforcement

Gateway config: per user. Goose takes the provider host and key from environment variables (GOOSE_PROVIDER, GOOSE_PROVIDER__HOST, OPENAI_HOST, and so on) or ~/.config/goose/config.yaml, with env vars winning; there is no managed or system-level config. Push the values through MDM and rely on network policy for enforcement. MCP servers: weakly enforceable. Remote servers are extensions of type: streamable_http in config.yaml with uri and headers (SSE is not supported); point uri at the MCP Gateway. The only admin control is GOOSE_ALLOWLIST, an environment variable pointing at a YAML list of permitted extensions; Goose refuses to install anything not on it, but a user can unset the variable, and there is no denylist. See Goose’s allowlist and config files docs.