# Use BuildBase in v0

Connect BuildBase's MCP server to v0 with OAuth, so v0 can read and set up your BuildBase organization while it builds your app.

This page is part of **BuildBase in your AI tools**: it connects v0 to BuildBase's own MCP server so that, while v0 builds your app, it can read and set up your BuildBase organization. v0 signs in as you and never sees your organization's secrets.

> **Note:**
  Want your own app to be agent-ready? See [Connect an agent to your
  app](/agents/connect-an-agent), in **Agent-ready apps**.

## What it is for

Connected to BuildBase, v0 can look things up and set your organization up while it writes the code:

- `get_env_template` gives the environment variables a Next.js app needs, with your organization's id filled in and every secret left for you.
- `search_docs` and `fetch_doc` read the BuildBase docs, so v0 uses the SDK the way it is documented.
- With your approval of the scope, it can create a feature flag or a form, or plan a blueprint for the organization the app needs.

v0's docs say a connection's tools serve v0 while it generates; the app it builds never calls them. The app itself uses @buildbase/sdk with its own keys, as the [v0 guides](/ai-builders/v0-import) set it up.

## What you need

- A v0 account. v0's docs name no plan for MCP connections.
- A BuildBase console account, and an organization whose **AI agents** setting is not **Off** ([choose what agents may do](/console/ai-agents#choose-what-agents-may-do)).

## Add the connection

1. In v0, open **MCP Connections** in your settings, or choose **+** > **MCPs** in the prompt form.
2. Add a custom server with the URL:

   ```text
   https://api.console.buildbase.app/mcp
   ```

3. Choose **OAuth** for authentication.

## Sign in

v0 opens BuildBase's sign-in page. Sign in with your console account and your usual second step, then approve v0 on the consent screen. It asks for `console:read` and `console:write` to start; an export or a delete asks again for just that scope ([what an agent asks for](/console/ai-agents#what-an-agent-asks-for-at-sign-in)).

## What you see when you connect

Once you have signed in, BuildBase shows the consent screen in your browser. It names the tool, lists the scopes it asks for and the server the access is for, and changes nothing until you choose **Allow access**. Here it is for a tool that registered itself:

![BuildBase's consent screen for a tool that registered itself, here Example Agent: a warning that the app gave itself its name and nobody has checked it, what it may do as you, console:read and offline_access, the access to use at https://api.console.buildbase.app/mcp, and Allow access and Deny ringed](/images/console/ai-agents/hosted-consent.webp)

## Use it

Ask, for example:

- "Build a Next.js dashboard with BuildBase sign-in. Get the environment variables for my Acme organization from BuildBase."
- "Check the BuildBase docs for how to show the current plan, and add it to the settings page."
- "Create a BuildBase feature flag `new-onboarding`, off, and wire the onboarding page to it."

## What differs in v0

- **Permission mode.** v0 has **Ask**, **Auto** and **Full**. Keep **Ask** for BuildBase, so v0 checks with you before each tool call, and approve changes one by one.
- **Approvals of a change.** When BuildBase needs your approval for a change, the agent states it and confirms it with a one-time code unless v0 can ask you itself ([what stays with you](/console/ai-agents#what-stays-with-you)). Read it before you let v0 continue.
- **Secrets stay out of the chat.** BuildBase never hands v0 a secret. Paste your sign-in client's secret into v0's environment variables yourself, never into the prompt.

## If something goes wrong

| What you see                                    | Why                                                                     | What to do                                                          |
| ----------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------- |
| v0 acts as an API key, not as you               | The connection uses **Bearer Token**                                    | Edit it to use **OAuth** and sign in                                |
| v0 says the organization does not let agents in | Its **AI agents** setting is **Off**, or your agent is blocked          | An owner or admin changes it under **Security**, **AI agents**      |
| Every change is refused                         | The organization is **Read only**, or you did not grant `console:write` | An owner or admin sets **Read and change**; approve `console:write` |
| The generated app has no BuildBase values       | The tools serve v0 only, never the app                                  | Put the values from `get_env_template` in the app's environment     |

To disconnect, remove the connection in v0 and [disconnect the agent](/console/ai-agents#disconnect-an-agent) in BuildBase.

## Related

- [BuildBase in your AI tools](/console/ai-agents): the server, its tools, and what stays with you.
- [Use BuildBase in Lovable](/console/ai-agents/lovable) and [Use BuildBase in Bolt](/console/ai-agents/bolt).
- [Add BuildBase to v0's instructions](/ai-builders/v0-import) and [add paid plans to a v0 app](/ai-builders/v0-paid-plans): the paste-prompt guides.
- v0's own guide: [MCP](https://v0.app/docs/MCP).

## Frequently asked questions

### Can the app v0 generates call BuildBase's MCP tools?

No. v0's docs say a connection's tools serve v0 while it generates, and the app it builds cannot call them. Your app talks to BuildBase through the SDK with its own keys.

### Which permission mode should I use?

Ask, so v0 checks with you before each tool call. v0 also offers Auto and Full; with either, keep the organization at Read only.

### Which authentication option do I pick?

OAuth. v0 then opens BuildBase's sign-in page and acts as you. A bearer token works too, with an organization API key, but then v0 acts as that key, not as you.
