Skip to main content
FITsociety MCP follows the same access-system shape as the QR access API: create access, validate/use access, audit usage, review signals, and revoke or rotate credentials. There are two subject surfaces:
  • Company/coach access is approved by a Manager or Admin coach and runs in company scope.
  • Client AI access is approved by the authenticated client and is bound to that one client through subjectType: "client" and subjectClientId. The company MCP integration feature must be enabled, and the client must be connected to the company with client AI access enabled.

API groups

QR access comparison

End-to-end flows

API-key grant flow

Company/coach OAuth connection flow

Client AI OAuth connection flow

When client AI access is disabled, the client portal may offer a request-access action. That request is an operational notification to the company; it is not an OAuth approval and does not create a grant. The company must enable client AI access before the client can complete MCP consent.

Tool call flow

The runtime supports modern MCP 2026-07-28 and stateless legacy requests for 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05. GET /mcp/v1 is delegated to the official transport and is not advertised as an SSE compatibility stream.

Key rotation flow

Revocation flow

Audit review flow

Grant activity flow

Anomaly review flow

Authentication matrix

Permission matrix

The runtime permission decision is based on these controls:

Response contracts

Management endpoints use the standard app API envelope:
Runtime MCP calls use JSON-RPC 2.0:
Runtime errors also use JSON-RPC:

Dashboard contract

GET /app/v1/company/mcp/metrics returns: Supported filters:

Audit filters

GET /app/v1/company/mcp/audit supports operational filters:

Grant activity timeline

GET /app/v1/company/mcp/grants/:grantId/activity returns a merged timeline for one connection. Items have a source field: This endpoint is intended for the connection detail page, where support or a coach needs to understand what happened to one MCP connection over time.

Error categories

Data model summary

Security rules

  • Plaintext API keys are returned once.
  • API keys and OAuth tokens are stored as hashes.
  • OAuth refresh tokens rotate on use.
  • Revoking a grant revokes associated OAuth tokens.
  • Audit logs do not expose argument values.
  • CSV export excludes sanitizedArguments.
  • Health modules require explicit health data consent.
  • Private communication modules require explicit consent.
  • Write access is opt-in per tool.
  • Runtime access is checked on every request, not only during grant creation.