Install
Generate your encryption key
Corsair encrypts every stored credential with a Key Encryption Key (KEK). Click Generate to create one, or run the command yourself:Migrate the database
Corsair needs five tables. Run this once, then you’re done.- SQLite
- PostgreSQL
Install the driver, then run the migration:
- SQLite
- PostgreSQL
View migration SQL
View migration SQL
migration.sql
Install GitHub plugin and create corsair.ts
src/server/corsair.ts:- SQLite
- PostgreSQL
src/server/corsair.ts
slack(), linear(), gmail() — same pattern, just append to the array.CORSAIR_KEK not loading?
CORSAIR_KEK not loading?
If
process.env.CORSAIR_KEK is undefined at runtime, your .env file isn’t being picked up. Install dotenv and add one line at the top of src/server/corsair.ts:src/server/corsair.ts
Add your GitHub token and run setup
Use Corsair with any integration. Here’s an example of how to get started with Github.- Go to GitHub → Settings → Developer settings → Personal access tokens (classic)
- Click Generate new token (classic)
- Select scopes:
repo,read:org,read:user - Copy the token — it starts with
ghp_
pnpm: command not found or setup fails?
pnpm: command not found or setup fails?
If Then re-run
pnpm corsair isn’t found, add this to your package.json so pnpm builds the native dependency correctly:package.json
pnpm install and retry the setup command.Interact with Corsair
There’s multiple ways to use Corsair. Here’s three easy ways:- MCP / Agent
- CLI
- Direct (Hardcode)
Let the agent discover and call endpoints on its own. You prompt in plain English — Corsair handles the rest.Install the MCP adapter alongside your preferred framework:
Your agent gets four tools automatically — regardless of which framework you use:
See MCP Adapters for Vercel AI SDK, Mastra, and more.
Anthropic SDK
Anthropic SDK
agent.ts
Claude Agent SDK
Claude Agent SDK
agent.ts
OpenAI Agents
OpenAI Agents
agent.ts
| Tool | What it does |
|---|---|
corsair_setup | Check auth and get credential instructions |
list_operations | Discover every available API endpoint |
get_schema | Inspect parameters for a specific endpoint |
run_script | Execute a JS snippet with corsair in scope |
What’s next
Set up Webhooks
Get ngrok running, register your endpoint, and react to GitHub stars and PR events in real time.
Vibe Code Your Dashboard
Scaffold a Next.js + tRPC + SQLite project and build a live GitHub dashboard — just copy the prompt.
Multi-Tenancy
Building a product? Flip one flag and every user gets their own data and credentials.
Workflows
Chain events across plugins — PR merged → Slack notification → Linear issue, all in TypeScript.