Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@corsair-dev/cli",
"version": "0.1.20",
"description": "",
"description": "Command-line tool for Corsair, the open-source integration layer. Scaffold a project, add integrations, and run your app.",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down Expand Up @@ -47,9 +47,21 @@
"tsx": "^4.20.6",
"typescript": "^5.3.3"
},
"keywords": [],
"author": "",
"keywords": [
"corsair",
"cli",
"integrations",
"oauth",
"scaffold"
],
"author": "Corsair (https://corsair.dev)",
"license": "Apache-2.0",
"homepage": "https://corsair.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/corsairdev/corsair.git",
"directory": "packages/cli"
},
"packageManager": "pnpm@10.20.0",
"files": [
"dist"
Expand Down
23 changes: 20 additions & 3 deletions packages/corsair/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "corsair",
"version": "0.1.125",
"description": "",
"description": "Open-source integration layer for AI agents and apps. Managed OAuth, webhooks, and one API for 200+ integrations, with credentials that stay in your own database.",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down Expand Up @@ -129,9 +129,26 @@
"tsx": "^4.20.6",
"typescript": "^5.3.3"
},
"keywords": [],
"author": "",
"keywords": [
"integrations",
"oauth",
"api",
"connectors",
"ai-agents",
"mcp",
"webhooks",
"multi-tenant",
"self-hosted",
"corsair"
],
"author": "Corsair (https://corsair.dev)",
"license": "Apache-2.0",
"homepage": "https://corsair.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/corsairdev/corsair.git",
"directory": "packages/corsair"
},
"packageManager": "pnpm@10.20.0",
"files": [
"dist",
Expand Down
85 changes: 85 additions & 0 deletions packages/mcp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# @corsair-dev/mcp

MCP server and framework adapters for [Corsair](https://corsair.dev), the open-source integration layer for AI agents. Give any agent framework 200+ integrations as tools with a single adapter call.

[![npm](https://img.shields.io/npm/v/@corsair-dev/mcp)](https://www.npmjs.com/package/@corsair-dev/mcp)
[![license](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/corsairdev/corsair/blob/main/LICENSE)
[![Discord](https://img.shields.io/badge/Discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/uNgCP3mSzU)

Corsair handles the parts of an integration you would rather not maintain: OAuth, token refresh, webhook verification, and rate limits. Credentials stay encrypted in your own database. This package puts all of that behind the tool interface your agent framework already speaks.

## Install

```bash
npm install @corsair-dev/mcp
```

Install the framework you use alongside it, for example `npm install @mastra/core`. Each adapter treats its framework as an optional peer dependency.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

## Quickstart

Build tools from a configured `corsair` instance and hand them to a Mastra agent:

```ts
import { Agent } from '@mastra/core/agent';
import { anthropic } from '@ai-sdk/anthropic';
import { MastraProvider } from '@corsair-dev/mcp';
import { corsair } from './corsair';

const provider = new MastraProvider();
const tools = await provider.build({ corsair });

const agent = new Agent({
name: 'corsair-agent',
model: anthropic('claude-sonnet-4-6'),
instructions:
'You have Corsair tools. Use list_operations to discover APIs, get_schema to read arguments, and run_script to execute.',
tools: Object.fromEntries(tools.map((t) => [t.id, t])),
});

const response = await agent.generate('List all Slack channels.');
console.log(response.text);
```

Setting up the `corsair` instance is covered in the [setup guide](https://docs.corsair.dev/hub/setup).

## Adapters

Each adapter exposes Corsair's tools in the shape its framework expects, so there is no manual schema wiring. More frameworks are on the way.

| Adapter | Use case |
|---|---|
| [Anthropic SDK](https://docs.corsair.dev/mcp-adapters/anthropic-sdk) | Native tool use with Claude models |
| [Claude Agent SDK](https://docs.corsair.dev/mcp-adapters/claude-sdk) | In-process MCP with the Claude Agent SDK |
| [OpenAI Agents](https://docs.corsair.dev/mcp-adapters/openai) | OpenAI Agents SDK tools |
| [OpenAI](https://docs.corsair.dev/mcp-adapters/openai) | OpenAI function calling |
| [Vercel AI SDK](https://docs.corsair.dev/mcp-adapters/vercel-ai) | Tools for `useChat` and `streamText` |
| [Mastra](https://docs.corsair.dev/mcp-adapters/mastra) | Mastra agent tools |

Full list and options: [docs.corsair.dev/mcp-adapters](https://docs.corsair.dev/mcp-adapters/mcp-adapters).

## How it works

Every adapter exposes the same three tools, so the agent works the same way across 200+ integrations instead of reading a flat list of every endpoint:

| Tool | What it does |
|---|---|
| `list_operations` | Discover the available API endpoints |
| `get_schema` | Inspect the parameters for one endpoint |
| `run_script` | Execute a call with `corsair` in scope |
Comment thread
coderabbitai[bot] marked this conversation as resolved.

The agent calls `list_operations` to find what it can do, `get_schema` to learn the arguments, then `run_script` to run it. Add a plugin and its endpoints show up with no code change.

For coding agents over stdio (Claude Code, Cursor, Codex), see [Coding agents](https://docs.corsair.dev/mcp-adapters/claude-code).

## Links

- Docs: https://docs.corsair.dev
- Adapters: https://docs.corsair.dev/mcp-adapters/mcp-adapters
- Repository: https://github.com/corsairdev/corsair
- Discord: https://discord.gg/uNgCP3mSzU
- X: https://x.com/corsairdotdev

## License

Apache-2.0. See [LICENSE](https://github.com/corsairdev/corsair/blob/main/LICENSE).
22 changes: 21 additions & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
{
"name": "@corsair-dev/mcp",
"version": "0.1.26",
"description": "MCP server and SDK adapters for Corsair — list operations, inspect schemas, run API calls",
"description": "MCP server and framework adapters for Corsair. Expose 200+ integrations to any agent framework (Mastra, OpenAI, Vercel AI, Claude) as tools.",
"keywords": [
"mcp",
"model-context-protocol",
"ai-agents",
"tools",
"tool-calling",
"mastra",
"openai",
"vercel-ai",
"integrations",
"corsair"
],
"author": "Corsair (https://corsair.dev)",
"license": "Apache-2.0",
"homepage": "https://corsair.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/corsairdev/corsair.git",
"directory": "packages/mcp"
},
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
8 changes: 8 additions & 0 deletions packages/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"name": "@corsair-dev/studio",
"version": "0.1.6",
"description": "Local dashboard for inspecting and configuring your Corsair instance",
"author": "Corsair (https://corsair.dev)",
"license": "Apache-2.0",
"homepage": "https://corsair.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/corsairdev/corsair.git",
"directory": "packages/studio"
},
"type": "module",
"exports": {
"./server": {
Expand Down
8 changes: 8 additions & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"name": "@corsair-dev/ui",
"version": "0.1.4",
"description": "Plain-HTML UI helpers for Corsair permissions and related flows",
"author": "Corsair (https://corsair.dev)",
"license": "Apache-2.0",
"homepage": "https://corsair.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/corsairdev/corsair.git",
"directory": "packages/ui"
},
"type": "module",
"main": "./src/index.ts",
"module": "./src/index.ts",
Expand Down
Loading