MCPServer, a React component under views/, and a tool bound to that View. The mcp-use framework includes a Vite-based build system that discovers, builds, and serves your Views in development and production.
MCP Apps let your tools render interactive UI inside AI conversations. Build a View when users need to explore data, complete a form, review a preview, or act on a tool result.
How a tool renders a View
Addview: { name } to a tool definition. The name must match a directory under views/.
outputSchema. Its handler returns a normal MCP tool result with matching structuredContent.
Read the tool result in the View
A View default-exports a React component. The component receives no React props. Read the tool lifecycle and result withuseToolContext().
Choose what the model and View receive
MCP tool results provide separate channels for conversation output, structured data, and View-only metadata.
Do not place secrets in any result channel. A View runs on the client and can read its result data.
Continue building
Build your first MCP App
Create a project, run it locally, and render its View in the Inspector.
Interactivity
Call tools, open links, send follow-up messages, and change display modes.
Model context
Expose View state and visible UI information to future model turns.
Content Security Policy
Allow the external APIs, assets, and embedded content your View needs.