MPDS-MCP
Allows GitHub Copilot to manage design system resources such as tokens, components, patterns, and validation through MCP.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MPDS-MCPvalidate color contrast #333333 on #FFFFFF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MPDS-MCP
Multi-Project Design System MCP Server — an HTTP server that exposes design tokens, component specs, and validation utilities via a JSON REST API and an MCP JSON-RPC endpoint. Multiple design-system projects can coexist, each with parent-child inheritance for token resolution.
Architecture
modules/
mcp-server/ # Express HTTP server (this binary, port MCP_PORT)
registry/ # Project CRUD (SQLite-backed)
tokens/ # Token storage, overrides, semantic resolution
components/ # Component spec storage and overrides
patterns/ # Pattern library: patterns, variants, composition rules, layout guidelines
validate/ # Color-pair + snippet validation
preview/ # HTML showcase generator (generate_showcase MCP tool)
db/ # Shared SQLite connection + migrationsRelated MCP server: ds-mcp
Inheritance model
Every project carries a nullable parentId (registry):
A project with
parentId = nullis a base design system.A project with a
parentIdis a child that inherits from its base and may override individual tokens, component-spec fields, and patterns.Inheritance is two levels deep only — creating a child of a child is rejected with
MAX_INHERITANCE_DEPTH(no grandchildren).A base cannot be deleted while it still has children (
BASE_HAS_CHILDREN), and a project cannot be deleted while it still owns tokens (PROJECT_HAS_TOKENS).
graph TD
Base["<b>Base design system</b><br/>parentId = null"]
ChildA["<b>Child: Brand A</b><br/>parentId = Base"]
ChildB["<b>Child: Brand B</b><br/>parentId = Base"]
GC(["Grandchild<br/>❌ MAX_INHERITANCE_DEPTH"])
Base --> ChildA
Base --> ChildB
ChildA -. rejected .-> GC
classDef base fill:#1f4e5f,stroke:#0d2b36,color:#fff;
classDef child fill:#2d6a4f,stroke:#1b4332,color:#fff;
classDef bad fill:#7f1d1d,stroke:#450a0a,color:#fff,stroke-dasharray: 4 3;
class Base base;
class ChildA,ChildB child;
class GC bad;How values resolve
resolveTokens (and the equivalent component/pattern resolvers) merge the base
layer with the child's own layer. For a base project every value is tagged
source: "base"; for a child the base values are inherited and any keys the
child defines win, tagged source: "override":
flowchart LR
subgraph BASE["Base project (parent)"]
BA["color.primary = #1f4e5f"]
BB["color.surface = #ffffff"]
BC["radius.md = 8px"]
end
subgraph CHILD["Child project (own layer)"]
OA["color.primary = #2d6a4f"]
end
BASE -->|"inherited (source: base)"| R
CHILD -->|"overrides (source: override)"| R
subgraph R["resolveTokens(child) → resolved set"]
RA["color.primary = #2d6a4f (override)"]
RB["color.surface = #ffffff (base)"]
RC["radius.md = 8px (base)"]
endResolution order is: start from the parent's values, then apply the child's own values by key — so a child key of the same name replaces the inherited one while every un-overridden base key flows through unchanged.
Running locally
Prerequisites
Node.js 20+ and npm
A writable directory for the SQLite DB (or use
:memory:for a transient session)
Start (development)
npm ci
MCP_SECRET=dev DB_PATH=/tmp/mpds-dev.db MCP_PORT=3100 \
npm --prefix modules/mcp-server run devHealth check:
curl http://localhost:3100/health
# → {"status":"ok"}Start (production build)
npm ci
npm --prefix modules/mcp-server run build
MCP_SECRET=<secret> DB_PATH=/home/mpds/data/mpds.db MPDS_ENV=production \
npm --prefix modules/mcp-server startEnvironment variables
Variable | Required | Default | Description |
| Yes (production) |
| Bearer token — every |
| Yes | — | SQLite file path or |
| No | random port | TCP port the server listens on |
| No | — | Set to |
| No (set by OS/Docker) | — | Used for allowed DB path prefix validation |
API endpoints
All endpoints (except /health) require Authorization: Bearer <MCP_SECRET>.
Error envelope: { "error": { "code": "...", "message": "..." } }
Health
GET /healthProjects
GET /api/projects
POST /api/projects body: { id, name, parentId? }
GET /api/projects/:id
DELETE /api/projects/:idTokens
GET /api/projects/:projectId/tokens
PUT /api/projects/:projectId/tokens/:key body: { value, description? }
DELETE /api/projects/:projectId/tokens/:key/overrideComponents
GET /api/projects/:projectId/components
GET /api/projects/:projectId/components/:componentId
PUT /api/projects/:projectId/components/:componentId/override
DELETE /api/projects/:projectId/components/:componentId/overrideValidation
POST /api/validate/color-pair body: { foreground, background }Patterns
GET /api/projects/:projectId/patterns
POST /api/projects/:projectId/patterns body: { id, name, category, description?, tags?, guidanceUrl? }
GET /api/projects/:projectId/patterns/:patternId
PATCH /api/projects/:projectId/patterns/:patternId body: { name?, description?, tags?, guidanceUrl? }
DELETE /api/projects/:projectId/patterns/:patternIdPattern variants
GET /api/projects/:projectId/patterns/:patternId/variants
POST /api/projects/:projectId/patterns/:patternId/variants body: { name, appliesAt, description? }
GET /api/projects/:projectId/patterns/:patternId/variants/:variantId
PATCH /api/projects/:projectId/patterns/:patternId/variants/:variantId
DELETE /api/projects/:projectId/patterns/:patternId/variants/:variantIdComposition rules
GET /api/projects/:projectId/composition-rules
POST /api/projects/:projectId/composition-rules body: { patternAId, patternBId, relation, guidance? }
DELETE /api/projects/:projectId/composition-rules/:ruleIdrelation enum: NESTING_ALLOWED | NESTING_FORBIDDEN | OVERRIDE_CAUTION | SIBLING_ONLY | EXCLUSIVE
Layout guidelines
GET /api/projects/:projectId/layout-guidelines
POST /api/projects/:projectId/layout-guidelines body: { type, name, description?, data }
GET /api/projects/:projectId/layout-guidelines/:guidelineId
PATCH /api/projects/:projectId/layout-guidelines/:guidelineId
DELETE /api/projects/:projectId/layout-guidelines/:guidelineIdtype enum: breakpoints | spacing | grid | alignment | typography | animation
See contracts/P1/ and contracts/P2/ for the full frozen OpenAPI specs.
MCP configuration
The server exposes a JSON-RPC 2.0 endpoint at POST /mcp (requires the same Authorization: Bearer <MCP_SECRET> header as the REST API). Configure it in your MCP client as an HTTP server.
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)
{
"mcpServers": {
"mpds": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3100/mcp"],
"env": {
"MCP_REMOTE_HEADER_AUTHORIZATION": "Bearer <MCP_SECRET>"
}
}
}
}Claude Code (.claude/settings.json in your project)
{
"mcpServers": {
"mpds": {
"type": "http",
"url": "http://localhost:3100/mcp",
"headers": {
"Authorization": "Bearer <MCP_SECRET>"
}
}
}
}GitHub Copilot (.vscode/mcp.json in your workspace)
{
"inputs": [
{
"type": "promptString",
"id": "mpds_secret",
"description": "MPDS MCP bearer token",
"password": true
}
],
"servers": {
"mpds": {
"type": "http",
"url": "http://localhost:3100/mcp",
"headers": {
"Authorization": "Bearer ${input:mpds_secret}"
}
}
}
}The input block causes VS Code to prompt for the secret once per session and store it in the system keychain. To skip the prompt, replace ${input:mpds_secret} with the token literal (not recommended for shared workspaces).
OpenCode (opencode.json in your project root, or ~/.config/opencode/opencode.json globally)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mpds": {
"type": "remote",
"url": "http://localhost:3100/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer <MCP_SECRET>"
}
}
}
}To avoid hard-coding the secret, reference an environment variable using OpenCode's {env:VAR} interpolation:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mpds": {
"type": "remote",
"url": "http://localhost:3100/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:MCP_SECRET}"
}
}
}
}Available MCP methods
Read & validate
Method | Description | Required params |
| List all design-system projects | — |
| Resolve tokens for a project (with inheritance) |
|
| Full token map + component specs |
|
| Single component spec |
|
| WCAG contrast ratio |
|
| Contrast check using token keys |
|
| Lint HTML/JSX for a11y issues |
|
| Create a design guideline |
|
| Full-text search guidelines |
|
| Propose a token value change for review |
|
| List pending token proposals |
|
Write — projects & tokens
Method | Description | Required params |
| Create a project |
|
| Rename a project |
|
| Delete a project |
|
| List all tokens for a project |
|
| Get a single token |
|
| Create a token |
|
| Update a token value (OCC) |
|
| Set/override a token value |
|
| Delete a token (OCC) |
|
| Remove a child project override |
|
Write — components
Method | Description | Required params |
| Create a component spec |
|
| Update a component spec (OCC) |
|
| Delete a component spec |
|
Write — pattern library
Method | Description | Required params |
| Create a pattern |
|
| Update a pattern |
|
| Delete a pattern |
|
| Add a variant to a pattern |
|
| Update a variant |
|
| Delete a variant |
|
| Define a pattern relationship |
|
| Remove a composition rule |
|
| Create a layout guideline |
|
| Update a layout guideline |
|
| Delete a layout guideline |
|
Showcase
Method | Description | Required params |
| Generate a self-contained HTML design system preview (color palette, component gallery, pattern library) |
|
# Save and open the showcase locally
curl -s http://localhost:3100/mcp \
-H "Authorization: Bearer <MCP_SECRET>" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"generate_showcase","params":{"projectId":"my-ds"}}' \
| jq -r '.result.html' > /tmp/showcase.html && open /tmp/showcase.htmlAll requests follow JSON-RPC 2.0:
curl -s http://localhost:3100/mcp \
-H "Authorization: Bearer <MCP_SECRET>" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"list_projects","params":{}}' | jqRunning tests
Tests use an in-memory SQLite database and require no external services:
DB_PATH=:memory: MCP_SECRET=test npm testDocker
docker build -t mpds-mcp .
docker run -p 3100:3100 \
-e MCP_SECRET=<secret> \
-e DB_PATH=/home/mpds/data/mpds.db \
-v $(pwd)/data:/home/mpds/data \
mpds-mcpSee INSTALL.md for full setup and docker-compose instructions.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Product Management
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server that exposes your design system components and tokens to AI agents, preventing duplicate component creation and hardcoded token values.5 npm9MIT
- AlicenseNot gradedqualityAmaintenanceA read-only MCP server that provides AI coding agents with a queryable contract for design system tokens, components, patterns, and anti-patterns.6 npm1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceAn MCP server that gives AI assistants structured access to a design system's tokens, components, guidelines, and patterns, enabling them to read, lint, and author design system data.1MIT
- AlicenseAqualityCmaintenanceMCP server that gives LLMs deep knowledge of design systems and tokens, enabling intelligent design evolution, token analysis, and designer-to-developer handoffs.375 npm2MIT