0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/packages/mcp
dane-ai-mastra[bot] a5859ee2b9
chore: version packages (alpha) (#30430)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
History 2026-11-16 14:09:31 +01: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 better-auth monorepo to v1.7.22 (#30464) 2026-11-15 17:48:36 -08:00
src fix(libsql): stop background task writes stalling shutdown, and fix backend timing flakes (#30504) 2026-11-16 13:18:29 +01: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 packages (alpha) (#30430) 2026-11-16 14:09:31 +01: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 packages (alpha) (#30430) 2026-11-16 14:09:31 +01: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.