0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/packages/mcp
History 2026-11-12 21:12:29 +00:00
..
__recordings__ fix: update staged test recordings and MCP transport expectations (#14539) 2026-03-20 16:01:20 +01:00
integration-tests chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.45 (#29844) 2026-11-10 20:07:34 -08:00
src feat(server): built-in MCP endpoint for agents, workflows and tools (#29929) 2026-11-12 12:56:28 -05:00
.gitignore feat(mcp): generate TypeScript types from MCP tool schemas (#25569) 2026-10-22 13:30:49 +02:00
AGENTS.md chore: enforce AGENTS.md token limits (#15464) 2026-04-18 19:12:37 -07:00
CHANGELOG.md chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
lint-staged.config.js refactor(lint): replace ESLint with type-aware oxlint (#27476) 2026-10-18 10:38:35 -07:00
oxlint.config.ts chore: migrate linting to oxlint (#20173) 2026-07-25 01:04:02 +02:00
package.json chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
README.md chore(*): Update/unify/add READMEs (#22858) 2026-09-02 14:36:59 +02:00
tsconfig.build.json feat(mcp)!: adopt the native 2026-07-28 request lifecycle (#23876) 2026-09-18 09:53:38 -04:00
tsconfig.json feat(mcp): generate TypeScript types from MCP tool schemas (#25569) 2026-10-22 13:30:49 +02:00
tsdown.config.ts feat(mcp): generate TypeScript types from MCP tool schemas (#25569) 2026-10-22 13:30:49 +02:00
turbo.json chore: migrate package builds to tsdown (#19829) 2026-07-28 12:32:21 +02:00
vitest.config.ts test(core): move real-API tests to e2e files and fix failing unit tests (#13193) 2026-02-19 15:19:22 +01:00

@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

npm install @mastra/mcp

Usage

Provide an MCP server URL or stdio command.

import { MCPClient } from '@mastra/mcp';

const client = new MCPClient({
  servers: { docs: { url: new URL('https://example.com/mcp') } },
});
const tools = await client.listTools();

Documentation

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.