Docs · MCP

The MCP server

Fieldbook exposes a remote Model Context Protocol server so an agent in Claude Code, Cursor, ChatGPT or any MCP client can do from the editor what a person does on this site: search the library, read a component in React or any of its ports, pull the install command, apply the design guidance, and score a page against the ruleset before shipping it.

Endpoint

https://fieldbook.lizardi.mx/api/mcp

Authentication

Every request carries a bearer token. Two kinds work:

  • API key (available now)

    Create a key in your dashboard and send it as Authorization: Bearer fb_live_…. Keys are shown once; only a hash is stored.

  • Clerk OAuth (when configured)

    OAuth-capable clients discover the authorization server from /.well-known/oauth-protected-resource and authenticate interactively. No manual key needed.

Connect

Claude Code

claude mcp add --transport http fieldbook https://fieldbook.lizardi.mx/api/mcp --header "Authorization: Bearer <YOUR_KEY>"

Cursor · ~/.cursor/mcp.json

{
  "mcpServers": {
    "fieldbook": {
      "url": "https://fieldbook.lizardi.mx/api/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_KEY>"
      }
    }
  }
}

ChatGPT connector. Add a custom connector pointing at https://fieldbook.lizardi.mx/api/mcp and paste an API key as the bearer token when prompted.

MCP Inspector. Run the inspector, enter the endpoint, and set an Authorization: Bearer header to explore the tools interactively.

MCP Inspector

npx @modelcontextprotocol/inspector

Tools

Metered tools spend credits from your monthly allowance (the owner plan is unmetered). Everything else is free and rate-limited per key.

  • search_componentsFree

    query?, category?, framework?, maxSlopScore?, limit (max 25)

    Search the library; returns summaries with tested frameworks, slop score, plate, controls count and install commands.

  • get_component1 credit

    slug, framework (default react)

    Source for one framework: React returns the component and its demo; ports return one file. Includes controls, dependencies, slop reading, security scan, install command.

  • list_frameworksFree

    slug

    Which frameworks a component ships in, and which ports are still pending.

  • get_install_commandFree

    slug, framework (default react)

    shadcn install command, registry URL, and a components.json snippet.

  • get_design_guidanceFree

    query?, domain?, stack?, productType?, limit?

    Search the anti-slop guidance corpus.

  • generate_design_system2 credits

    productType, keywords?, stack?, variance?, motion?, density?

    Generate a non-generic design system: palette, type, layout, motion, UX rules, checklist.

  • get_slop_rulesFree

    category?

    The versioned trope ruleset (number, title, severity, hard-fail, rationale).

  • get_font_guidanceFree

    role?, family?, name?

    How each recommended typeface looks and behaves, with tested pairings and the principles behind them.

  • suggest_alternativesFree

    ruleId

    Antidotes for a trope plus the relevant antidote catalog.

  • score_pageFree

    html? | url?

    Score a page against the ruleset (URL fetched behind an SSRF guard).

Registry

The library is a shadcn registry: install any component directly, or wire the whole registry once in components.json and add with @fieldbook/<name>. Set FIELDBOOK_TOKEN for metered pulls.

components.json

{
  "registries": {
    "@fieldbook": {
      "url": "https://fieldbook.lizardi.mx/r/react/{name}.json",
      "headers": {
        "Authorization": "Bearer ${FIELDBOOK_TOKEN}"
      }
    }
  }
}

A machine-readable index of the site and these endpoints lives at /llms.txt.