Official Ampersand AI SDKs

by amp-labs

11 443 downloads Not rated yet MIT

About

This repo contains the official Ampersand AI SDK and the official MCP server for Ampersand. The AI SDK exposes tools for AI agents to manage and interact with integrations with customers' SaaS tools, while the MCP server exposes those tools via the Model Context Protocol.

Details

License
MIT

Explore

- AI SDK provides tools like createRecord and updateRecord.
- MCP server connects agents to 150+ Ampersand connectors.
- Supports Vercel AI SDK, Mastra, and other agent frameworks.
- Multi-tenant MCP server exposes Ampersand primitives as native tools.
- Includes end-to-end tests for the AI SDK.
- MIT licensed and open to contributions.

npm install @amp-labs/ai

Prerequisites:
- OpenAI API key (required for AI model)
- Ampersand API credentials

1. Configure environment variables in test/.env:

bash
OPENAI_API_KEY=your_openai_api_key_here
AMPERSAND_API_KEY=your_ampersand_api_key_here
AMPERSAND_PROJECT_ID=your_project_id_here
AMPERSAND_GROUP_REF=your_group_ref_here

2. Run the test:
bash

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>"
      }
    }
  }
}

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.

Ampersand AI SDK

Installation

```bash
npm install @amp-labs/ai

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.