Registry: MCP
What a registry has to serve for the newtui MCP server to browse, search and install from it.
The MCP server answers from whichever registry the project’s
components.json names. Point that at your own registry and every tool follows
— there is nothing extra to configure.
{
"registry": "https://acme.dev/r"
}
What the tools need
| Tool | Reads |
|---|---|
list_items_in_registries |
/index.json |
search_items_in_registries |
/index.json — matched against name, title, description |
view_items_in_registries |
/styles/<style>/<name>.json, with files[].content |
get_item_examples_from_registries |
index entries of type registry:example |
get_design_tokens |
/styles/<style>/theme-newt.json, with cssVars |
Two of those are worth stating plainly, because a registry that omits them still installs fine from the CLI and reads as empty to an agent:
- Give every item a
titleand adescription. They are what search matches on and what an agent uses to choose between two components. An item with neither can only be found by knowing its name already. - Ship your examples. An item of type
registry:examplenamed<component>-demois whatget_item_examples_from_registriesreturns. It is the shortest correct usage of the component, and it is what stops a model inventing a prop.
Tokens
get_design_tokens reads the registry:theme item named theme-newt and
returns its cssVars. A registry that extends newt/ui usually re-serves that
item unchanged; one that replaces the palette serves its own values under the
same item name, and every answer the agent gives follows the new palette.
See registry-item.json for the shape.
Checking it
curl -s https://acme.dev/r/index.json | head -40
npx newtui@latest search --registry https://acme.dev/r
npx newtui@latest view button --registry https://acme.dev/r
If those three answer, the MCP tools will too — they read the same two files.