mayurrawte

MCP Tool Form

Forms

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>
  );
}

Dependencies

More by mayurrawte

View all
  • Feedback Buttons

    Feedback Buttons

    4
  • Streaming Text

    Streaming Text

    4
  • MCP Scope Inspector

    MCP Scope Inspector

    2
  • Tooltip

    Tooltip

    2
  • Accordion

    Accordion

    2
  • Skeleton

    Skeleton

    2
  • Loader

    Loader

    2
  • Dialog

    Dialog

    1

More in Forms

View all
  • Form

    Form

    7
  • Contact Form

    Contact Form

    32
  • Login 2

    Login 2

    16
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    94
  • Paper Plane

    Paper Plane

    80
  • Premium Auth

    Premium Auth

    613
  • Authentication Card

    Authentication Card

    52