Guides

Editor and MCP

A component library defines a fixed set of props, variants and tokens. An assistant that generates a screen from training data guesses at that set. The Model Context Protocol (MCP) lets the assistant read it from the library instead.

What MCP is#

The Model Context Protocol is an open standard for connecting assistants to tools and data through a declared interface. A server publishes its operations and the shape of their inputs and outputs. A client (an editor, an agent or a chat interface) discovers those operations when it connects and calls them while it works.

Without MCP, context is pushed to the model: someone pastes documentation into a prompt, and the model works from whatever fits in that window. With MCP, the model requests context when it needs it, as structured data it does not have to extract from prose.

MCP is an open protocol, not a vendor's plugin format, so one server works with every compatible client. You do not need a separate extension for each editor.

The problem it solves#

Ask an assistant for a date picker and it will write one. The code usually looks correct: a plausible import path, sensibly named props and a variant that a design system might have. It often fails to compile, because none of those details came from your library. They were predicted from many similar libraries.

A better prompt does not fix this. A prop that is common in similar libraries is a likely prediction whether or not your version has it, and the model cannot tell the difference. The model answers from a fixed training snapshot, and your component API is not in it.

Design systems suit MCP well because most of what an assistant needs is already machine-readable. Props are defined as types. Variants are a finite set. Tokens live in configuration. The server needs nothing the library does not already define.

What a server exposes#

A server exposes the parts that can be checked. A component's props and their types, so an invented prop is rejected before build time. Its variants, so a value outside the set fails immediately. The design tokens behind it, so a generated screen uses the brand values instead of hard-coded hex codes. Its accessibility requirements, such as which elements need a label and what the keyboard must reach, because generated components most often omit these.

Versions matter too. A question about a library is a question about a library at a specific version. A server answers for the version you have installed, not the release that was current when the model was trained.

Connecting an editor#

The server runs at https://mcp.orvain.dev and takes the licence key from your purchase as a bearer token. In Cursor, add one entry to ~/.cursor/mcp.json:

~/.cursor/mcp.json
{
"mcpServers": {
"orvain": {
"url": "https://mcp.orvain.dev",
"headers": {
"Authorization": "Bearer <your-licence-key>"
}
}
}
}

In Claude Code, run one command:

Terminal
claude mcp add --transport http orvain https://mcp.orvain.dev --header "Authorization: Bearer <your-licence-key>"
The assistant then discovers the server's tools automatically. You do not need a special prompt. Ask for a screen and the assistant calls the tools it needs.

What it will not do#

It does not make an assistant good at design. A server can report that a component takes a size prop with three values. It cannot tell you which one suits the page you are building. Layout, hierarchy and other design decisions remain yours.

It does not replace code review. Output validated against the schema uses only props and imports that exist. That does not mean the code is correct.

It does not replace documentation for people. People need to know why and when to use a component. Agents need its exact API. This page serves the first need, and the server serves the second.

Questions#

What is the Model Context Protocol?

MCP is an open standard for connecting AI assistants to external tools and data through a structured interface. A server declares its operations and the shape of their inputs and outputs. A client, such as an editor or agent, discovers those operations when it connects and calls them during a task. Instead of pasting context into a prompt, the assistant fetches what it needs.

Why does an AI coding assistant invent component props?

The assistant predicts plausible code from a fixed snapshot of public repositories. It does not read the library you installed. A prop that is common in similar libraries is a likely prediction whether or not your version has it, and the model cannot tell the difference. The fix is a source of truth the model can query.

Which editors and tools support MCP?

Any tool that implements the client side of the protocol. Cursor, Claude Code and Windsurf support it directly, and the list has grown since the specification was published. Because MCP is an open protocol and not a vendor plugin API, one server works with every compatible client.

Is an MCP server different from a documentation site?

Yes. Documentation is written for people, and a model only sees it in whatever form it was scraped. An MCP server returns the component API as structured data on request, for a specific version. An agent can check that a prop exists before writing it, instead of finding out when the build fails.