Model Context Protocol (MCP) Management
Relevant source files
The following files were used as context for generating this wiki page:
Model Context Protocol (MCP) Management centralizes the distribution, security, and connection of AI agents to external tools and data sources. The system allows administrators to manage MCP servers and skills across an organization, enforcing fine-grained permissions and threat detection. It serves as a bridge between identity systems and tools, providing a controlled environment for agents to interact with SaaS vendors and internal systems.
Sources: README.md, REVIEW.md:124-126, server/internal/platformmcp/tools.go:210-213
Architecture and Backend Types
The platform supports multiple types of MCP backends to accommodate various hosting and connectivity requirements. These kind definitions determine how the platform interacts with the upstream server.
The following backend kinds are defined in the system:
| Kind | Description |
|---|---|
hosted | A toolset hosted directly within the platform. |
remote | An external server reached via public or private networking. |
tunneled | A server connected via a secure tunnel. |
unproxied | A server where traffic does not pass through the Speakeasy proxy. |
built_in | Internal servers, such as the approvals server for agent requests. |
legacy | Support for older MCP implementations. |
Sources: server/internal/platformmcp/tools.go:21-33
Platform MCP Tooling
The Platform MCP server exposes a suite of management tools to AI assistants and external clients. These tools allow for discovery, inspection, and modification of the MCP environment.
Discovery and Inspection
list_projects: Retrieves projects accessible to the current principal.find_mcp: Searches for MCP servers by name, slug, ID, or source URL across the organization or within a project.get_mcp: Provides detailed configuration and tool exposure for a specific MCP server.get_mcp_readiness: Evaluates the current operational state of a server.
Sources: server/internal/platformmcp/tools.go:37-39, server/internal/platformmcp/tools.go:264-267, server/internal/platformmcp/tools.go:318-323
Lifecycle and Distribution
Administrators manage the progression of a server from registration to publication through a multi-stage process:
- Addition: Register the server to a specific project.
- Connection: Link the server to its OAuth provider.
- Verification: Confirm the server is working via readiness checks.
- Distribution: Add the server to a plugin.
- Publication: Publish the plugin to make tools available to users.
Sources: server/internal/platformmcp/tools.go:210-215
Security and Approval Flows
The system implements an interceptor pattern to protect sensitive tools. Protected tools require explicit authorization before execution, typically validated via environment variables or external API checks.
Approval Configuration
Tools requiring protection are identified by a prefix, such as protected_tool_. The validation logic checks the MCP_TOOL_APPROVAL environment variable for a non-empty token before authorizing the call.
Sources: examples/functions-approve/src/functions.ts:47-51, examples/functions-approve/src/functions.ts:114-121, examples/functions-approve/readme.md:43-55
Server Instructions and AI Drafting
Server instructions act as a "user manual" for LLMs, explaining how tools work together, required sequences, and operational constraints. These are distinct from individual tool descriptions.
- Drafting: The dashboard provides an AI-powered drafting feature that analyzes tool metadata to generate concise instructions.
- Storage: Instructions are stored as metadata linked to the MCP server ID.
- Usage: The system injects these instructions into the LLM context when the server is connected.
Sources: client/dashboard/src/pages/mcp/x/hosted/ServerInstructionsSection.tsx:32-35, client/dashboard/src/pages/mcp/x/hosted/ServerInstructionsSection.tsx:112-120
Networking and Connectivity
MCP servers can operate in multiple network modes. Administrators use specific tools to transition between public and private access.
| Mode | Description |
|---|---|
public_only | Accessible via standard public internet routes. |
dual | Accessible via both public and private networking. |
private_only | Restricted to organization-specific private networks (e.g., Tailscale). |
Before moving a server to private_only, the system requires calling get_network_ingress to verify readiness. If ready_for_private_access is false, the transition is refused, and repair instructions are provided.
Sources: server/internal/platformmcp/tools.go:226-231, server/internal/plugins/platform_mcp_skills/configure-private-mcp-access/SKILL.md:32-35
Skill and Toolset Management
Skills are reusable instruction sets loaded by assistants at runtime. Unlike toolsets, they do not act as MCP servers themselves but modify the behavior of the agent.
- Attachment: Skills are attached to assistants using
attach_skill. By default, they track the latest valid version. - Pinning: Users can pin specific versions of a skill if they require stability.
- Toolsets: Toolsets are bundles of tools (HTTP, Function, or MCP) that bind to an assistant's shared environment.
Sources: client/dashboard/src/pages/assistants/onboarding/systemPrompt.ts:60-64, client/dashboard/src/pages/assistants/onboarding/systemPrompt.ts:182-192
MCP Management in Speakeasy provides a robust framework for governing AI tool access. By combining flexible backend kind support with strict approval flows and clear server instructions, the platform ensures that agents operate safely and effectively within the enterprise environment.