MCP Server Overview
What Are MCP Servers?
The Mastra platform exposes its capabilities through Model Context Protocol (MCP) servers. MCP is an open standard that allows AI clients -- such as VS Code Copilot, Claude Desktop, or custom agents -- to discover and invoke tools over a structured protocol. Each MCP server groups related tools by domain, so clients only connect to the servers they need.
Available Servers
| Server | Tools | Domain | Server ID | Notes |
|---|---|---|---|---|
| Admin | 11 | Base Platform | admin | |
| K12 Safety | 28 | K12 Education | k12-safety | |
| Reasoning Engine | 8 | Reasoning | reasoning-engine | Loaded when the Reasoning Engine loader is active |
| Docs | 4 | Documentation (all) | docs | |
| K12 Docs | 4 | K12 Documentation | k12-docs | |
| SDAC Docs | 4 | SDAC Documentation | sdac-docs | |
| TAP Docs | 4 | TAP Documentation | tap-docs | |
| RE Docs | 4 | RE Documentation | reasoning-engine-docs |
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.
Discovering Servers
When runtime directory routes are enabled, the platform provides a JSON discovery endpoint that lists active MCP servers and their metadata:
| Endpoint | Format | Use Case |
|---|---|---|
GET /mcp-servers.json | JSON | Machine-readable registry for automated clients |
The JSON endpoint returns server objects with IDs, names, and descriptions. The
audited route factory does not expose a separate /mcp-servers HTML directory.
Connecting to a Server
The source-backed server IDs are listed above. Direct runtime paths use the
root-relative patterns below. Through testing APIM/Replit, prefix them with
/ai, for example /ai/api/mcp/docs/sse.
| Protocol | URL Pattern | Description |
|---|---|---|
| Streamable HTTP | /api/mcp/{serverId}/mcp | Recommended for most clients |
| Server-Sent Events (SSE) | /api/mcp/{serverId}/sse | For clients that require SSE transport |
For example, to connect to the K12 Safety server:
- Streamable HTTP:
/api/mcp/k12-safety/mcp - SSE:
/api/mcp/k12-safety/sse
Testing APIM validation on 2026-06-23 confirmed the /ai/api/mcp/* transport
prefix responds through APIM. /ai/mcp-servers.json still returns 401 in
testing, so use the committed MCP inventory or local docs MCP config for
Replit discovery until registry auth is reconciled.
How It Works
- The AI client connects to an MCP server using its URL.
- The client discovers available tools via the MCP protocol's
tools/listmethod. - The client invokes tools by calling
tools/callwith the tool ID and parameters. - The server executes the tool against the platform's backend services and returns the result.
Next Steps
Agent profiles, LLM testing, and system health tools
Content safety assessment, EOP editing, and QRG tools
Multi-step analytical and correlation workflows
Full-text documentation search across all domains
Per-domain scoped documentation search