Local docs MCP for your AI coding assistant
Status: planned. This page describes how the local documentation MCP server is intended to work. It is not available yet — the commands and configuration below are a design reference, not a shipped feature.
When you build with Modula components in your own codebase, your AI coding assistant works best when it knows the exact API of every component. The local docs MCP is a small Model Context Protocol (MCP) server you run on your own machine that exposes the documentation of the components you have installed — and nothing else.
It is deliberately narrow: it only reads component documentation. It never creates projects, never bundles code, never uploads anything, and needs no account. If you want an AI to assemble finished content for you through a hosted connection, that is the remote Connect MCP server — a different service.
What it does
Instead of guessing an API from its training data, your assistant reads each component’s real Custom Elements Manifest through the server: the exact tag names, attributes, slots, events, and CSS custom properties. The markup it writes uses the components the way they are actually built.
- Read-only. It exposes documentation and nothing else — no side effects on your project or on any server.
- Local and offline. It reads the docs of the components already installed in your project, so it works without a network connection.
- Private. No account, no token, no data leaves your machine.
- Scoped to your install. It surfaces only the components you actually have, not the entire catalog.
How it should work
The server reads the documentation of the Modula components resolved in the current project — the ones you added with the modula CLI or installed from npm — and serves them over the MCP stdio transport, the standard way local editors and CLIs launch an MCP server as a child process.
Because everything is local and read-only, there is no OAuth flow and no remote endpoint: the assistant spawns the server, asks for documentation, and reads the answer.
Running it
Start the server from the root of a project that has Modula components installed:
modula mcp It runs in the foreground and speaks MCP over stdio, so you normally don’t launch it by hand — your coding assistant starts it for you from the configuration below.
Connecting your assistant
Because the server runs locally over stdio, you point your assistant at the command instead of a URL.
Claude Code
claude mcp add modula-docs -- modula mcp Cursor / GitHub Copilot / Codex
Add the server to your editor’s MCP configuration file (for example .cursor/mcp.json or .vscode/mcp.json):
{
"mcpServers": {
"modula-docs": {
"command": "modula",
"args": ["mcp"]
}
}
} Commit the file to share the setup with your team — there are no secrets in it.
What the assistant can do
The server exposes read-only tools scoped to your installed components:
| Tool | What it does |
|---|---|
list_components | Lists the Modula components installed in the current project |
search_components | Finds components by keyword across name and description |
get_component_docs | Returns the full documentation (attributes, slots, events, CSS custom properties) for a component |
get_component_examples | Returns usage snippets for a component |
In a coding session
Once connected, ask for what you need in plain language:
> Using the Modula docs, add a timeline component to this page with three events, and set its attributes correctly. The assistant looks up the timeline component through the local server, reads its real API, and writes the correct markup — offline, without leaving your editor.