This repo contains the official Ampersand AI SDK and the offical MCP server for Ampersand.
- AI SDK - Official Ampersand AI SDK that exposes tools for your AI agents to manage and interact with integrations with your customer's SaaS tools.
- MCP server - Official Ampersand MCP server that exposes the tools from the Ampersand AI SDK.
The examples
directory contains examples of how to use the AI SDK with popular agent frameworks.
Ampersand is a platform for AI builders to add B2B SaaS integrations to their agentic apps. To learn more, visit our website.
npm install @amp-labs/ai
# or
yarn add @amp-labs/ai
# or
pnpm add @amp-labs/ai
The SDK provides several modules that can be used depending on your framework preference:
import { createRecord, updateRecord } from "@amp-labs/ai/aisdk";
// Use in your AI agent configuration
const tools = [createRecord, updateRecord];
import { createRecord, updateRecord } from "@amp-labs/ai/mastra";
// Use in your Mastra workflow
const tools = [createRecord, updateRecord];
Connect your agents to the 150+ connectors we offer at Ampersand via this multi-tenant MCP server. We expose the primitives we offer on the Ampersand platform as native tools here.
Add the following in your mcp.json
in Cursor IDE or claude_desktop_config.json
when using Claude desktop.
If your MCP client supports headers:
{
"mcpServers": {
"@amp-labs/mcp-server": {
"url": "https://mcp.withampersand.com/v1/sse?project=<AMPERSAND_PROJECT_ID>&integrationName=<AMPERSAND_INTEGRATION_NAME>&groupRef=<AMPERSAND_GROUP_REF>",
"headers": {
"x-api-key": "<AMPERSAND_API_KEY>"
}
}
}
}
If your MCP client does not support headers, you can pass the API key in the query param:
{
"mcpServers": {
"@amp-labs/mcp-server": {
"url": "https://mcp.withampersand.com/v1/sse?apiKey=<AMPERSAND_API_KEY>&project=<AMPERSAND_PROJECT_ID>&integrationName=<AMPERSAND_INTEGRATION_NAME>&groupRef=<AMPERSAND_GROUP_REF>"
}
}
}
{
"mcpServers": {
"@amp-labs/mcp-server": {
"command": "npx",
"args": [
"-y",
"@amp-labs/mcp-server@latest",
"--transport",
"stdio",
"--project",
"<AMPERSAND_PROJECT_ID>",
"--integrationName",
"<AMPERSAND_INTEGRATION_NAME>",
"--groupRef",
"<AMPERSAND_GROUP_REF>"
],
"env": {
"AMPERSAND_API_KEY": "<AMPERSAND_API_KEY>"
}
}
}
}
Please refer to the mcp-server README for more information.
This project is licensed under the MIT license.
See LICENSE for more information.
We welcome contributions! Please refer to the CONTRIBUTING.md file for more information.