Skip to content
Agent-ready apps

Let AI agents use your app, as your users.

Agent-ready apps: make the app you build with the SDK ready for your users' AI agents. Your users connect Claude, ChatGPT, Cursor or another AI app to your product over MCP, the standard these apps use to work inside other software. You add one config. BuildBase handles sign-in, the approval screen and disconnecting, and the agent can only do what that user is allowed to do.

How an agent gets in

Agents sign in with OAuth, the same kind of approval people give when they use Sign in with Google. BuildBase runs it for you, and your app keeps the key that signs every token.

  1. The agent finds your server

    Your app publishes the small files an agent reads first, which tell it where to sign in and what your server offers. One config writes all of them.

  2. Your user approves it

    BuildBase runs the sign-in agents expect, so you build none of it. The agent registers itself, your user signs in on your hosted page, and they click Allow on the consent screen.

  3. Your app signs the pass

    Each time a user approves an agent, BuildBase asks your app for the agent's access token, and your app signs it with its own secret. The user's session rides inside it, encrypted. Your server has nothing to store.

  4. Tools run as that user

    Whenever the agent uses one of your tools, it acts as that user, with that user's permissions. It can never do more than they could do themselves.

One config, two route files

createAgentStack() builds the MCP server from one config. It checks every agent's token, lets browser-based clients reach it and publishes the files agents look for first. Your own tools sit beside the built-in ones.

lib/agent.tsTSX
import { createAgentStack, defineMcpTool } from '@buildbase/sdk/mcp';
import { z } from 'zod';

export const agent = createAgentStack({
  serverUrl: process.env.NEXT_PUBLIC_BUILDBASE_SERVER_URL!,
  orgId: process.env.NEXT_PUBLIC_BUILDBASE_ORG_ID!,
  siteUrl: 'https://app.example.com',
  site: { name: 'Acme', description: 'Render images from templates.' },
  secret: process.env.SYSTEM_SECRET!,
  mcp: {
    path: '/mcp',
    builtinTools: 'readonly',
    tools: [
      defineMcpTool({
        name: 'render_image',
        description: 'Render an image from a template.',
        inputSchema: z.object({ templateId: z.string() }),
        execute: async (input, ctx) => render(input.templateId, ctx.auth),
      }),
    ],
  },
});
app routesTSX
// app/mcp/[[...card]]/route.ts
import { agent } from '@/lib/agent';
export const { GET, POST, DELETE, OPTIONS } = agent.routes;

// app/.well-known/[...path]/route.ts
export const GET = agent.serveAgentPath;

What your MCP server gets

Ready-made tools, permission checks and a screen for users to manage their agents. From SDK 1.0.0, finer control per connection and clearer errors too.

Built-in tools, read-only to start

Agents can look up workspaces, users, subscriptions, plans, quotas, credits, feature flags and permissions from day one. Out of the box they can only read. You decide when to allow changes, for every tool or only the ones you name.

Users see and remove agents

A ready-made screen, <ConnectedAgents />, shows your users every agent they approved, with a Disconnect button. Give it your MCP address and it also shows how to connect ChatGPT, Claude, Cursor, VS Code and more.

Extra permission for your own tools

Mark a tool with the scopes it needs: permissions you name yourself, such as one to render images. An agent without them never sees the tool and cannot call it. Declare a scope once and it shows on the consent screen.

A different view per connection

With SDK 1.0.0: add a setting to the end of your MCP address to make a connection read-only, or limit it to some tools or one workspace. Ready-made sets for Claude and ChatGPT leave out tools that delete things or move money.

Errors an agent can act on

With SDK 1.0.0: when a tool fails, the agent is told why, and whether and when to try again. So it signs in again, waits or fixes its request by itself, instead of guessing from an error message. You can also log every tool call for your audit trail, without the values passed in.

Deep research, and links opened safely

With SDK 1.0.0: one helper gives ChatGPT's deep research the search and fetch tools it looks for. Another opens a web address an agent hands you, without letting it reach your private network.

Beyond one person approving one agent

For companies that approve agents for all their people, devices with no browser, and agents that work on their own.

Company IT approves agents for everyone

Some companies sign in to your app with enterprise SSO, one work login for all their people, through your own WorkOS account. Their IT team can then approve an agent once, in their identity provider, and nobody sees a consent screen. It is built for Okta, which calls this Cross App Access. The company's own list of allowed apps decides which agents may connect.

Command-line tools and TVs

Device code sign-in, for things with no browser: the device shows a short code, the person approves it on their phone or laptop, and the device is signed in.

Agents with accounts of their own

An agent that works on its own, with no person behind it, can get an account from one call on your server. Switch agent self-signup on first. It counts as a user, and it cannot open the console.

Agents that introduce themselves

An agent such as Claude can skip registering and point to a public file on its own website instead (a Client ID Metadata Document). Your consent screen names that website, and marks it unverified until your team has checked it.

With SDK 1.0.0

Checked before a client sees it

Test your server the way Claude and ChatGPT will, then hand your users an install link for their client.

A checkup: agent doctor

buildbase agent doctor connects the way a new client would. It checks that sign-in is asked for, the setup files are there, answers come back quickly and the tool list stays the same. Then it checks every tool against the rules for Claude and ChatGPT listings.

Install links for every client

buildbase agent install prints one-click install links and setup snippets for Cursor, VS Code, Claude Code, Claude, ChatGPT, Gemini CLI and Goose. agent listing writes the file the public MCP Registry asks for, with a checklist for each directory.

Ready for the newest MCP clients

Your server speaks MCP version 2026-07-28 as well as 2025-11-25, so newer and older clients both connect. It can answer each request on its own, with no session kept, and tells clients how long to reuse its tool list. It also publishes a server card and an AI Catalog, short public descriptions that registries and scanners read.

Coding agents build with it too

Have Claude wire the SDK into your app, or start from a Next.js app whose MCP server and agent sign-in already work.

Integrate the SDK with Claude

buildbase@buildbase-skills

Takes a Next.js app from npm install to a working sign-in, then covers workspaces, billing, feature flags, quotas, credits, notifications, webhooks and calling BuildBase from a non-Node backend.

In Claude Code:

Any agent (Cursor, Codex, Copilot and others), from a shell:

Then ask Claude: “Add BuildBase auth to my Next.js app.”

Other ways to install, including claude.ai

How your users connect each AI tool

Where the setting lives in each tool, what it needs from your server, and what to check when it does not connect.

Frequently Asked Questions

Does BuildBase hold the agent tokens for my app?

No. BuildBase runs the sign-in itself: registering the agent, signing the user in, the consent screen and renewing access. But your app signs every access token with its own secret. The user's BuildBase session rides inside the token, encrypted, so your MCP server can act as that user without storing anything.

Can an agent do more than the user who connected it?

No. Every tool call runs as the user who connected the agent, with that user's permissions. A tool that needs extra permissions is refused unless the user granted them. And the user can disconnect the agent from the Connected agents screen at any time.

Which agent clients can connect?

Any AI app that connects over MCP and signs in with OAuth: Claude, Claude Code, ChatGPT, Cursor, VS Code, Gemini CLI, Goose and others. Claude and ChatGPT connect from their own servers, so your MCP address has to be public and on https.

Is this the same as the OAuth 2.0 authorization server?

Yes. The OAuth 2.0 authorization server is how agents and other apps get access to your app. It is not one of the sign-in methods your users pick from. Turn it on in the console under Authentication, then Agent readiness.

Put your app where the agents are

Add createAgentStack() to your app, turn on agent readiness in the console, and connect Claude Code to it.

Free plan7-day free trial on paid plansNo credit card required