Cursor
Cursor activates context through .cursor/rules/*.mdc rule files and reads MCP servers configured in ~/.cursor/mcp.json.
Where to place DESIGN.md
Keep the canonical DESIGN.md at the repository root so CLI lint checks and other agents share one file, and add a .cursor/rules/design-system.mdc file to control when Cursor loads it:
my-app/
├── DESIGN.md
└── .cursor/
└── rules/
└── design-system.mdcOn any site in DesignMD Pro Discovery, selecting Cursor in the Use this design card downloads a ready-to-drop {slug}-design-system.mdc file with alwaysApply: true.
Configure .cursor/rules/design-system.mdc
Option A: Path-scoped wrapper (recommended for full-stack repos)
Keep DESIGN.md as the single edited source and point Cursor to it only when editing UI files:
---
description: Project design system (DESIGN.md) — apply to all UI components and pages
globs:
- "src/components/**/*.tsx"
- "src/app/**/*.tsx"
- "src/app/**/*.css"
alwaysApply: false
---
Follow the design tokens, spacing scale, typography, and Do's and Don'ts defined in `DESIGN.md` at the repository root. Never invent hex colors or border radii outside the spec.Option B: Self-contained always-on .mdc rule
If you exported {slug}-design-system.mdc directly from DesignMD Pro, place it in .cursor/rules/:
---
description: Meridian Workspace design system (DESIGN.md) — apply to all UI work
globs:
alwaysApply: true
---
Follow the Meridian Workspace design system below for every UI change. Use its tokens instead of inventing new values, and follow its Do's and Don'ts.
```markdown
---
version: alpha
name: Meridian Workspace
...
---
```Connect the DesignMD Pro MCP server
Add designmdpro to ~/.cursor/mcp.json (or .cursor/mcp.json inside a team workspace without committing personal secrets):
{
"mcpServers": {
"designmdpro": {
"url": "https://designmdpro.app/mcp"
}
}
}With a Pro API key (dmdp_… from Account → API Keys):
{
"mcpServers": {
"designmdpro": {
"url": "https://designmdpro.app/mcp",
"headers": {
"Authorization": "Bearer dmdp_your_api_key"
}
}
}
}Restart Cursor or refresh MCP servers in Cursor Settings → Tools & MCP after editing mcp.json.
Prompt templates
@DESIGN.md Refactor the settings card layout to match the Surface, Shapes, and
Elevation & Depth rules. Keep all hex values mapped to defined color tokens.Using the designmdpro MCP server, search for developer-tool design systems,
inspect the Colors and Typography sections of the closest match, and list
which tokens differ from our current DESIGN.md.Common pitfalls
- Using deprecated
.cursorruleswithout globs: legacy single-file.cursorrulesinjects design tokens into database migrations and backend tests. Use.cursor/rules/design-system.mdcwithglobsinstead. - Duplicating tokens in
.mdcandDESIGN.md: if you keep a standaloneDESIGN.mdfor@google/design.md lint, reference it from.mdcrather than maintaining two copies by hand.
Next steps
- MCP Server Reference — tools, annotations, and authentication tiers
- Tailwind CSS & shadcn/ui Integration — map tokens to CSS variables in your project
- Complete Example — full starter
DESIGN.mdfile