AI Integration
Mobiscroll provides a set of machine-readable documentation files and AI behavior rules that enable coding assistants to generate accurate, framework-specific code. These files prevent common AI issues like hallucinated APIs, mixed framework imports, and outdated patterns.
Why AI integration?
AI coding assistants work best when they have access to structured, authoritative documentation. Without it, they often:
- Hallucinate APIs — invent option names, events, or types that don't exist
- Mix frameworks — use React hooks in Angular code, or jQuery patterns in Vue
- Reference outdated versions — generate v5 code when the current version is v6
- Ignore framework conventions — skip
MbscModuleimports in Angular, or use wrong CSS loading patterns
The Mobiscroll AI integration solves these problems by providing documentation optimized for AI consumption, combined with behavior rules that enforce framework isolation and correct API usage.
Architecture overview
The integration consists of three layers:
Data layer — llms files
Machine-readable documentation files containing the complete Mobiscroll API reference and guides, one per framework. These are the source of truth that AI tools read to answer questions.
| File | Description |
|---|---|
llms-angular-full.txt | Complete Angular documentation |
llms-angular.txt | Angular table of contents (links to individual pages) |
llms-icons.txt | Icon names (IcoMoon, Font Awesome, Ionicons) — all frameworks |
You don't need to download or host these files — the rules files and the Claude Code plugin reference them directly and fetch their content automatically.
Rules layer — rules files
Rules files provide Mobiscroll context to Cursor and GitHub Copilot only. Claude Code uses the Mobiscroll plugin instead — no manual file setup needed.
Two approaches are available:
- Option A — file-based context loading. A rules file (
.mdcfor Cursor,.instructions.mdfor Copilot) contains API documentation and behavior rules. No MCP server required. - Option B — live schema fetching via MCP server. Extended rule files instruct the AI to call the Mobiscroll MCP server for live component schema lookups on each generation. Suited for interactive coding agents that need per-query precision.
Choose based on your preference and setup.
Files
Option A — file-based rules:
| File | Format | For |
|---|---|---|
mobiscroll-angular.mdc | Cursor rule file | Cursor |
copilot-instructions/mobiscroll-angular.instructions.md | Copilot instruction file | GitHub Copilot |
Option B — extended rules with MCP:
| File | Format | For |
|---|---|---|
| mobiscroll-ui.mdc | Cursor extended rule (orchestrator) | Cursor |
| mobiscroll-ui-angular.mdc | Cursor extended rule (Angular) | Cursor |
| mobiscroll-ui-theming.mdc | Cursor extended rule (theming) | Cursor |
| mobiscroll-ui.instructions.md | Copilot extended instruction (orchestrator) | GitHub Copilot |
| mobiscroll-ui-angular.instructions.md | Copilot extended instruction (Angular) | GitHub Copilot |
| mobiscroll-ui-theming.instructions.md | Copilot extended instruction (theming) | GitHub Copilot |
Which tool uses which files?
| Tool | Approach | Files used |
|---|---|---|
| Cursor | Option A | mobiscroll-angular.mdc |
| Cursor | Option B | mobiscroll-ui.mdc, mobiscroll-ui-angular.mdc, mobiscroll-ui-theming.mdc |
| GitHub Copilot | Option A | mobiscroll-angular.instructions.md |
| GitHub Copilot | Option B | mobiscroll-ui.instructions.md, mobiscroll-ui-angular.instructions.md, mobiscroll-ui-theming.instructions.md |
Cursor setup
Step 1: Register documentation sources
Open Cursor Settings → Indexing & Docs and add the documentation source for your framework:
| Framework | Name | URL |
|---|---|---|
| Angular | Mobiscroll Angular | https://dev.mobiscroll.com/docs/llms-angular-full.txt |
Only register the source matching your use case. Do not register multiple sources — this prevents cross-domain contamination.
Step 2: Add behavior rules
Choose one approach — Option A works immediately with no additional setup; Option B adds live MCP schema lookups for higher accuracy but requires the MCP server to be configured.
Option A — .mdc rules file
Download the mobiscroll-angular.mdc file and place it in .cursor/rules/:
your-project/
├── .cursor/
│ └── rules/
│ └ ── mobiscroll-angular.mdc
├── src/
└── package.json
The .mdc file provides text-based API rules — no additional setup required.
Option B — Extended rule files + MCP (3 files)
Download the three extended rule files and place them in .cursor/rules/:
- mobiscroll-ui.mdc (orchestrator)
- mobiscroll-ui-angular.mdc (Angular conventions)
- mobiscroll-ui-theming.mdc (theming)
your-project/
├── .cursor/
│ └── rules/
│ ├── mobiscroll-ui.mdc
│ ├── mobiscroll-ui-angular.mdc
│ └── mobiscroll-ui-theming.mdc
├── src/
└── package.json
Unlike Option A, these rule files instruct Cursor's AI to call the Mobiscroll MCP server for live component schema lookups on each generation — so it always uses the current API instead of guessing from memory.
Rule activation
The extended .mdc files use alwaysApply: false with a description in their frontmatter. Cursor reads the description and activates the rule only when the context is relevant — the rule is not included in every message. You can also trigger it manually with @rule-name (e.g. @mobiscroll-ui). The .mdc format works in all Cursor modes including Agent mode.
Step 3: Configure MCP server (Optional)
Configure the Mobiscroll MCP server so the extended rules can call it for live schema lookups.
Create or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"mobiscroll": {
"url": "https://mcp.dev.mobiscroll.com/"
}
}
}
type fieldCursor infers the transport type from the URL. Do not add "type": "http" to Cursor's config — it causes an error.
your-project/
├── .cursor/
│ ├── mcp.json
│ └── rules/
│ ├── mobiscroll-ui.mdc
│ ├── mobiscroll-ui-angular.mdc