Admin Console
Relevant source files
The following files were used as context for generating this wiki page:
The Admin Console provides staff-only management capabilities for the Speakeasy platform. It consists of a web-based administration dashboard and a specialized Model Context Protocol (MCP) server known as the Admin MCP. These tools allow authorized personnel to perform administrative tasks, manage organization-level configurations, and execute specialized tools for platform maintenance.
Administrators access these features through a private, tailnet-connected endpoint to ensure secure access to internal APIs and sensitive data. The console enforces strict role-based access control (RBAC), verifying staff identity and permissions on every tool call and connection attempt.
Sources: client/admin/src/pages/admin-mcp/AdminMcpSetup.tsx:40-45, REVIEW.md:120-125
Admin MCP Architecture
The Admin MCP is a first-party product surface that exposes staff-only tools to various MCP clients like Claude Desktop, Cursor, and Codex. It operates over an HTTPS Tailscale endpoint to prevent access from insecure dashboard origins or public internet aliases.
Secure Connection Flow
To connect an agent to the Admin MCP, you must satisfy several network and identity requirements:
- Connect your machine to the company Tailscale network (tailnet).
- Access the Admin Console via its private Tailscale address.
- Authenticate using a staff account; API keys are not permitted for these connections.
The diagram shows the sequence of network and identity verification steps required to establish a secure connection to the administrative tools.
Sources: client/admin/src/pages/admin-mcp/AdminMcpSetup.tsx:10-30, client/admin/src/pages/admin-mcp/AdminMcpSetup.tsx:50-65
Administrative Tool Management
The console categorizes tools based on their access requirements and functional impact. These tools are retrieved from the /admin-mcp/tools endpoint.
Tool Access Levels
| Access Type | Label | Description |
|---|---|---|
read | Read-only | Tools that query data without modification. |
approval | Approval flow | Tools that prepare changes for browser-based approval before execution. |
write | Direct write | Tools that execute changes immediately without a separate approval step. |
Sources: client/admin/src/pages/admin-mcp/AdminMcpTools.tsx:15-25, client/admin/src/pages/admin-mcp/AdminMcpTools.tsx:135-140
Tool Interface
The AdminMcpTools component provides a search and filter interface to explore available capabilities. Every tool entry displays its title, internal name, description, and assigned access badge.
Sources: client/admin/src/pages/admin-mcp/AdminMcpTools.tsx:110-130
Client Configuration
The Admin Console generates specific configuration blocks for supported MCP clients to facilitate quick setup.
Supported Clients and Commands
| Client | Setup Method | Primary Configuration/Command |
|---|---|---|
| Claude Code | Terminal Command | claude mcp add --transport http --scope user gram-admin [endpoint] |
| Claude Desktop | Config File (claude_desktop_config.json) | Uses npx -y mcp-remote@0.1.25 [endpoint] as a stdio bridge. |
| Cursor | Config File (mcp.json) | JSON object defining gram-admin as an http type server. |
| Codex | Terminal Command | codex mcp add gram-admin --url [endpoint] |
Sources: client/admin/src/pages/admin-mcp/AdminMcpSetup.tsx:85-130
Claude Desktop Bridge
Claude Desktop requires a local stdio bridge via mcp-remote because its cloud-hosted components cannot reach the private company tailnet. This ensures the connection originates from the user's Mac, utilizing local Tailscale access and MagicDNS.
Sources: client/admin/src/pages/admin-mcp/AdminMcpSetup.tsx:95-105
Security and Compliance
The Admin Console follows strict security guidelines defined in the project's review standards:
- RBAC Enforcement: Every mutating handler must call the authorization service (
s.authz.Require) before performing database work. - Origin Validation: The dashboard and staff MCP share a common origin. The system rejects setup instructions if the dashboard is accessed via an insecure origin or a public app URL.
- Audit Logging: Every mutation on an administrative resource must produce an audit entry per affected row within the same database transaction.
- Confidentiality: Customer-identifying information (names, emails, revenue figures) must never be included in logs, commit messages, or user-facing admin views.
The sequence diagram illustrates the internal enforcement of permissions and audit requirements during the execution of an administrative tool.
Sources: REVIEW.md:100-115, REVIEW.md:120-135, client/admin/src/pages/admin-mcp/AdminMcpSetup.tsx:35-40
Summary
The Admin Console serves as a secure gateway for staff to manage the Speakeasy platform. By integrating the Admin MCP with internal Tailscale networking and strict RBAC, the system ensures that administrative actions are authenticated, authorized, and audited. The console provides both a visual interface for tool discovery and automated configuration for developers to link their preferred AI agents to the platform's internal management capabilities.