Skip to main content
The quickest path to a working integration is Hub. It hosts the OAuth connect, approval, and webhook surfaces, so there are no connect pages, callback routes, or per-environment redirect URIs to build. Credentials are still encrypted and stored in your own database — Hub stores none.
Want to host those surfaces yourself instead? Every step below is the same; swap the hub block for manual. See Manual or Hub.
1

Install

@corsair-dev/github is one plugin. Every service is its own @corsair-dev/* package — find the one you need, and its exact install id, in the Plugins catalog.
2

Set your environment

Create a project in the Hub dashboard and copy the development API key and signing secret. Then generate a KEK — Corsair encrypts every stored credential with it:
.env
Keep your KEK safe. Lose it and you lose access to every stored credential. Treat it like a root password.
3

Create the database

Corsair stores data in four tables. SQLite is the fastest way to start:
migration.sql
Using Postgres, Drizzle, or Prisma instead? See Database for each option.
4

Configure Corsair

Wire your database, KEK, and Hub keys together in src/server/corsair.ts:
src/server/corsair.ts
Mount the handler once — it serves Hub delivery and the management API. In development, Hub auto-detects your localhost delivery URL:
app/api/corsair/[[...path]]/route.ts
Add more plugins later — slack(), linear(), gmail() — by appending to the array.
5

Connect and call

Mint a connect link and send the user to it. Hub hosts the connect page and delivers the result back to your app — no connect page or OAuth callback to build:
connect.ts
Once connected, call any endpoint. Responses are also cached in your database for instant reads:
usage.ts
Want an agent to call endpoints on its own? See MCP Adapters.

What’s next

Use with AI

Give an agent the four Corsair tools and let it discover and call any endpoint.

Hub overview

How the relay works, and why Hub stores none of your credentials.

Environments

Development vs production keys — switch to production when you deploy.

Multi-Tenancy

Building a product? Flip one flag and every user gets their own data and credentials.

Database options

Postgres, Drizzle, Prisma, and the four tables Corsair uses.

Provisioning

Seed credentials and provision tenants from the corsair CLI or setupCorsair.