Overview — choosing a surface
StyleRef exposes several surfaces for agents and automation. This page helps you pick the right one for what you’re building. Each row links to its section.
Choose a surface
| You want to… | Use | Why |
|---|---|---|
| Let an interactive agent find and apply styles at runtime | MCP server | Live tools, resources, and prompts inside the agent conversation |
| Script or automate from CI, a job, or a backend | REST API | Plain HTTP, anonymous reads, OpenAPI contract |
| Pull or validate styles from the terminal | CLI | npx styleref — no setup, wraps the REST API |
| Teach an agent when and how to use styles | Agent Skill | Instruction layer that pairs with MCP |
| Let an LLM browse the whole product | llms.txt | Machine-readable site index and raw markdown |
| Pin a project’s style for coding agents | STYLE.md | A committed style contract in the repo |
How they relate
The MCP server and the REST API expose the same core read capability — search a style, compile it to a format, get a STYLE.md, validate a STYLE.md. MCP adds account-scoped actions (save, fork, create, extract, publish) and an interactive surface; REST is stateless HTTP for scripts. The CLI wraps the REST API for the terminal. The Agent Skill is instructions, not data — it tells an agent when to reach for the MCP tools. llms.txt and STYLE.md are static surfaces: one indexes the product for crawlers, the other pins a style in a repo.
Next steps
- Connect your client — set up MCP.
- REST API overview — start with HTTP.
- CLI — the terminal path.
Last updated on