AgentUI

AgentUI

An MCP server that lets coding agents ask their human via interactive UIs like sliders, forms, diffs, and live previews.

Category
访问服务器

README

AgentUI

Interactive UIs for coding agents: an MCP server that lets any agent ask its human with sliders, forms, diffs and live previews instead of guessing.

When an agent is about to invent a number, describe a colour in prose, or write "let me know if you'd prefer…", it can instead open a real UI in your browser. You adjust it while the agent keeps working, and it collects the answer when it is ready.

Install

npx agentui install

The installer detects the agents on your machine — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code (Copilot), Gemini CLI, Codex CLI — and registers the server in each one's own config format.

The tools

Tool What it does
ui_ask One question, answered now — blocks until the user responds
ui_create Open a UI the user adjusts while the agent keeps working
ui_wait Long-poll: sleep until the user commits a change or comments
ui_get_state Non-blocking read of the current values
ui_update Change a live UI in place
ui_save / ui_library Save a widget and reuse it later
ui_close Close the session

Full usage guidance for agents lives in skills/agentui/SKILL.md.

How it works

One Node process launched by the agent over stdio, acting as both an MCP server and a local HTTP + WebSocket server bound to 127.0.0.1. The agent authors a zod-validated JSON interface spec, optionally alongside a single-file ESM preview module rendered in a sandboxed iframe on a second origin. All durable state is plain JSON/NDJSON under .agent-ui/, so the agent can also just read it off disk.

Agent ──stdio/MCP──> [agentui process] ──HTTP/WS──> Browser (React shell)
                            │                            │
                            └── .agent-ui/sessions/<id>/  └── sandboxed iframe (preview.mjs)

Opening a widget on your phone

Off by default, because binding to 127.0.0.1 is not a detail — it is the whole security model. There is no login anywhere in this server; loopback is what made one unnecessary.

Set AGENT_UI_HOST=lan in the env of your agent's MCP registration and restart it. On startup the server prints an address and a key:

Open on another device on this network:
  http://192.168.1.112:4608/?k=vckqvceqbzz7

Open that once on the phone; a cookie carries the key from then on, and the inbox lists whatever is waiting, so no one types a session id. If the address it picks is wrong — a VPN tunnel often outranks your real card — pin the right one with AGENT_UI_HOST=192.168.1.112.

What you are trading. Traffic is plain HTTP, because a self-signed certificate on a LAN address produces a full-page warning on exactly the phone this exists to serve. Anyone on that network holding the key can read what the agent attached — diffs, file contents, screenshots — and answer for you: their decision reaches your agent as though it were yours. That is a fair trade on a home network and a bad one on cafe or hotel wifi. Your phone also has to be on the same network; this does nothing over cellular.

Development

pnpm install
pnpm build      # shared -> ui -> server (vendors three.js, copies the shell into server/web)
pnpm test       # the server suite runs against the real built binary over stdio
pnpm typecheck

pnpm build before running anything: the server serves the built shell, and the installer registers the built dist/mcp.js by absolute path.

Examples in packages/server/examples/ are dogfood — each asks something real about this project, so building the tool and using it are the same activity.

The design decisions and their evidence live in the header comments of the files they affect, particularly packages/server/src/core/{waiters,session,library}.ts, packages/server/src/web/preview.ts and packages/ui/public/agentui/preview.js.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选