CLEARER / AI DEVELOPERS
A small, scoped bridge
to learning.
Clearer’s optional hosted MCP connection lets an authorized AI client read learning context and create a practice for the signed-in learner.
Availability and endpoint
This integration is optional and is available to learners who connect it. It is gated and is
available only when the hosted service is started with CLEARER_AI_TUTOR_ENABLED=1.
The stable MCP endpoint is /mcp. The flag must remain off where the feature is not
intentionally enabled.
OAuth and permissions
Clients discover OAuth through /.well-known/oauth-protected-resource/mcp and
/.well-known/oauth-authorization-server. Use dynamic client registration, a public
client (token_endpoint_auth_method: none), authorization code with PKCE S256, and
the exact HTTPS MCP URL as resource on authorization and token requests. The
available scopes are learning:read and practice:write. Consent is
shown to the learner; existing provider consent and usage controls continue to apply.
Authorization can be revoked from the learner’s AI connections page.
Tools and practice creation
The MCP tools are get_learning_context, create_practice,
list_practices and get_practice_result. Context contains learning
observations and their evidence limits. Result reads never start or repeat analysis. Practice
creation accepts title, text, kind and
request_id, plus an optional objective. The supported kinds are
reading and own_words. A successful creation returns a Clearer
practice link at /ai/practice/{id}.
Keep titles within 160 characters, practice text within 4,000, and the objective within 1,000.
Choose a unique request identifier of 8–100 characters; reuse the same identifier and content
after a timeout. Changed content with the same identifier returns a conflict. Save the returned
practice ID, or use list_practices to find it in a later conversation.
A lesson loop
- Read learning context and preserve its uncertainty when suggesting a focus.
- Ask the learner before saving a short reading or own-words task.
- Call
create_practiceand show itscapture_urlas a link. - The learner records in Clearer using their current analysis settings and allowance.
-
Read
get_practice_resultafter the learner returns. Respect pending, unavailable, and error states.
The same delegated bearer token can call GET /api/ai-context,
GET /api/ai-practices, POST /api/ai-practices,
GET /api/ai-practices/{id}, and GET /api/ai-practices/{id}/result.
Read routes require learning:read; creation requires practice:write.
It cannot authorize ordinary account, upload, settings, or audio routes. A 401 requires
reconnecting or refreshing an expired token; a 429 requires backing off before retrying.
Practice creation is an explicit write to the learner’s Clearer account. It does not by itself record voice or indicate completion. Voice captured in the AI client is not automatically imported into Clearer. Raw clip access and streaming are not part of this integration.