Component Code

Code with live parameters that you can change and see the component update.

Sollte ich dies verwenden

Qualität und Sicherheit

A
Qualität der Beschreibung
100%
Vollständigkeit des Schemas
100%
Qualität der Benennung
80%
Risiko der Vergiftung
100%
Übereinstimmung der Berechtigungen
100%
Einhaltung des Protokolls
100%

Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.

Kontextkosten

~909Tokens (Tool-Definitionen)
~4.3 KBTypische Antwortgröße
Mittlere Auswirkung auf die Aufmerksamkeit (0.71% von 128k Kontext)

Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.

Installieren

Installation mit einem Klick

Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:

{
  "mcpServers": {
    "component-code": {
      "command": "npx",
      "args": [
        "@fabiocv/component-code-mcp"
      ]
    }
  }
}

Ausführbare Pakete

npm@fabiocv/component-code-mcp0.6.4stdio

Remote-Endpunkte

https://mcp.fabio.cv/component-code/mcpstreamable-http

Was es kann

Tool-Inventar

Tools (2)

🟢 Nur lesen🟡 Schreiben🔴 Löschen⚪ Unbekannt
🟢component_code_show(source, code, file, controls)

Shows a React component in the chat in Component Code: a live preview beside the code that uses it. Each string, number and boolean in the code becomes a control the reader can change. Use it when someone asks to show a component in Component Code, or to see, preview or try one.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "description": "The component's module in TSX. It may import only from 'react'. Its exports, the default one by its function's name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value, and give that value `{ change: true }` in `controls`. Component Code passes it then, so the change shows in the code. Keep state of its own only for when the prop is missing."
    },
    "code": {
      "type": "string",
      "description": "How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control."
    },
    "file": {
      "description": "The file named in the code's tab, such as `Card.tsx`.",
      "type": "string"
    },
    "controls": {
      "description": "How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written. `{ change: true }` lets the component change it too, through its `on<Prop>Change`, and takes a list as `options`.",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "boolean",
            "const": false
          },
          {
            "type": "array",
            "items": {
              "type": [
                "string",
                "number"
              ]
            }
          },
          {
            "type": "object",
            "properties": {
              "min": {
                "type": "number"
              },
              "max": {
                "type": "number"
              },
              "step": {
                "type": "number"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": [
                    "string",
                    "number"
                  ]
                }
              },
              "change": {
                "type": "boolean"
              }
            }
          }
        ]
      }
    }
  },
  "required": [
    "source",
    "code"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢component_code_show_html(files, controls)

Shows HTML, CSS and JS running in the chat in Component Code: the page beside its code, with a tab for each file. The values named in `controls` become controls the reader can change. Use it when someone asks to show HTML, CSS, JS, a canvas or an SVG in Component Code, or for an experiment without React.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "files": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      },
      "description": "The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page's body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."
    },
    "controls": {
      "description": "The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "boolean",
            "const": true
          },
          {
            "type": "array",
            "items": {
              "type": [
                "string",
                "number"
              ]
            }
          },
          {
            "type": "object",
            "properties": {
              "min": {
                "type": "number"
              },
              "max": {
                "type": "number"
              },
              "step": {
                "type": "number"
              }
            }
          }
        ]
      }
    }
  },
  "required": [
    "files"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

Community

Diesen Server bewerten

Nachweis

Aktuelle Beobachtungen

verifiziertVersion nicht aufgezeichnet2 Tools