mdma

v0.3.1
io.github.MobileReality/mdma Checked 2 hours ago Published 1 month ago

MCP server for MDMA — exposes spec, prompts, docs, and package metadata to AI assistants.

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

get-spec

Returns the full MDMA specification: component types, schemas (as JSON Schema), binding syntax, external data sources ({ source, params } refs, the DataSourceDescriptor shape, and the rows / series / options kinds), and authoring rules

get-prompt

Returns a named MDMA prompt (mdma-author, mdma-reviewer, or mdma-fixer). For mdma-author, pass an optional variantId (e.g. "anthropic/sonnet-5.5", "openai/gpt-6-sol") to get the model-optimised variant — use list-prompt-variants to see all available ids.

ParameterTypeDescription
name *stringPrompt name: mdma-author, mdma-reviewer, or mdma-fixer
variantIdstringModel-specific variant id for mdma-author (e.g. "google/gemini-2.5-pro", "openai/gpt-5"). Falls back to the default variant if omitted or unknown.

list-prompt-variants

Returns all available MDMA_AUTHOR prompt variants with their id, label, and description. Pass the id to get-prompt as variantId to retrieve the model-optimised prompt.

build-system-prompt

Generates a custom MDMA prompt from structured input (domain, components, fields, steps). Returns only the custom prompt part — use buildSystemPrompt({ customPrompt }) in code to combine it with the base MDMA spec. When dataSources (an external data-source catalog) is passed, returns the full system prompt instead: base MDMA spec, the data-source catalog with the rule to reference it via { source, params }, and the custom part.

ParameterTypeDescription
businessRulesstringBusiness rules or constraints
componentsarrayComponent types to use (e.g. ["form", "approval-gate", "webhook"])
dataSourcesarrayExternal data-source catalog. Each entry: name, optional description, kind ("rows" for table.data, "series" for chart.data, "options" for form select options), optional columns [{ key, type: string|nu…
domainstringDomain context (e.g. "HR onboarding", "expense approval")
fieldsarrayForm field definitions
stepsarrayMulti-step flow definitions — each step becomes a separate conversation turn

validate-prompt

Validates a custom prompt against MDMA conventions. Returns warnings for anti-patterns and suggestions for improvements.

ParameterTypeDescription
prompt *stringThe custom prompt text to validate

list-packages

Returns all MDMA npm packages with their purpose, install command, usage example, and category

list-docs

Returns the catalog of MDMA documentation files available for fetching from the public GitHub repo (path, title, description). Use this to discover what docs you can pass to get-doc.

get-doc

Fetches the latest version of an MDMA documentation file from the public GitHub repo (raw.githubusercontent.com/MobileReality/mdma) and returns its contents as text. Allowed paths: any entry from list-docs, plus any *.md file under "docs/" or "blueprints/". Defaults to the "main" branch.

ParameterTypeDescription
path *stringRepo-relative path to the doc, e.g. "docs/getting-started/quick-start.md" or "blueprints/kyc-case/README.md"
refstringGit ref (branch, tag, or commit SHA). Defaults to "main".