aegov-mcp

v0.2.2
io.github.dlsforge/aegov-mcp Checked 2 days ago Published 4 months ago

UAE Design System (AEGOV DLS) for AI assistants: components, tokens, validation.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ping Ping

Health check for the AEGOV DLS MCP server. Returns 'pong', echoing back an optional message. Use to confirm the server is connected.

ParameterTypeDescription
messagestringOptional message to echo back

listComponents List UAE Design System components

List every artifact of the UAE Design System (AEGOV DLS) this server can describe: package components (authoritative classes + official markup), blocks, patterns, and docs-only components. Call this first to discover what exists and the exact identifier to pass to getComponent. Package-tier data is authoritative for the pinned @aegov/design-system version; docs-tier data comes from designsystem.gov.ae and is provisional. When building a full page, note the standard page furniture: every UAE government page carries the header block, the footer block, and the page-rating block ('Did you find thi…

getComponent Get a UAE Design System component

Return the full official record for one UAE Design System (AEGOV DLS) artifact: canonical markup, variant examples (copy these rather than inventing markup), rules (accessibility, RTL/bilingual, usage), class inventory and provenance. Accepts a component class-root ('aegov-btn'), a docs name ('Button', 'Checkbox'), a block or pattern id ('header', 'emirates-id-input'), or any member class ('aegov-check-item'). Use listComponents to discover identifiers. Always respect the returned rules; markup must keep the official aegov-* classes.

ParameterTypeDescription
name *stringComponent class-root, docs name, block/pattern id, or member class (case-insensitive)

getTokens Get UAE Design System design tokens

Return the UAE Design System's resolved design tokens (CSS custom properties) from the pinned @aegov/design-system package: colours (OKLCH palettes incl. semantic primary/secondary), typography scale, fonts, shadows and container widths. Generated markup must use these tokens or the aegov-* component classes built on them — never arbitrary hard-coded values. Filter by category and/or a name substring (e.g. category 'color', query 'primary').

ParameterTypeDescription
categorystringToken category to filter by
querystringCase-insensitive substring of the token name, e.g. 'primary'

scaffoldUaePass Scaffold a UAE Pass button

Generate official-guideline UAE Pass button markup (UAE Pass is the mandatory national digital identity — any government login must use it). Emits AEGOV DLS classes with the documented wording, appearance and logo rules from docs.uaepass.ae, the OAuth2 authorize URL template with staging/production endpoints, and links to the official logo assets. Returns bilingual (English + Arabic) markup by default; Arabic strings are generated and flagged for native review. Follow the returned rules and notes — they are the standard, not suggestions.

ParameterTypeDescription
appearancestringPermitted appearances only. black: for white/light backgrounds; white: for dark or colored backgrounds with sufficient contrast; outline: light backgrounds where the white fill lacks contrast
environmentstringUAE Pass OAuth2 environment for the endpoint set
languagestringMarkup language(s). 'both' returns English and Arabic (RTL) variants
radiusstringDocumented corner-radius options: default (standard, 12px), rectangle (minimum), pill (maximum)
variantstringDocumented button wording: sign-in/sign-up (authentication; never both on one page), login (synonym flow — don't mix with sign-in wording), continue (document sharing — requires user disclosure),…

scaffoldEmiratesId Scaffold an Emirates ID input

Generate the standard Emirates ID form control (AEGOV DLS aegov-form-control): accepts 15 raw digits, auto-formats to the printed-card format 784-XXXX-XXXXXXX-X, validates the mandatory pattern ^784-\d{4}-\d{7}-\d$, bilingual labels, plus a masked display (784-1945-XXXXXXX-X) with an explicit reveal control. Emirates ID format, masking and pattern validation are non-negotiable for UAE government services — use this scaffold rather than hand-rolling. Returns html, the auto-format script, the masked-display snippet, and the official pattern rules.

ParameterTypeDescription
idstringHTML id/name for the input (also prefixes the hint and display ids)
languagestringLabel/hint language(s). 'both' emits bilingual labels (English + Arabic)
maskedDisplaybooleanInclude the masked read-back display + reveal control snippet

validate_snippet Validate an HTML snippet against the UAE Design System

Validate generated HTML against the AEGOV DLS: verifies every aegov-* class against the pinned @aegov/design-system version (certain), checks other classes against official docs-example usage (best-effort), and runs UAE-specific checks — Emirates ID inputs must validate ^784-\d{4}-\d{7}-\d$ and displayed IDs must be masked, images need alt, Arabic content needs RTL handling, dates must be DMY (day/month/year, never month-first). If the snippet is a documented block (it carries aegov-header or aegov-footer), it is also checked against that block's conformance contract — the mobile menu affo…

ParameterTypeDescription
html *stringThe HTML snippet to validate