ui-mcp

ui-mcp

Enables agents to render shadcn-styled dashboards, forms, charts, and comparisons in a local browser via MCP tools.

Category
Visit Server

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:

  1. Register the MCP server in .cursor/mcp.json (and .mcp.json for Claude Code)
  2. Append agent instructions to AGENTS.md / CLAUDE.md so the model defaults to rendering (re-run init to 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 shell
  • jsx — React component (App or Component), compiled in-browser via Babel
  • page — 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:

  1. npx ui-mcp init — writes AGENTS.md / CLAUDE.md with a render-by-default policy
  2. 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured