# How to connect Mastra with ChatGPT

```json
{
  "title": "How to connect Mastra with ChatGPT",
  "toolkit": "Mastra",
  "toolkit_slug": "mastra",
  "framework": "ChatGPT",
  "framework_slug": "chatgpt",
  "url": "https://composio.dev/toolkits/mastra/framework/chatgpt",
  "markdown_url": "https://composio.dev/toolkits/mastra/framework/chatgpt.md",
  "updated_at": "2026-11-25T05:36:09.860Z"
}
```

## Introduction

### How to connect Mastra MCP with ChatGPT
[ChatGPT](https://chatgpt.com/) can take action across your apps and files, stay with a project for hours, and turn a goal into finished materials like sheets, slides, and docs, not just answers.
In this guide, I will explain the easiest and most secure way to connect your Mastra account to ChatGPT via Composio Connect, so it can manage projects, check deployments, review feedback, query metrics, and monitor agents through natural language commands without ever putting your account credentials at risk.
For exact tool slugs and parameter tables, see the [tool catalog in the Composio docs](https://docs.composio.dev/toolkits/mastra).

## Also integrate Mastra with

- [Claude Cowork](https://composio.dev/toolkits/mastra/framework/claude-cowork)

## TL;DR

### Why use Composio over default connectors?
- Apps with read and write access. Default connectors mostly can read your data. Composio's Mastra integration lets ChatGPT take actions like creating drafts, sending updates, labeling records, and more.
- 1,800+ SaaS toolkits out of the box. Composio gives you instant access to a vast catalog of pre-built connectors, from Gmail and Slack to Notion, Linear, and Salesforce.
- One MCP server for every app. Connect any of your applications on demand through a single endpoint, rather than juggling a separate server for each app.
- Smart, context-aware tool loading. Unlike traditional MCP servers that dump every available tool into the LLM context window, Composio searches for and loads only the tools relevant to the task at hand.
- Cross-app automation. Chain actions across multiple apps in a single run - fetch a thread, summarize it in Notion, and post highlights to Slack without leaving the conversation.

## Connect Mastra to ChatGPT

### Prerequisites
- A ChatGPT account. We will use the [ChatGPT desktop app](https://openai.com/chatgpt/download/), and the steps are the same on the web.
- Access to the Mastra workspace you want to connect.
- [Composio plugin](https://dashboard.composio.dev/login?cta_placement=toolkit-framework-chatgpt-composio-connect&next=%2F~%2Forg%2Fconnect%2Fclients%2Fchatgpt).
Note: Composio connects through OAuth. You will be asked to sign in and approve specific permissions. Review the permission screen carefully if you are using a work account.
### Step-by-step: Connect Mastra to ChatGPT
### 1. Install the Composio plugin
Click the button. ChatGPT opens the Composio plugin page. Click Install plugin.
[Install in ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6a58503580c08191b78cc5bdaf4eba6e)
You can also find it inside ChatGPT: go to Settings, open Plugins, search the marketplace for Composio, and click Install plugin.
### 2. Authenticate
After you install, ChatGPT asks you to authenticate with Composio. Log in and click Allow access to authorize ChatGPT to use your Composio account.
### 3. Start using Composio
That is it. Composio tools are now available in ChatGPT. Type @Composio followed by your request, for example @Composio find unread Mastra messages and summarize them, and it will run the actions you authorize. On first use it asks you to authorize Mastra.
### Option 2: Add Composio as an MCP server
If you cannot use the plugin marketplace, add Composio as a custom MCP server instead.
### 1. Open the MCP settings
In ChatGPT, go to Settings and open the Plugins section. Inside the Plugins page, click the MCP tab.
### 2. Add the server
Click Add server. In the Name field enter Composio, for Type select Streamable HTTP, and in the URL field paste the Composio MCP server URL:

```bash
https://connect.composio.dev/mcp
```

## What is the Mastra MCP server, and what's possible with it?

The Mastra MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Mastra account. It provides structured and secure access to Mastra projects, deployments, organization management, hosted server settings, and observability data, so your agent can manage projects, track deployments, inspect logs and metrics, and administer organization access on your behalf.
- Project and deployment management: Have your agent create, list, inspect, redeploy, stop, or cancel Mastra Studio and hosted Server projects and deployments.
- Observability and feedback analysis: Let the agent discover and review metrics, analyze trends and grouped results, list feedback, and calculate feedback summaries for your Mastra projects.
- Deployment and runtime troubleshooting: Direct your agent to retrieve deployment logs, inspect current hosted Server runtime logs, and check deployment status when investigating an issue.
- Hosted server configuration: Instruct your agent to manage custom domains and replace environment variables for hosted Mastra Server projects, including restarting a running service after configuration changes.
- Organization access administration: Have your agent list members, invitations, organizations, and API tokens, invite or remove members, update roles, and revoke invitations or tokens.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `MASTRA_ADD_SERVER_DOMAIN` | Add Server Domain | Add a custom domain to a hosted Mastra Server project and return its required DNS records. |
| `MASTRA_ANALYZE_FEEDBACK` | Analyze Feedback | Calculate an aggregate, grouped breakdown, time series, or percentile series over numeric Mastra feedback without creating data. |
| `MASTRA_ANALYZE_METRICS` | Analyze Metrics | Calculate an aggregate, grouped breakdown, time series, or percentile series over hosted Mastra metrics without creating data. |
| `MASTRA_CANCEL_SERVER_DEPLOY` | Cancel Server Deployment | Cancel a queued or in-progress Mastra hosted Server deployment. |
| `MASTRA_CONFIRM_DEPLOY_UPLOAD` | Confirm Deploy Upload | Confirm that a deployment ZIP has already been uploaded to the signed URL returned by Create Deployment Upload. This action does not upload the ZIP. It triggers the Studio or Server build-and-deploy pipeline, so call it only after the separate signed-URL PUT succeeds. |
| `MASTRA_CREATE_API_TOKEN` | Create API Token | Create a Mastra organization API token. The response exposes the usable secret exactly once because that is the purpose of this operation. Store it securely immediately; do not log, share, or commit it. |
| `MASTRA_CREATE_DEPLOY_UPLOAD` | Create Deployment Upload | Create a legacy Mastra Studio or hosted Server deployment upload reservation. This action does not upload the artifact or start the deploy pipeline. When upload_url is returned, upload the ZIP bytes directly to it with PUT and Content-Type application/zip, then call Confirm Deploy Upload with the returned deployment ID. env_vars may contain secrets, and upload_url is a sensitive, short-lived signed URL granting temporary upload access; do not log, persist, share, or expose either value. |
| `MASTRA_CREATE_SERVER_PROJECT` | Create Server Project | Create a hosted Mastra Server project. This provisions hosted infrastructure and may trigger usage-metered compute charges. |
| `MASTRA_CREATE_STUDIO_PROJECT` | Create Studio Project | Create a Mastra Studio project. |
| `MASTRA_DELETE_PROJECT` | Delete Project | Permanently delete a Mastra Studio project and all its deployments, or a hosted Server project and its provisioned resources. |
| `MASTRA_DISCOVER_METRICS` | Discover Metrics | Discover metric names, labels, and shared observability dimensions without creating data. |
| `MASTRA_GET_AUTH_CONTEXT` | Get Authentication Context | Return the user, organization, role, and authentication type associated with the connected Mastra API key. |
| `MASTRA_GET_DEPLOY` | Get Deployment | Get the status and details of one Mastra Studio or hosted Server deployment. |
| `MASTRA_GET_DEPLOY_LOGS` | Get Deployment Logs | Get logs for one Mastra Studio or hosted Server deployment; Studio calls may limit the number of recent lines. |
| `MASTRA_GET_PROJECT` | Get Project | Get one Mastra Studio or hosted Server project and its deployment history. |
| `MASTRA_GET_SERVER_ENVIRONMENT_VARIABLES` | Get Server Environment Variables | SENSITIVE: Get environment variables for a hosted Mastra Server project. This returns plaintext secret values; never log, persist, or expose the response. |
| `MASTRA_GET_SERVER_RUNTIME_LOGS` | Get Server Runtime Logs | Get current runtime log records for a hosted Mastra Server project. |
| `MASTRA_INVITE_MEMBER` | Invite Organization Member | Send an invitation to join the connected Mastra organization with a member or admin role. The connected account must have an admin role. |
| `MASTRA_LIST_API_TOKENS` | List API Tokens | List metadata for Mastra organization API tokens. Returned token values are obfuscated identification previews, not usable secrets. |
| `MASTRA_LIST_FEEDBACK` | List Feedback | List hosted Mastra feedback records with page or durable delta continuation. |
| `MASTRA_LIST_INVITATIONS` | List Organization Invitations | List all pending invitations for the connected Mastra organization. |
| `MASTRA_LIST_MEMBERS` | List Organization Members | List members of the connected Mastra organization, including their roles and membership status. |
| `MASTRA_LIST_METRICS` | List Metrics | List raw hosted Mastra metric records with page or durable delta continuation. |
| `MASTRA_LIST_ORGANIZATIONS` | List Organizations | List Mastra organizations available to the connected API-key bearer credential. |
| `MASTRA_LIST_PROJECTS` | List Projects | List Mastra Studio or hosted Server projects in the connected organization. |
| `MASTRA_LIST_SERVER_DOMAINS` | List Server Domains | List custom domains configured for a hosted Mastra Server project. |
| `MASTRA_REDEPLOY_SERVER_PROJECT` | Redeploy Server Project | Trigger a new deployment for a hosted Mastra Server project. Redeployment starts deployment work and may trigger usage-metered compute charges. |
| `MASTRA_REMOVE_MEMBER` | Remove Organization Member | Remove a member from the connected Mastra organization. This destructive operation requires an organization admin role. |
| `MASTRA_REVOKE_API_TOKEN` | Revoke API Token | Revoke a Mastra organization API token so it can no longer authenticate. This destructive operation cannot reveal or restore the revoked secret. |
| `MASTRA_REVOKE_INVITATION` | Revoke Organization Invitation | Revoke a pending invitation to the connected Mastra organization. The connected account must have an admin role. |
| `MASTRA_SET_SERVER_ENVIRONMENT_VARIABLES` | Set Server Environment Variables | SENSITIVE SECRET MUTATION: Replace environment variables for a hosted Mastra Server project. Values are secrets; never log, persist, or expose them. This route does not restart the running service. |
| `MASTRA_SET_SERVER_ENVIRONMENT_VARIABLES_AND_RESTART` | Set Server Environment Variables and Restart | SENSITIVE, IRREVERSIBLE RUNTIME OPERATION: Replace secret environment variables for a hosted Mastra Server project and immediately restart its running service. Never log, persist, or expose the secret values. |
| `MASTRA_STOP_SERVER_DEPLOY` | Stop Server Deployment | Stop a Mastra hosted Server deployment. |
| `MASTRA_UPDATE_MEMBER_ROLE` | Update Organization Member Role | Change an existing member's role in the connected Mastra organization. The connected account must have an admin role. |
| `MASTRA_VERIFY_PROJECT_INGEST_ACCESS` | Verify Project Ingest Access | Verify that the connected Mastra organization API key can ingest telemetry for one project without changing provider state. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

Once connected, ChatGPT can access the Mastra MCP server via Composio to run actions that you authorize, directly in your workspace.

## Complete Code

None listed.

## How to build Mastra MCP Agent with another framework

- [Claude Cowork](https://composio.dev/toolkits/mastra/framework/claude-cowork)

## Related Toolkits

- [Supabase](https://composio.dev/toolkits/supabase) - Supabase is an open-source backend platform offering scalable Postgres databases, authentication, storage, and real-time APIs. It lets developers build modern apps without managing infrastructure.
- [Codeinterpreter](https://composio.dev/toolkits/codeinterpreter) - Codeinterpreter is a Python-based coding environment with built-in data analysis and visualization. It lets you instantly run scripts, plot results, and prototype solutions inside supported platforms.
- [GitHub](https://composio.dev/toolkits/github) - GitHub is a code hosting platform for version control and collaborative software development. It streamlines project management, code review, and team workflows in one place.
- [1password](https://composio.dev/toolkits/_1password) - 1Password is a password manager and digital vault for storing logins, secrets, notes, and secure documents. It helps individuals and teams protect credentials, share access safely, and reduce password risk.
- [Ably](https://composio.dev/toolkits/ably) - Ably is a real-time messaging platform for live chat and data sync in modern apps. It offers global scale and rock-solid reliability for seamless, instant experiences.
- [Abuselpdb](https://composio.dev/toolkits/abuselpdb) - Abuselpdb is a central database for reporting and checking IPs linked to malicious online activity. Use it to quickly identify and report suspicious or abusive IP addresses.
- [Agent37](https://composio.dev/toolkits/agent37) - Agent37 is a control API for managed agent sandboxes, templates, networking, and execution. It gives teams built-in scheduling, observability, budgets, and workspace administration.
- [Alchemy](https://composio.dev/toolkits/alchemy) - Alchemy is a blockchain development platform offering APIs and tools for Ethereum apps. It simplifies building and scaling Web3 projects with robust infrastructure.
- [Algolia](https://composio.dev/toolkits/algolia) - Algolia is a hosted search API that powers lightning-fast, relevant search experiences for web and mobile apps. It helps developers deliver instant, typo-tolerant, and scalable search without complex infrastructure.
- [Anakin](https://composio.dev/toolkits/anakin_io) - Anakin is a web automation platform offering scraping, crawling, search, and browser automation. Use it to extract structured data, automate site tasks, and monitor web changes reliably.
- [Anchor browser](https://composio.dev/toolkits/anchor_browser) - Anchor browser is a developer platform for AI-powered web automation. It transforms complex browser actions into easy API endpoints for streamlined web interaction.
- [AnyAPI](https://composio.dev/toolkits/anyapi) - AnyAPI is a marketplace of utility APIs for validation, currency conversion, holidays, documents, and web data. It brings common application workflows together through one practical API platform.
- [Apiflash](https://composio.dev/toolkits/apiflash) - Apiflash is a website screenshot API for programmatically capturing web pages. It delivers high-quality screenshots on demand for automation, monitoring, or reporting.
- [Apiverve](https://composio.dev/toolkits/apiverve) - Apiverve delivers a suite of powerful APIs that simplify integration for developers. It's designed for reliability and scalability so you can build faster, smarter applications without the integration headache.
- [Appcircle](https://composio.dev/toolkits/appcircle) - Appcircle is an enterprise-grade mobile CI/CD platform for building, testing, and publishing mobile apps. It streamlines mobile DevOps so teams ship faster and with more confidence.
- [Appdrag](https://composio.dev/toolkits/appdrag) - Appdrag is a cloud platform for building websites, APIs, and databases with drag-and-drop tools and code editing. It accelerates development and iteration by combining hosting, database management, and low-code features in one place.
- [Appveyor](https://composio.dev/toolkits/appveyor) - AppVeyor is a cloud-based continuous integration service for building, testing, and deploying applications. It helps developers automate and streamline their software delivery pipelines.
- [Authyo](https://composio.dev/toolkits/authyo) - Authyo is a REST API service for passwordless authentication, OTP verification, session management, and transactional notifications. Use it to add secure login flows and user verification without building auth infrastructure from scratch.
- [AWS Marketplace MCP](https://composio.dev/toolkits/aws_marketplace_mcp) - AWS Marketplace MCP provides MCP access to AWS Marketplace's cloud software, data, and services catalog. Use it to discover, compare, and evaluate 30K+ AWS Marketplace listings faster.
- [Azure DevOps](https://composio.dev/toolkits/azure_devops) - Azure DevOps is Microsoft's platform for planning work, managing code, and delivering software. It helps development teams collaborate and ship applications with connected tools.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Mastra MCP?

With a standalone Mastra MCP server, the agents and LLMs can only access a fixed set of Mastra tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Mastra and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with ChatGPT?

Yes, you can. ChatGPT fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Mastra tools.

### Can I manage the permissions and scopes for Mastra while using Tool Router?

Yes, absolutely. You can configure which Mastra scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Mastra data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
