About
A form that auto-generates its text, number, select, switch and textarea fields from a JSON Schema, used to let a user fill in arguments before calling an MCP tool.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds MCP Tool Form to your project and fits it to your theme.
Code
How MCP Tool Form is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { McpToolForm } from "@/components/ui/mcp-tool-form";
const schema = {
type: "object",
properties: {
query: { type: "string", description: "Search query" },
limit: { type: "number", default: 10, description: "Max results" },
},
required: ["query"],
};
export default function McpToolFormDemo() {
return (
<div className="w-full max-w-sm">
<McpToolForm
schema={schema}
onSubmit={(values) => console.log(values)}
submitLabel="Search"
/>
</div>
);
}
















![Form [react-aria-components]](https://cdn.21st.dev/cdn-cgi/image/fit=scale-down,width=640,quality=75,format=webp/https://cdn.21st.dev/user_jolbol1/field/814/preview.png)