-
Notifications
You must be signed in to change notification settings - Fork 565
chore(sdk): package READMEs and npm metadata for publish readiness #1460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
|
||
| [](https://www.npmjs.com/package/@corsair-dev/mcp) | ||
| [](https://github.com/corsairdev/corsair/blob/main/LICENSE) | ||
| [](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. | ||
|
|
||
| ## 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 | | ||
|
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). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.