perron-mcp

v0.2.7
@mylder/perron-mcp Checked 1 day ago Published 1 month ago

The Perron MCP server: Perron's tokens, docs and pinned library references for agents.

The Perron MCP server. It answers an agent's questions about Perron's tokens, its docs, its components and patterns, and the API of the Base UI and MUI versions a project installs, so the agent reads exact, small answers instead of the sources. It runs over stdio. In a project's .mcp.json: The tokens, docs and components come from the data that @mylder/perron ships in data/, so they match the installed Perron. The references come from the docs bundled inside @base-ui/react and @mui/material in the project's node_modules.

Summary extracted from the README.

@mylder/perron-mcp

The Perron MCP server. It answers an agent's questions about Perron's tokens, its docs, its components and patterns, and the API of the Base UI and MUI versions a project installs, so the agent reads exact, small answers instead of the sources.

npx @mylder/perron-mcp

It runs over stdio. In a project's .mcp.json:

{ "mcpServers": { "perron": { "command": "npx", "args": ["-y", "@mylder/perron-mcp"] } } }

The tokens, docs and components come from the data that @mylder/perron ships in data/, so they match the installed Perron. The references come from the docs bundled inside @base-ui/react and @mui/material in the project's node_modules.

Tools

Each tool takes dir, the project folder to read from as an absolute path, such as a git worktree an agent works in while the server runs from another checkout; the server's own project is the default. The data is read again when it changes, so a token rebuilt mid-session shows.

list_tokens

Every token's name, type, CSS custom property, value in each theme, the token it aliases, its reduced-motion value and what it is for. query keeps the tokens whose name or description holds all its words (surface warning); type keeps one DTCG type (color).

search_docs

The sections of the foundation pages, content design, the glossary and the component contract that best match query, in full. limit sets how many, 3 by default.

list_components

Every component and pattern, one JSON line each: its name, layer, category, status, the entry that replaces it when it is deprecated, and what it is in one sentence. query keeps the entries that hold any of its words (turn a setting on or off), ranked by how well they match: a word few entries hold counts for more than a common one, and a word of the name breaks a tie; layer keeps component or pattern, and category one category (Inputs).

get_component

One component or pattern by name (Button, or link-button), as JSON: its summary and import line; when to use it, and the entries to use instead, each with when; its props, each with its type, default, description and @deprecated text; its rules, the rows of its spec's Do and don't, each with an id (DD-2), a level (must, never broken, or should, broken only with a reason) and what checks it (types, the compiler, or review, which nothing catches, so check those yourself); the mistakes agents have made with it; and its docs page. An unknown name answers with the nearest names.

get_reference

The API reference of a component, from the installed package's own docs: library is base-ui or mui, component is a name such as Select or TextField, and part (or Select.Positioner) narrows it to one part. Base UI gives the page's API reference section; MUI gives its API pages, such as Select API. Use it before the hosted docs, which describe the latest release rather than the installed one.