Introducing Mastra Connect

Your agents can now use Linear, Notion, Slack, and 20 other services with a single key.

Patrycja Jenkner-SarPatrycja Jenkner-Sar·

Oct 7, 2026

·

4 min read

You can now connect providers like Linear, Notion, or Slack to your Mastra project with Mastra Connect. Deploy agents that connect to your services from the CLI with a single auth flow.

note
Mastra Connect is in public beta. While in beta it's free to use on Mastra platform.

Every connection gives your agents and workflows ready-made tools, such as linear_list_issues, notion_create_page, and slack_post_message.

You can manage credentials with mastra connect add, or from the dashboard, and the running app picks up the new tools within seconds.

Mastra continues to support direct integrations via MCP, as well as integrations through integration platforms like Composio, Nango, Arcade, and so on. But we wanted to build the simplest possible way to get started, giving an agent all the tools it needs to search real knowledge and take real action.

Today, Connect launches with 23 providers and almost 900 tools, plus 7 hosted MCP providers. More providers are coming, including Figma, GitLab, and Google Analytics.

If we connect to your provider but don't have the tool you need, you can use credential() to get the stored credential and call the provider's SDK directly.

Get started

With a Mastra platform project set up, install Connect and the latest Mastra CLI:

GNU BashTerminal
npm install @mastra/connect
npm install -g mastra@latest
note
Requires @mastra/connect@1.0.0 and @mastra/core@1.75.0 or later, added in PR #26084.

Connect providers to your project. OAuth providers open a consent screen in the browser; API key providers prompt for the key in the terminal:

GNU BashTerminal
mastra connect add linear --project your-project-name
mastra connect add github --project your-project-name
mastra connect add notion --project your-project-name

You can also add connections from the Connect page in the Mastra platform dashboard. The same page lists your connections and every request your agents make through them:

Your app reads connections with a platform access token and your project ID. Add both to .env:

GNU Bash.env
MASTRA_PLATFORM_ACCESS_TOKEN=your-token
MASTRA_PROJECT_ID=your-project-id

When you deploy to Mastra platform, platform access token and your project ID are set for you.

Pass tools() to your agent. By default, the agent gets tools for every provider connected to the project; you can limit which providers and tools it uses.

This example limits the agent to Notion, Linear, GitHub, and Slack, and removes delete, archive, and merge tools:

TypeScriptsrc/mastra/agents/product-updates-agent.ts
import { Agent } from "@mastra/core/agent";
import { Memory } from "@mastra/memory";
import { tools } from "@mastra/connect";
 
export const productUpdatesAgent = new Agent({
  id: "product-updates-agent",
  name: "Mastra Product Updates",
  instructions: /* ... */,
  model: "anthropic/claude-sonnet-5",
  tools: tools({
    providers: ["notion", "linear", "github", "slack"],
    disallowTools: ["*_delete_*", "*_archive_*", "github_merge_pull_request"]
  }),
  memory: new Memory()
});

Tool entries accept * globs, and new connections show up in the running app without a redeploy.

Channels

Connections can also put your agents in Slack, Discord, or Telegram. Pass channels() to the Mastra constructor and the platform supplies each channel's bot credential:

TypeScriptsrc/mastra/index.ts
import { Mastra } from "@mastra/core/mastra";
import { channels } from "@mastra/connect";
import { productUpdatesAgent } from "./agents/product-updates-agent";
 
export const mastra = new Mastra({
  agents: { productUpdatesAgent },
  channels: await channels()
});

Discord and Telegram still need a bot created in the vendor's console before you connect it. See Channels for setup steps per platform.

Raw credentials

When Connect doesn't have a tool, credential() returns the stored credential so you can call the provider's SDK directly:

import { credential } from "@mastra/connect";
 
const cred = await credential("c_yourconnectionid");
const token = cred.type === "oauth2" ? cred.accessToken : cred.apiKey;

Requests made with a raw credential skip the platform proxy, so they aren't recorded on the platform.

Full provider list

  • Clerk
  • Discord (tools + channels)
  • Fireflies.ai
  • GitHub
  • Gmail
  • Google Calendar
  • Google Docs
  • Google Drive
  • Google Sheets
  • HubSpot
  • incident.io
  • Jira
  • Linear
  • Notion
  • OpenAI
  • PostHog
  • Resend
  • Slack (tools + channels)
  • Snowflake
  • Supabase
  • Telegram (channels only)
  • WorkOS

For more information and full configuration options, see:

Share on X or LinkedIn
Patrycja Jenkner-Sar
Patrycja Jenkner-SarProduct Marketer & Content Engineer

Patrycja Jenkner-Sar is a product marketer and content engineer at Mastra. Previously, she was a product marketer at neptune.ai, an experiment tracker for machine learning teams, and is focused on translating complex functionality into clear value for developers and technical audiences.

All articles by Patrycja Jenkner-Sar →