@corsair-dev/mcp 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +87 -0
  2. package/package.json +23 -3
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # @corsair-dev/mcp
2
+
3
+ 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.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@corsair-dev/mcp)](https://www.npmjs.com/package/@corsair-dev/mcp)
6
+ [![license](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/corsairdev/corsair/blob/main/LICENSE)
7
+ [![Discord](https://img.shields.io/badge/Discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/uNgCP3mSzU)
8
+
9
+ 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.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @corsair-dev/mcp
15
+ ```
16
+
17
+ Install the framework you use alongside it. The Mastra quickstart below needs `npm install @mastra/core @ai-sdk/anthropic`. Each adapter treats its framework as an optional peer dependency.
18
+
19
+ ## Quickstart
20
+
21
+ Build tools from a configured `corsair` instance and hand them to a Mastra agent:
22
+
23
+ ```ts
24
+ import { Agent } from '@mastra/core/agent';
25
+ import { anthropic } from '@ai-sdk/anthropic';
26
+ import { MastraProvider } from '@corsair-dev/mcp';
27
+ import { corsair } from './corsair';
28
+
29
+ const provider = new MastraProvider();
30
+ const tools = await provider.build({ corsair });
31
+
32
+ const agent = new Agent({
33
+ name: 'corsair-agent',
34
+ model: anthropic('claude-sonnet-4-6'),
35
+ instructions:
36
+ 'You have Corsair tools. Use list_operations to discover APIs, get_schema to read arguments, and run_script to execute.',
37
+ tools: Object.fromEntries(tools.map((t) => [t.id, t])),
38
+ });
39
+
40
+ const response = await agent.generate('List all Slack channels.');
41
+ console.log(response.text);
42
+ ```
43
+
44
+ Setting up the `corsair` instance is covered in the [setup guide](https://docs.corsair.dev/hub/setup).
45
+
46
+ ## Adapters
47
+
48
+ 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.
49
+
50
+ | Adapter | Use case |
51
+ |---|---|
52
+ | [Anthropic SDK](https://docs.corsair.dev/mcp-adapters/anthropic-sdk) | Native tool use with Claude models |
53
+ | [Claude Agent SDK](https://docs.corsair.dev/mcp-adapters/claude-sdk) | In-process MCP with the Claude Agent SDK |
54
+ | [OpenAI Agents](https://docs.corsair.dev/mcp-adapters/openai) | OpenAI Agents SDK tools |
55
+ | [OpenAI](https://docs.corsair.dev/mcp-adapters/openai) | OpenAI function calling |
56
+ | [Vercel AI SDK](https://docs.corsair.dev/mcp-adapters/vercel-ai) | Tools for `useChat` and `streamText` |
57
+ | [Mastra](https://docs.corsair.dev/mcp-adapters/mastra) | Mastra agent tools |
58
+
59
+ Full list and options: [docs.corsair.dev/mcp-adapters](https://docs.corsair.dev/mcp-adapters/mcp-adapters).
60
+
61
+ ## How it works
62
+
63
+ 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:
64
+
65
+ | Tool | What it does |
66
+ |---|---|
67
+ | `list_operations` | Discover the available API endpoints |
68
+ | `get_schema` | Inspect the parameters for one endpoint |
69
+ | `run_script` | Execute a call with `corsair` in scope |
70
+
71
+ 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.
72
+
73
+ `run_script` evaluates the model's JavaScript in your process with the `corsair` instance in scope. It is not a sandbox, so keep the caller trusted, the same as any code your agent runs. Build the tools with `runOptions: { readonly: true }` to block write and destructive Corsair endpoints; note this restricts Corsair calls only, not other side effects in the script.
74
+
75
+ For coding agents over stdio (Claude Code, Cursor, Codex), see [Coding agents](https://docs.corsair.dev/mcp-adapters/claude-code).
76
+
77
+ ## Links
78
+
79
+ - Docs: https://docs.corsair.dev
80
+ - Adapters: https://docs.corsair.dev/mcp-adapters/mcp-adapters
81
+ - Repository: https://github.com/corsairdev/corsair
82
+ - Discord: https://discord.gg/uNgCP3mSzU
83
+ - X: https://x.com/corsairdotdev
84
+
85
+ ## License
86
+
87
+ Apache-2.0. See [LICENSE](https://github.com/corsairdev/corsair/blob/main/LICENSE).
package/package.json CHANGED
@@ -1,7 +1,27 @@
1
1
  {
2
2
  "name": "@corsair-dev/mcp",
3
- "version": "0.1.26",
4
- "description": "MCP server and SDK adapters for Corsair — list operations, inspect schemas, run API calls",
3
+ "version": "0.1.27",
4
+ "description": "MCP server and framework adapters for Corsair. Expose 200+ integrations to any agent framework (Mastra, OpenAI, Vercel AI, Claude) as tools.",
5
+ "keywords": [
6
+ "mcp",
7
+ "model-context-protocol",
8
+ "ai-agents",
9
+ "tools",
10
+ "tool-calling",
11
+ "mastra",
12
+ "openai",
13
+ "vercel-ai",
14
+ "integrations",
15
+ "corsair"
16
+ ],
17
+ "author": "Corsair (https://corsair.dev)",
18
+ "license": "Apache-2.0",
19
+ "homepage": "https://corsair.dev",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/corsairdev/corsair.git",
23
+ "directory": "packages/mcp"
24
+ },
5
25
  "type": "module",
6
26
  "main": "./dist/index.js",
7
27
  "module": "./dist/index.js",
@@ -21,7 +41,7 @@
21
41
  "@modelcontextprotocol/sdk": "^1.27.1",
22
42
  "express": "^4.21.0",
23
43
  "zod": "^4.1.13",
24
- "corsair": "0.1.108"
44
+ "corsair": "0.1.126"
25
45
  },
26
46
  "peerDependencies": {
27
47
  "@anthropic-ai/claude-agent-sdk": ">=0.2.0",