Version 1.0 · Effective 2026-09-12 · Owner: Ailysi OS — Platform Governance
This document governs the Ailysi Model Context Protocol (MCP) server — the interface through which external AI clients (Claude, ChatGPT, Cursor, and custom MCP-compatible clients) connect to and act on Ailysi platform data on behalf of an authenticated app user.
The Ailysi MCP server is published at /api/mcp on the app's own domain. It exposes the platform's capabilities as discrete tools — one per entity operation, one per exposed in-app agent, and one per explicitly registered custom function tool. The server is generated from base44/mcp/config.json and is active only on the published app. It is not a separate service, proxy, or parallel data store.
Access is OAuth-gated (auth: "oauth"). There is no anonymous or public path. An AI client never holds a standing platform credential; instead, each connection opens the Ailysi consent page (/oauth/consent), where the end user signs in with their own Ailysi account and explicitly approves the access request. The assistant only ever acts as that signed-in user — every tool call inherits that user's role, tenant scope, and Row-Level Security (RLS) permissions.
Least-privilege by construction: the MCP layer adds no privileges the user does not already have in the app. A tenant user can never reach another tenant's records through MCP, because RLS governs every tool call the same way it governs every in-app action.
End users discover how to connect an AI client via the in-app /connect page, which resolves the live server URL from the active domain and provides setup steps for Claude, ChatGPT, Cursor, and custom clients. The OAuth consent page (/oauth/consent) lists the concrete tools the client will be granted and posts an atomic approve/deny decision. A consent handle is single-use; once consumed it cannot be replayed.
Any authenticated Ailysi user may connect an AI client. Access is scoped by the user's role (admin / partner / user) and tenant membership. No role or tenant is elevated by connecting through MCP — the protocol is a transport, not an authority.
The MCP tool surface is engineered to the minimum an AI client needs, with PII, financial, and internal-log data protected by explicit overrides. Exposure is opt-out: every entity and agent is exposed by default unless narrowed here.
The published tool set is partitioned into three tiers:
["read"] — the AI can look up but never mutate. Applied to all PII business records (applicants, partners, employers, reservations, PCC, interviews, agreements, invoices) and all financial/commission ledgers.[] — no tool is generated; the entity is invisible to AI clients. Applied to internal config, governance, workflow, automation, credential-bearing, and all log/audit entities.The following classes are never writable, and most are not exposed at all, via MCP:
TadbeerApplicant, PartnerAgent, EmployerProfile, DualPartner, InterviewFeedback, SuccessStory — read-only.
FinancialLedger, CommissionLedger, PlacementCommission, PayoutRequest, AffiliatePayout, Invoice — read-only.
UaePassIdentity/SigningEvent/AuditLog, ESignatureRecord, WhatsAppBusinessNumber, SocialAccount — opted out entirely.
AuditLog, GovernanceAuditLog, AeonLog, AutomationLog, UserSession, OrchestratorState, MCPConnectorLog — opted out entirely.
In-app agents are exposed as message_<agent> tools, gated by the signed-in user's permissions. The copilot agent is excluded (excluded_agents) to prevent autonomous execution paths from being reachable through the external MCP surface. Agent names are frozen at publish; agent behavior (prompt, tools, skills) remains live.
No backend function is exposed as a custom MCP tool by default. Functions that mutate state, trigger deployments, or move money are deliberately excluded from the external surface. Adding a function tool requires a governed change request (§3.4), an explicit tools.functions[] entry with a hand-authored input schema, and honest destructive/idempotent annotations.
Defence in depth: tool-surface narrowing limits what an AI client can even see; RLS limits what any given call can reach. A breach of one layer does not bypass the other.
The MCP server is a published, versioned surface. This section defines change management, token invalidation, audit, incident response, and review cadence.
Only the published config is active. Any edit to base44/mcp/config.json — including an opt-out narrowing or a new entity auto-exposed at the next publish — requires republishing the app. Under opt-out, publishing an app with a new entity or agent is itself a surface change and is treated identically to an explicit config edit.
Every change to the exposed tool set invalidates the OAuth tokens held by connected AI clients. Each client must re-authorize after a surface change. Communicated changes therefore carry a re-authorization obligation; the /connect page includes a "refresh the connector after we ship changes" notice to set this expectation with end users.
MCP tool calls execute as the signed-in user and are subject to the same audit logging as in-app actions. Consent grant/deny decisions are atomic and single-use; a consumed handle cannot be replayed. Platform-side MCPConnectorLog (itself opted-out of the tool surface) records connection events for administrative review.
base44/mcp/config.json via protected-branch PR with admin approval.If a tool surface is found over-exposed (e.g. a PII entity missing an override), immediately narrow it to read-only or [], republish, and notify all connected clients to re-authorize. Revoke suspect user sessions via the platform admin. Document the incident in the governance audit log.
This document and base44/mcp/config.json are reviewed quarterly, and ad-hoc whenever a new entity, agent, or function is added to the platform. The review confirms that every new capability received an explicit override decision rather than inheriting full CRUD exposure by default.
End of document · Ailysi MCP Governance Document v1.0 · 2026-09-12 · Internal · Tenant-Admin