Connect your AI

Modula exposes a Model Context Protocol (MCP) server that any compatible AI assistant can connect to. Once connected, the AI gains access to the full Modula toolset — it can look up the block types, build pages block by block, and deliver production-ready interactive lessons — all from a natural-language prompt.

The MCP server

The Modula MCP server is available at:

https://modula.dev/mcp

It uses the Streamable HTTP transport — a single HTTPS endpoint that accepts POST requests. This is the modern MCP transport and is supported by all major AI clients.

How authentication works

The server uses OAuth 2.1 with PKCE. The first time your AI calls a Modula tool in a session, it opens a browser window to complete the Modula login flow. Once you sign in and grant permission, the connection is established and persists for that session.

You only authenticate once per client — subsequent sessions use a refresh token automatically.

What the AI can do once connected

ToolWhat it does
get_schema_instructionsReturns the instructions for building a kind of page (a lesson, a presentation, …) from blocks
list_typesReturns the block types available to you, with their variants
design_blocksDescribes the blocks the AI is about to write (a text, a gallery, panels holding other blocks, …) and returns the exact form of their content
edit_blocksCreates or edits those blocks: returns updated data and stable ids and opens them in an editor
export_blocksExports the updated blocks as one HTML fragment per block, in order, plus the shared script; the AI composes the page. For an LMS it also returns the SCORM manifest and tracking script
open_documentReads a Modula HTML file’s contents and returns its ordered blocks, ids and metadata so the AI can resume editing
save_documentReturns a complete HTML file with editable source and the script included, ready to save and reopen in the Modula editor
get_theming_instructionsReturns the colour tokens of a page, which the AI sets as CSS custom properties
ai_respondAnswers a request for AI help made inside a block editor, using your assistant’s model
submit_support_ticketSends a support ticket on your behalf

To continue working on a Modula document, provide its HTML file contents to your assistant. After editing, the assistant can return a complete file for you to save or download. These document tools do not read local file paths, fetch URLs or store documents on the server.

Supported AI clients

AI clientConnection method
Claude.aiSettings → Customize → Connectors
Claude DesignInherits connectors from Claude.ai
Claude CodeCLI command or ~/.claude.json config
ChatGPTSettings → Apps & Connectors (plans and workspaces that allow custom apps in Developer Mode)
Codexcodex.json config file
CursorSettings → Features → MCP
GitHub CopilotVS Code settings or mcp.json config

Select your AI client from the list above or from the sidebar for step-by-step setup instructions.