Skip to main content

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

PropertyValue
FactorycreateAdminMcpServer()
Sourcesrc/mastra/mcp-servers/admin-server.ts
Version1.0.0
Tool Count11
Skip FlagMASTRA_SKIP_ADMIN_MCP
Tool Registrypackages/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 IDDescription
admin-update-llm-paramsUpdate LLM parameters (temperature, max tokens, deployment) for an agent profile
admin-test-llm-modelSend a test prompt to a specific LLM deployment and return the response
admin-db-health-checkRun a connectivity check against the Azure SQL database
admin-list-agent-profilesList all agent profiles with their current versions and configurations
admin-update-agent-profileUpdate an agent profile's system prompt, model overrides, or metadata
admin-agent-profile-historyRetrieve version history for a specific agent profile
admin-test-tavily-searchExecute a test search query via the Tavily search provider
admin-get-current-profileFetch the current active profile for a given agent ID
admin-probe-llm-providerProbe the configured LLM provider endpoint for availability and model listing
admin-environment-healthReport environment-level probe health
admin-observability-analyticsQuery 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)