Technical docs
MCP Servers
Public reference generated from tech docs/mcps.md.
Overview
Support reference for org MCP server management at `/mcps`.
What the page does
- Registers MCP servers at the organization level. - Lets staff enable or disable those servers per AI teammate from the AI teammate detail view. - Supports both: - `simple` MCP servers configured by URL and optional headers - predefined `oauth` MCP entries backed by connected user integrations
Current `/mcps` page behavior
- Page title: `MCP Servers`. - Primary action: `Add`. - Empty state: `No MCP servers`. - Table columns: `Name`, `Type`, `URL / OAuth`, `Headers`, `Added`, `Updated`. - Row actions: `Test`, `Edit`, `Delete`. - Bulk action: `Delete`. - Predefined OAuth MCP rows are always shown at the top of the table and are not selectable for bulk delete. - Current predefined OAuth MCP rows are: - `Gmail` - `Google Calendar` - `Google Drive` - If a predefined OAuth MCP is missing its required OAuth connection, the table shows a warning icon that links to `/integrations`.
Create and edit behavior
- Create dialog fields: - required `Name` - required `URL` - optional header key/value pairs - Create dialog title: `Add MCP Server`. - Create currently creates `simple` MCP servers only. - The create dialog only accepts `http://` and `https://` URLs. - The create dialog blocks duplicate names against the currently loaded org list, and the backend create action also rejects duplicate names. - Edit dialog behavior: - title: `Edit MCP Server` - shows immutable type badge: `Simple (HTTP URL)` or `OAuth` - `Type cannot be changed. Recreate the MCP server to switch type.` - simple MCPs can edit `Name`, `URL`, and headers - oauth MCPs can edit `Name` and the selected `oauth_mcp` - Backend notes: - create/update accept `type`, `url`, `headers`, and `oauth_mcp` - `name` uniqueness is enforced by the database on `(organization_id, name)`
Test behavior
- Testing starts automatically when the dialog opens. - Dialog title: `Test MCP Server`. - The current dialog shows: - success or error state - connected toolset names - per-toolset tool counts - tool badges - Success badge format: `Connected · {n} tools`. - Error payload is shown as plain text in the dialog. - Test requests now use `POST /api/organizations/{orgId}/mcps/test` with exactly one of: - `mcp_id` - `oauth_mcp`
AI teammate assignment
- AI teammate detail pages include an `MCPs` tab. - The tab lists both org `simple` MCP servers and predefined OAuth MCPs. - The current tab reads enabled assignments through `GET /api/organizations/{orgId}/mcps/employee/{employee_id}`. - Checking a box assigns that MCP to the teammate. - Unchecking a box removes the assignment. - Assignment/unassignment accepts exactly one of: - `mcp_id` - `oauth_mcp` - If an OAuth MCP requires Google and that integration is not connected for the current user, the tab shows a warning with a `Go to integrations →` link. - The checkbox flow is optimistic in the frontend.
Current API routes
- `GET /api/organizations/{orgId}/mcps` - `POST /api/organizations/{orgId}/mcps` - `GET /api/organizations/{orgId}/mcps/oauth` - `POST /api/organizations/{orgId}/mcps/test` - `GET /api/organizations/{orgId}/mcps/employee/{employee_id}` - `POST /api/organizations/{orgId}/mcps/employee/{employee_id}` - `DELETE /api/organizations/{orgId}/mcps/employee/{employee_id}` - `GET /api/organizations/{orgId}/mcps/mcp/{mcp_id}` - `PUT /api/organizations/{orgId}/mcps/mcp/{mcp_id}` - `DELETE /api/organizations/{orgId}/mcps/mcp/{mcp_id}`
Runtime notes
- Assigned MCP servers are loaded per AI teammate by `MCPBuilder`. - OAuth MCP definitions currently come from `OAuthMCPProvider` in the backend. - Runtime URL and header values go through organization-variable injection before the client is built for `simple` MCPs. - MCP list/create/get/update/test and assignment routes are AI-accessible through `system.do_organization_action`. - MCP delete remains human-only (`availableToAI: false`). - There is no websocket sync for MCP CRUD in the current org page; the frontend relies on React Query invalidation and refetches.