Mastra 发布 Connect,可将 Linear、Notion、Slack 等接入智能体
Introducing Mastra Connect | Mastra Blog
Mastra 发布 Mastra Connect,用户可通过 CLI 单次授权流程把 Linear、Notion、Slack 等服务连接到 Mastra 项目,并让智能体和 workflow 直接获得现成工具,例如 linear_list_issues、notion_create_page、slack_post_message。Connect 首发支持 23 个 provider、近 900 个工具和 7 个托管 MCP provider,后续将加入 Figma、GitLab 和 Google Analytics。凭据可用 mastra connect add 或仪表盘管理,运行中的应用数秒内即可识别新工具,新增连接无需重新部署。
正文
当前显示原文,中文全文译文尚未就绪。
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.
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.
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.
With a Mastra platform project set up, install Connect and the latest Mastra CLI:
Connect providers to your project. OAuth providers open a consent screen in the browser; API key providers prompt for the key in the terminal:
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:
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:
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:
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:
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:
Connect overview; Providers; Tools; Channels; tools() reference; channels() reference; credential() reference; Provider toolsets reference