D-03 MCP Registry
Brick D: Tools, skills, plugins, MCP, connectors. French version: D-03-mcp-registry
1. Role and responsibilities
References approved Model Context Protocol servers and their discovered tools.
- Register a server (transport, url, auth)
- Discover tools via tools/list
- Per server tool allow list
2. Position in the architecture and interactions
- Callers: Portal, manifests (spec.mcp_servers).
- Execution path: Synchronous.
- Every interaction goes through the Control Plane API v1 (
/v1) behind the API Gateway (D-14).
3. Open source component and developed part
- Open source: MCP SDK
- Developed: Registry, discovery, approval.
- External integration through an adapter
eai/integrations/<system>.pywith an in-process fallback when the URL is not configured.
4. Data model
Tables (schema eai, tenant_id RLS):
eai.mcp_servers
Common columns: id uuid, tenant_id uuid NOT NULL, created_at, updated_at; RLS policy current_setting('app.tenant_id', true)::uuid.
5. Contract
- Applied contract: agent-manifest
- JSON Schema:
contracts/v1/agent-manifest.schema.json - Key fields:
spec.mcp_servers[] - Validation:
POST /v1/contracts/{name}/validate; manifest apply:POST /v1/manifests/apply.
6. API endpoints
GET /v1/mcp/serversPOST /v1/mcp/serversDELETE /v1/mcp/servers/{id}GET /v1/mcp/servers/{id}/tools
Request POST /v1/mcp/servers:
{
"name": "github",
"transport": "streamable_http",
"url": "https://<mcp-host>/github",
"credential_ref": "secret/mcp/github",
"allowed_tools": [
"search_issues"
]
}
Response:
{
"id": "mcp_2",
"status": "active",
"tools_discovered": 14
}
7. SDK examples
Python:
from enterprise_ai import EnterpriseAI
client = EnterpriseAI(base_url="<control-plane-url>", api_key="eai_xxx_secret")
client.mcp.register_server(name="github", transport="streamable_http", url="https://<mcp-host>/github")
TypeScript:
import { EnterpriseAI } from "@enterprise-ai/sdk";
const client = new EnterpriseAI({ baseUrl: "<control-plane-url>", apiKey: process.env.EAI_API_KEY });
await client.mcp.registerServer({ name: "github", url: "https://<mcp-host>/github" });
Java:
EnterpriseAIClient client = EnterpriseAIClient.builder()
.baseUrl("<control-plane-url>")
.apiKey(System.getenv("EAI_API_KEY"))
.build();
client.mcp().listServers().create("github", "https://<mcp-host>/github");
Go:
c, _ := eai.NewClient(eai.WithBaseURL("<control-plane-url>"), eai.WithAPIKey(os.Getenv("EAI_API_KEY")))
c.MCP.CreateServer(ctx, map[string]any{"name": "github", "url": "https://<mcp-host>/github"})
8. Configuration
- Environment variables:
EAI_DATABASE_URL - Helm values keys:
controlPlane.config,controlPlane.secrets
9. Security controls
- stdio servers forbidden outside the sandbox
- Credential by OpenBao reference
- Every request carries the tenant resolved from the credential; PostgreSQL RLS
- Every mutation and policy decision writes a hash-chained audit event
10. Observability
- Prometheus metrics:
eai_mcp_servers{status} - Traces: OpenTelemetry spans with GenAI semantic conventions (
gen_ai.operation.name,gen_ai.agent.id,gen_ai.tool.name), attributeseai.tenant_id,eai.run_id,traceparentpropagation. - Audit actions:
mcp.server.register,mcp.server.delete
11. FinOps units
- No direct cost.
- Emitted as Usage Event (
POST /v1/finops/usage) with tenant, project, agent and run.
12. Failure modes and resilience
- Discovery failure: server in degraded state
- Normalized errors (error envelope, message_i18n en/fr)
13. Standalone adoption (client of a client)
- enterprise_ai.mcp.
- SDK:
enterprise_ai.tools / mcp / skills / plugins / connectors / channels - Minimal deployment: Helm chart with
controlPlane.enabled=trueand PostgreSQL; disabled external components use their in-process fallback.
14. Acceptance tests
- Tools outside the allow list not exposed
- Cross-tenant access refused
- Error returned in fr with Accept-Language: fr
Kit L3 proof
Catalogue: POST /v1/mcp/servers/{server_id}/discover runs the MCP protocol (initialize, tools/list) and stores each tool with its input and output schemas, scopes, server and protocol versions (table eai.mcp_tool_versions, V156). The first version and every schema change open an approval (mcp_tool_version); GET /v1/mcp/catalog exposes versions and statuses (pending_approval, approved, rejected). Proof against a real MCP server (official Python SDK): tests/test_mcp_catalog_real.py.