Skip to main content
vendo init turns your app into an MCP server. Your own agent connects to it — from this codebase or from your backend — and acts as the user who is signed in, under the same guard, approvals and audit trail as the rest of your product. Claude, ChatGPT and Cursor connect to the same door.
1

Run init

Answer the first question with From outside agents over MCP, then give init the origin your dev server prints. With a Vendo Cloud key — yours, or the one init’s browser login mints in a click — there is nothing else to decide: dev runs on this machine, and your deployment uses the Cloud broker automatically.Init writes the door — mcp: true — into lib/vendo.ts, adds the discovery route beside your wire route, and fills .vendo/ with your tool catalog, policy and brand.
2

Wire your agent

vendo.agentTools opens the door for one conversation. Pass the incoming request and the agent acts as whoever is signed in; pass one of your own user ids and it acts as them headlessly, from a cron or a queue worker. vendo.tokenFor takes the same two arguments, for a client you would rather hold yourself.
app/api/agent/route.ts
An empty results is how the loop knows the model is done. Ship door.embeds to the page and render each one:
app/chat.tsx
Nothing to wrap: the embed finds the wire at /api/vendo and rides your host session cookie.
3

Approvals

Ask your agent to write something — pay someone, cancel something — and the call parks: a tool nobody has graded needs a person, so the guard asks. The approval card is one of the embeds, so it renders in your chat. Approve it there, ask again, and the call runs.Grade the catalog with vendo sync --ai and the asking stops for everything but the destructive tools.

When you deploy

Two variables on your platform, and the same code:
VENDO_BASE_URL is the public https origin your app answers on — every discovery URL derives from it. VENDO_API_KEY is the key init already put in .env.local.

Claude, ChatGPT and Cursor

Your users’ setup page ships with the door. Open it in a browser:
It carries the copy-paste config for each client, and they sign in with your app’s own login. For Claude Code, the plugin is two lines:

Where to go next

How the door works

Who is calling, how a call reaches your host tools, and what comes back.mcp + oauth + actAs

Your own agent

The whole loop: one door per conversation, approvals, long calls.agentTools

Service keys & broker

Where the key lives, the audit’s svc: attribution, and rotation.svc:<hash8>