Admin MCP Server
Overview
The Admin MCP Server exposes platform administration tools for managing agent profiles, testing LLM configurations, and monitoring system health. This is a restricted-surface server intended for admin-only operations.
Server Metadata
| Property | Value |
|---|---|
| Factory | createAdminMcpServer() |
| Source | src/mastra/mcp-servers/admin-server.ts |
| Version | 1.0.0 |
| Tool Count | 11 |
| Skip Flag | MASTRA_SKIP_ADMIN_MCP |
| Tool Registry | packages/platform-runtime/src/tools/admin/index.ts |
Factory Implementation
// src/mastra/mcp-servers/admin-server.ts
import { MCPServer } from '@mastra/mcp';
import { adminTools } from '@maf/platform-runtime/tools/admin/index';
export const createAdminMcpServer = () =>
new MCPServer({
name: 'Admin MCP Server',
version: '1.0.0',
description: 'Restricted MCP surface that exposes admin-only tooling for prompts, overrides, and health checks.',
tools: adminTools,
});
The factory imports the full adminTools registry and passes it directly to the MCPServer constructor. No filtering or transformation is applied.
Tool Registry
All 11 tools are exported from packages/platform-runtime/src/tools/admin/index.ts:
| Tool ID | Description |
|---|---|
admin-update-llm-params | Update LLM parameters (temperature, max tokens, deployment) for an agent profile |
admin-test-llm-model | Send a test prompt to a specific LLM deployment and return the response |
admin-db-health-check | Run a connectivity check against the Azure SQL database |
admin-list-agent-profiles | List all agent profiles with their current versions and configurations |
admin-update-agent-profile | Update an agent profile's system prompt, model overrides, or metadata |
admin-agent-profile-history | Retrieve version history for a specific agent profile |
admin-test-tavily-search | Execute a test search query via the Tavily search provider |
admin-get-current-profile | Fetch the current active profile for a given agent ID |
admin-probe-llm-provider | Probe the configured LLM provider endpoint for availability and model listing |
admin-environment-health | Report environment-level probe health |
admin-observability-analytics | Query observability analytics used by the admin dashboard |
Implementation Notes
Restricted Surface
The Admin MCP server is intentionally limited to operations that require elevated privileges. All tools in this server interact with either:
- Core.AgentProfiles -- database-backed agent configuration
- LLM provider endpoints -- direct model testing and probing
- Platform health -- database connectivity and service availability
No Domain Dependency
Unlike K12 Safety or TAP servers, the Admin server has no domain-specific dependencies. It is always loaded regardless of MASTRA_TARGET (unless explicitly disabled via MASTRA_SKIP_ADMIN_MCP).
Security Considerations
These tools perform write operations on agent profiles and can invoke LLM calls directly. In production deployments, access to the Admin MCP server should be restricted to authorized operators. The skip flag MASTRA_SKIP_ADMIN_MCP can be used to disable the server entirely in environments where admin operations are not needed.
Code Locations
- Server factory:
src/mastra/mcp-servers/admin-server.ts - Tool registry:
packages/platform-runtime/src/tools/admin/index.ts - Individual tools:
packages/platform-runtime/src/tools/admin/*.ts - Tests:
tests/shared/unit/mcp-servers/mcp-servers.test.ts(Admin MCP Server describe block)