The three tools
Every MCP adapter exposes the same three tools, regardless of how many plugins you’ve installed:
The model calls them in that order: discover, inspect, execute. This is why you don’t register a tool per endpoint. Adding
slack() to your plugin list makes every Slack operation reachable with no code change and no redeploy of tool definitions.
Pick your surface
Two different things get called “an agent”. They share the tool layer but the wiring differs.- Chatbot in your app
- Coding agent harness
A chat box inside your product, hitting your own model calls. Expose Corsair as an MCP endpoint, then connect to it from the AI framework you already use:Adapters for Vercel AI, Anthropic, OpenAI Agents, and Mastra all take the same tools.
server.ts
agent.ts
Guardrails
An agent picks its own operations, so the permission layer is the real control surface, not your prompt. Set a mode per plugin:corsair.ts
cautious is the right default for agent workloads. Reads and writes flow, destructive calls block on a human. A require_approval call writes a pending row and waits, so you can approve from your own UI. Details in Permissions.
Sharing state with the rest of your app
Use the samecorsair instance you built for the dashboard. Because run_script executes against it, every action the agent takes upserts into the same corsair_entities rows your pages read, so a chat command is reflected on the dashboard on the next read, with no extra syncing.
Scope the instance per tenant so a user’s agent can only reach that user’s connections:
Checklist
- The MCP server wraps your existing
corsairinstance, not a new one. - Permissions are set per plugin, with destructive endpoints denied or gated.
- Tool calls are tenant-scoped.
- The step cap is set (
stopWhen), or tool-calling loops may never terminate.
What’s next
MCP adapters
Every framework adapter and the tools they expose.
Permissions
Modes, overrides, and the approval flow.
Pair it with a dashboard
Chat for the long tail, UI for the common actions.
Knowledge base
Give the agent synced data to search before it acts.