MCP Server & Gateway UI
Relevant source files
The following files were used as context for generating this wiki page:
- client/dashboard/src/pages/org/PlatformMCP.tsx
- client/admin/src/pages/admin-mcp/AdminMcpSetup.tsx
- server/internal/platformmcp/tools.go
- client/dashboard/src/pages/mcp/x/tabs/settings/sections/GeneralSection.tsx
- client/dashboard/src/pages/mcp/x/hosted/ServerInstructionsSection.tsx
- server/internal/oauthui/authorization_error.html
The Model Context Protocol (MCP) Server and Gateway UI provides the interface for managing AI agent connections to external tools and data sources. It enables administrators to register MCP servers, configure gateways for organization-wide access, and manage the lifecycle of tool distributions within Speakeasy.
The system supports multiple backend types, including hosted, remote, and tunneled servers. It provides specialized onboarding flows for various AI agents such as Claude Code, Cursor, and Codex.
Architecture and Data Flow
The UI interacts with the Platform MCP backend to manage the inventory of servers and their distribution to plugins. The following diagram illustrates the high-level flow of registering and distributing an MCP server.
Connection Types
The system categorizes MCP backends into several types to handle different networking and hosting requirements:
| Backend Kind | Description |
|---|---|
hosted | Servers served directly by Speakeasy. |
remote | External servers reached via HTTP. |
tunneled | Servers reached through a secure tunnel. |
built_in | Internal servers like the approvals server. |
unproxied | Direct connections without Speakeasy mediation. |
Sources: server/internal/platformmcp/tools.go:21-31
Platform MCP Onboarding
The onboarding process uses a multi-step checklist to guide users through connecting their agents. This flow ensures that the agent is authenticated and the necessary servers are registered and distributed to the organization's default plugin.
Onboarding Steps
- Agent Selection: You choose from supported clients like Claude Code, Cursor, or Codex.
- Installation: You install the Speakeasy marketplace package or configure a manual connection.
- Authentication: You complete a browser-based OAuth flow to link your staff account.
- Catalogue Exploration: You search for reviewed MCP servers to add to your project.
- Registration: You privately register a selected MCP server.
- Readiness Verification: You confirm the server is functional (including secondary OAuth if required).
- Distribution: You attach the server to a plugin to make tools available to users.
Sources: client/dashboard/src/pages/org/PlatformMCP.tsx:758-795, server/internal/platformmcp/tools.go:214-220
Server Management and Configuration
The UI provides detailed configuration panels for individual MCP servers, allowing for metadata updates and tool-specific instructions.
General Settings
You can modify the display name, icon, and upstream URL of a server. Changes to the server name trigger a recomputation of the server's slug.
Sources: client/dashboard/src/pages/mcp/x/tabs/settings/sections/GeneralSection.tsx:135-155
Server Instructions
Server instructions serve as a "user manual" returned to LLMs upon connection. They describe how tools work together, required workflows, and operational constraints. The UI includes an AI-assisted generation feature that drafts these instructions based on the server's tool descriptions.
Sources: client/dashboard/src/pages/mcp/x/hosted/ServerInstructionsSection.tsx:102-125
Gateway UI
Gateways allow users to access multiple MCP servers through a single connection point.
- Organization Gateway: Provides a single URL that exposes all servers a user is authorized to reach across the entire organization.
- Project Gateway: Limits the connection scope to a specific project.
- Code Mode: A specialized gateway mode that offers an execution tool capable of running Python code.
Sources: server/internal/platformmcp/tools.go:230-240
Authorization and Error Handling
The system implements strict RBAC and OAuth flows for all MCP interactions. If an authorization fails, the UI displays specialized error pages to help the user recover.
OAuth Error States
| Error Kind | Description | Recovery Action |
|---|---|---|
organization-blocked | The organization prevents the connection. | Contact organization administrator. |
expired | The connection link is no longer valid. | Restart the connection flow from the client. |
incompatible | Client uses unsupported sign-in methods. | Update the MCP client. |
session-changed | Browser session does not match the link. | Sign in again or use the same browser session. |
Sources: server/internal/oauthui/authorization_error.html:36-80
Summary
The MCP Server & Gateway UI acts as the central control plane for agent-to-tool connectivity. By providing guided onboarding, granular server configuration, and organization-wide gateway access, it ensures that AI agents can securely interact with enterprise resources while maintaining administrative oversight through Speakeasy's platform tools.