Skip to main content

MCP Servers

Overview

The Mastra Agent Framework exposes its tool registries as Model Context Protocol (MCP) servers. Each MCP server wraps a domain-specific tool registry, making the tools available to any MCP-compatible client (VS Code Copilot, Claude Desktop, custom agents).

MCP servers are instantiated through the active Mastra artifact loaders and then merged into the runtime configuration in apps/runtime/src/mastra-runtime.ts. Each server factory returns a fresh MCPServer instance wired to a source-owned tool registry.

Server Summary

ServerVersionToolsDomainSkip/Opt-in Flag
Admin MCP Server1.0.011Base PlatformMASTRA_SKIP_ADMIN_MCP
K12 Safety MCP Server1.0.028K12 EducationMASTRA_SKIP_K12_MCP
Reasoning Engine MCP Server1.0.08Reasoning EngineMASTRA_INCLUDE_REASONING_ENGINE=true
Docs MCP Server1.0.04Documentation (all)MASTRA_SKIP_DOCS_MCP
K12 Docs MCP Server1.0.04K12 DocsMASTRA_SKIP_DOCS_MCP
SDAC Docs MCP Server1.0.04SDAC DocsMASTRA_SKIP_DOCS_MCP
TAP Docs MCP Server1.0.04TAP DocsMASTRA_SKIP_DOCS_MCP
RE Docs MCP Server1.0.04RE DocsMASTRA_SKIP_DOCS_MCP
Diagnostics MCP Serverservice-owned11Read-only diagnosticsGateway token and environment approval policy
Testing Workbench MCPservice-owned22Diagnostics plus static docs/contracts/source contextGateway token and environment approval policy

The eight runtime-composed profiles account for 67 server-tool registrations. The generated inventory also tracks the separate diagnostics (11) and testing workbench (22) profiles: 10 profiles and 100 server-tool registrations in all. These are registrations per server, not a claim of 100 unique implementations; the docs profiles intentionally reuse the same four-tool registry.

The skip flags are parsed through the environment schema. Reasoning Engine inclusion is exposed through env.includeReasoningEngine, which reads MASTRA_INCLUDE_REASONING_ENGINE=true directly.

The canonical generated inventory is docs/internal/documentation-revival/mcp-inventory.json. Use it instead of hand-maintaining counts when MCP factories or diagnostics context tools change.

Documentation

MCP server documentation is split into two audiences:

  • Internal -- Architecture, factory patterns, source paths, testing, and implementation details for engineers maintaining the MCP layer
  • External -- Available servers, tool inventories, connection methods, and usage guidance for MCP client developers