MCP Server (AI Integration)
Atomic CSS provides an MCP (Model Context Protocol) server for AI assistants. AI tools like Claude, Cursor, and Windsurf can programmatically look up and use Atomic CSS classes.
What is MCP?
MCP (Model Context Protocol) is a standard protocol that allows AI models to access external tools and data. By connecting the Atomic CSS MCP server, AI can look up exact class names, search classes by CSS properties, and validate classes.
df jcc aicSetup
Register the MCP server with your project or AI tool.
Streamable HTTP (recommended) — the standard transport in the current MCP spec. Endpoint: https://mcp.atomiccss.dev/mcp
SSE (legacy) — deprecated in the current MCP spec, but still served for backward compatibility with older clients. Endpoint: https://mcp.atomiccss.dev/sse
.mcp.json (Project Config)
Create a .mcp.json file at the project root so AI automatically recognizes the MCP server for the project. This is the recommended method as it can be shared with team members.
{
"mcpServers": {
"atomic-css": {
"type": "http",
"url": "https://mcp.atomiccss.dev/mcp"
}
}
}If your client does not support Streamable HTTP yet, use the legacy SSE configuration.
{
"mcpServers": {
"atomic-css": {
"type": "http",
"url": "https://mcp.atomiccss.dev/mcp"
}
}
}Note: Project-scoped MCP servers show an approval prompt on first use.
Add via CLI
You can also register the MCP server directly from the terminal.
# Add via Claude Code (Streamable HTTP, recommended)
claude mcp add --transport http atomic-css https://mcp.atomiccss.dev/mcp
# Add to project scope (saved in .mcp.json)
claude mcp add --transport http --scope project atomic-css https://mcp.atomiccss.dev/mcp
# Add to user scope (available in all projects)
claude mcp add --transport http --scope user atomic-css https://mcp.atomiccss.dev/mcp
# Legacy SSE transport (fallback for older clients)
claude mcp add --transport sse atomic-css https://mcp.atomiccss.dev/sseClaude Desktop
In the Claude Desktop app, add it to the settings file.
{
"mcpServers": {
"atomic-css": {
"type": "http",
"url": "https://mcp.atomiccss.dev/mcp"
}
}
}Cursor
In Cursor, add it via Settings > MCP Servers.
{
"name": "atomic-css",
"url": "https://mcp.atomiccss.dev/mcp"
}Scope Comparison
| Scope | Location | Sharing | Usage |
|---|---|---|---|
project | Project root .mcp.json | Yes (shared via git) | Team sharing, per-project settings (recommended) |
local | ~/.claude.json | X | Personal settings, current project only |
user | ~/.claude.json | X | Available in all projects |
Available Tools
Once the MCP server is connected, AI automatically uses the tools below. Users do not need to call them directly.
| Tool | Description |
|---|---|
get_guide | Returns the full Atomic CSS usage guide (naming rules, units, media queries, pseudo-classes, etc.) |
lookup_class | Class name to CSS output lookup (supports multiple classes at once) |
search_by_css | Search Atomic CSS classes by CSS property/value |
css_to_classes | Convert CSS code to Atomic CSS classes |
validate_classes | Class validation + similar class suggestions |
list_classes | List classes by category |
Tip: When giving AI its first Atomic CSS task, instruct it to "call get_guide first to learn the rules" for more accurate class generation.
Tool Reference (Input → Output)
Actual input and output for each tool. Any LLM can generate and validate Atomic CSS immediately from these examples.
The input/output examples below are copied verbatim from the live server (v1.2.0). Note that the server returns its response text in Korean.
get_guideCall once. Learn the naming rules, workflow, and full class map in one shot.(none)OutputAtomic CSS full guide: naming rules, workflow, class mapcss_to_classesWhen you have CSS in mind → convert it to the matching Atomic classes.display: flex; gap: 20px; padding: 16pxOutput변환 결과 (3개):
display: flex → df
gap: 20px → gap20px
padding: 16px → p16px
클래스 조합: df gap20px p16pxvalidate_classesCheck whether your classes are valid. Invalid ones come back with the reason and a suggested fix.df jcm gap2remOutput2개 유효, 1개 무효
✗ 무효한 클래스:
jcm — 인식할 수 없는 클래스
추천: jcc, cm, jcfslookup_classSee the exact CSS a specific class produces.dfi gap2remOutputdfi → .dfi { display:flex !important; }
gap2rem → .gap2rem { row-gap: 2rem; column-gap: 2rem; }search_by_cssFind classes for a desired CSS property/value.justify-contentOutput7개 결과:
jcfs → justify-content:flex-start
jcfe → justify-content:flex-end
jcc → justify-content:center
jcsb → justify-content:space-between
jcsa → justify-content:space-around
jcse → justify-content:space-evenly
jc--<var> → justify-content: var(--<var>) (단위 필요)list_classesBrowse all classes in a category (flexbox, grid, spacing, etc.).flexboxOutput[flexbox] 24개:
df dif fa fi fdr fdrr fdc fdcr fwn fww fwr fgu
jcfs jcfe acfs acfe aifs aife asfs asfe
fshi fshu jife jsfeRecommended LLM Workflow
Any language model can generate Atomic CSS correctly with these 3 steps. Once you know the rules, writing classes directly (no tool call) is fastest.
1. Learn — call get_guide once to learn the naming rules and the whole class system.
2. Write — write classes directly if you know the rules (fastest). If unsure, convert CSS with css_to_classes or find them with search_by_css.
3. Validate — pass all your classes to validate_classes, then fix any invalid ones using the suggestions.
Rules to Use Atomic CSS 100%
These are the core rules get_guide passes to the LLM. Follow them and any UI can be built with Atomic CSS alone.
Style 100% with Atomic classes — no inline style attribute, no separate CSS files.
No CSS on semantic classes — class="product-card" is for JS/semantics only; apply visual styles with Atomic classes.
Load atomic.min.css last — after any existing CSS, to win the cascade.
Grid-first layout — reach for dg + gtc first.
Unit rule — px below 20px, rem at/above 20px (1rem = 10px). Any unit/value is allowed, though.
Spacing in multiples of 4 (recommended) — 4·8·12·16·20·24·32… (a recommendation, not a rule — values are entirely free).
Good example — semantic class + Atomic classes
<!-- Semantic class (JS/meaning) + Atomic classes (all visual style) -->
<section class="product-card dg gtcr3-1fr gap2rem p2rem bg0F0F17 br8px">
<article class="df fdc gap12px">
<img class="w100p h20rem ofc br8px" src="photo.jpg" />
<h3 class="fs1-8rem fw700 cFAFAFA">Title</h3>
<p class="fs14px c71717A lh1-7">Description text</p>
</article>
</section>
<!-- Load atomic.min.css LAST so it wins the cascade -->
<link rel="stylesheet" href="/css/your-styles.css" />
<link rel="stylesheet" href="/assets/css/atomic.min.css" />Official MCP Registry
The Atomic CSS MCP server is registered in the official MCP Registry. You can integrate directly with just the URL https://mcp.atomiccss.dev/mcp — no installation required.
| Registry ID | io.github.Yoodaekyung/atomic-css |
| Status | Active |
| Connection URL | https://mcp.atomiccss.dev/mcp |
No authentication required: It is a public API anyone can use immediately. Just add the URL to your settings.
Server Info
| URL | https://mcp.atomiccss.dev |
| Streamable HTTP Endpoint | https://mcp.atomiccss.dev/mcp |
| SSE Endpoint (legacy) | https://mcp.atomiccss.dev/sse |
| Protocol | Streamable HTTP (recommended) / SSE (legacy, deprecated) |
| Authentication | Open access by default, no credentials needed. The server supports Bearer-token API key authentication (MCP_API_KEY), but it is not configured on the public server, so you can connect without any auth header. |
| Rate Limit | 100 requests per minute per IP. Exceeding it returns 429 with a Retry-After header. The /health path is exempt. |