Mastra/mcp
Client implementation for Mastra, providing seamless integration with MCP-compatible AI models and tools.
@mastra/mcp
Mastra supports the Model Context Protocol (MCP), an open standard for connecting AI agents to external tools and resources. It serves as a universal plugin system, enabling agents to call tools regardless of language or hosting environment.
Mastra can also be used to author MCP servers, exposing agents, tools, and other structured resources via the MCP interface. These can then be accessed by any system or agent that supports the protocol.
Installation
To use MCP, install the required dependency:
npm install @mastra/mcp@latest
Overview
Mastra currently supports two MCP classes:
MCPClient: Connects to one or many MCP servers to access their tools, resources, prompts, and handle elicitation requests.MCPServer: Exposes Mastra tools, agents, workflows, prompts, and resources to MCP-compatible clients.
Read the official MCP documentation to learn more.
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
MCP Options Order Flow Server
A high-performance MCP server for comprehensive options order flow analysis.
PyVista MCP Server
An MCP server for 3D visualization and data analysis using the PyVista library.
Jetbrains Index Intelligence MCP Plugin
Allows AI-powered coding assistants to tap into your JetBrains IDE’s semantic code index and refactoring engine — giving them true code intelligence (symbol lookup, references, refactors, diagnostics, etc.) via MCP.
Mantis MCP Server
An MCP server for integrating with the Mantis Bug Tracker system.
OpenAI GPT Image
Generate and edit images using OpenAI's GPT-4o and DALL-E APIs with advanced prompt control.
Squidler.io
Squidler is designed to validate your web app as a human based on natural language use cases, without write brittle, DOM-dependent tests.
MCP Servers
A collection of MCP servers for browser automation and database interaction, supporting Puppeteer, Postgres, MySQL, and Parquet.
Currents
Enable AI Agents to fix Playwright test failures reported to Currents.
SuzieQ
Interact with the SuzieQ network observability platform via its REST API.
MCP Proxy Server
A proxy server for aggregating and serving multiple MCP resource servers through a single endpoint.