ui-mcp
Enables agents to render shadcn-styled dashboards, forms, charts, and comparisons in a local browser via MCP tools.
README
ui-mcp
MCP server that renders flexible, shadcn-styled UI in your local browser. Agents call render_ui to show dashboards, forms, charts, comparisons, and factual answers with numbers or spatial concepts — not just when building apps.
Quick start
npx ui-mcp init
This will:
- Register the MCP server in
.cursor/mcp.json(and.mcp.jsonfor Claude Code) - Append agent instructions to
AGENTS.md/CLAUDE.mdso the model defaults to rendering (re-runinitto refresh existing snippets)
Reload your editor MCP settings, then ask your agent to render something visual.
Tools
| Tool | Description |
|---|---|
render_ui |
Create and open a UI view in the browser |
update_ui |
Update an existing view by id |
list_ui_views |
List active views and URLs |
close_ui_view |
Remove a view |
Modes
html— HTML fragment, wrapped in shadcn/Tailwind shelljsx— React component (ApporComponent), compiled in-browser via Babelpage— Full HTML document (you control everything)
Style
The shell applies shadcn CSS variables and Tailwind semantic colors (bg-background, text-primary, etc.). The model is free to build any layout — no component whitelist.
Manual MCP config
{
"mcpServers": {
"ui-mcp": {
"command": "npx",
"args": ["-y", "ui-mcp"]
}
}
}
Environment
| Variable | Default | Description |
|---|---|---|
UI_MCP_PORT |
3847 |
Preferred backend port |
When should agents render?
There is no universal "after final answer" lifecycle hook across MCP clients. The reliable pattern is project instructions:
npx ui-mcp init— writes AGENTS.md / CLAUDE.md with a render-by-default policy- Cursor rules / project instructions — reinforce the behavior
Agents should call render_ui for most answers — especially numbers, measurements, comparisons, architecture, and workflows. Skip only for truly single-value replies (e.g. a port number) or when the user asks for text only. Re-run npx ui-mcp init to update an existing project's snippet in place.
Development
npm install
npm run build
node dist/bin/ui-mcp.js init
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.