mayurrawte

MCP Tool Call Card

AI chats

About

A status card that visualizes an MCP (Model Context Protocol) tool invocation through its idle, pending, running, done, error and cancelled states, with arguments, streamed result text and a retry action.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds MCP Tool Call Card to your project and fits it to your theme.

Code

How MCP Tool Call Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import McpToolCall from "@/components/ui/mcp-tool-call";
import { createToolState } from "@mcp-elements/core";

const state = createToolState();
state.start({ tool: "search", args: { query: "MCP protocol" } });

export default function McpToolCallDemo() {
  return (
    <div className="w-full max-w-md">
      <McpToolCall state={state} onRetry={() => state.reset()} />
    </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 AI chats

View all
  • AI Actions

    AI Actions

    372
  • Agent Chat

    Agent Chat

    21
  • Aquarium Prompt

    Aquarium Prompt

    212
  • Illos Knowledge Sources

    Illos Knowledge Sources

    71
  • AI SaaS Workflow Hero

    AI SaaS Workflow Hero

    32
  • AI Chat Composer

    AI Chat Composer

    17
  • AI Response

    AI Response

    16
  • Thumbs pour

    Thumbs pour