@frontmcp/react includes headless UI components that auto-generate forms from MCP tool/prompt schemas and display results. They render unstyled by default and support custom renderers.
ToolForm
Generates a form from a tool’sinputSchema.
Props
What a field shows is what is submitted. An enum field starts at its schema
default, or at its first option when it is required. An optional enum without a default starts unset — the <select> offers an empty choice — and is left out of the arguments until the user picks a value. An empty optional field of any type is left out.
Custom Field Rendering
FieldRenderProps
PromptForm
Generates a form from a prompt’sarguments array.
Props
ResourceViewer
Displays the contents of aReadResourceResult.
Props
JSON content (
application/json mimeType) is automatically pretty-printed in a <pre> block.
OutputDisplay
Renders any tool/prompt output as formatted JSON or plain text.Props
DynamicRenderer
Recursively renders aComponentNode tree using the ComponentRegistry.
Resolution Order
- Exact URI match in registry
component://{type}in registryelement://{type}in registry- Fallback component (or
<div>)
ComponentRegistry
Maps URI protocols to React components. Used byDynamicRenderer and populated via the provider’s components prop.
Deprecated: AgentContent and AgentSearch
These components are deprecated. UsemcpComponent() instead — see Agent Components for full details, props, and migration.