mcp

v3.11.0
@buildpad/mcp Checked 7 hours ago Published 6 days ago

Model Context Protocol server for Buildpad components - enables AI agents to discover and use Buildpad packages

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_components

List all available Buildpad components with metadata

ParameterTypeDescription
categorystringFilter by category (input, selection, datetime, boolean, media, relational, layout, rich-text)

get_component

Get detailed information and source code for a specific component

ParameterTypeDescription
name *stringComponent name (e.g., Input, SelectDropdown, CollectionForm)

get_usage_example

Get a usage example for a component

ParameterTypeDescription
component *stringComponent name

generate_form

Generate a CollectionForm component with specified configuration

ParameterTypeDescription
collection *stringCollection name
fieldsarrayFields to include in the form
modestringForm mode

generate_interface

Generate code for a field interface component

ParameterTypeDescription
field *stringField name
type *stringInterface type (input, select-dropdown, datetime, toggle, etc.)
propsobjectAdditional props for the component

list_packages

List all Buildpad packages with their exports

get_install_command

Get the CLI command to install components using Copy & Own model. Returns the exact command to run.

ParameterTypeDescription
allbooleanInstall all available components
categorystringInstall all components from a category instead
componentsarrayList of component names to install (e.g., ["input", "select-dropdown", "datetime"])

get_copy_own_info

Get information about the Copy & Own distribution model and how to use it

copy_component

Get complete source code and file structure to manually copy a component into your project (shadcn-style). Returns the full implementation code, target paths, and required dependencies. Sources are returned as published, with @buildpad/* imports; the CLI (`npx @buildpad/cli add <name>`) rewrites those to your project paths. Returns isError with a missingSources list if any file cannot be read.

ParameterTypeDescription
name *stringComponent name (e.g., "datetime", "input", "select-dropdown")
includeLibbooleanAlso include the lib modules (types, services, hooks, utils, ...) the component depends on, directly or through other lib modules. Defaults to true.

list_lib_modules

List all available CLI lib modules (e.g. external-oauth, supabase-auth, api-routes) that can be added via `buildpad add <name>`. These are infrastructure/auth modules, separate from UI components.

get_rbac_pattern

Get RBAC (Role-Based Access Control) setup patterns for DaaS applications. Returns complete MCP tool call sequences to set up roles, policies, access, and permissions with dynamic variables. Covers collection CRUD only — for non-CRUD capability gates (buttons, pages, workflow transitions) use get_module_access_pattern.

ParameterTypeDescription
pattern *stringRBAC pattern to generate. own_items: users manage their own records. role_hierarchy: Admin>Editor>Viewer cascading. public_read: public read + authenticated write. multi_tenant: org-level isolation. f…
collectionsarrayCollection names to apply the pattern to (e.g., ["articles", "categories"])
roleNamestringRole name for single-role patterns (e.g., "Editor")

get_module_access_pattern

Get the Module-Level Access setup sequence — application capability flags (e.g. "reports:export") that are NOT tied to a collection. Use for any gate that collection CRUD permissions cannot express: showing a button, page, section, or nav item to some users, or restricting a workflow transition. Returns tool calls to register keys in daas_module_access_keys and grant them on a policy, plus the client, server, and workflow guard patterns. NEVER gate on role names — this is the sanctioned mechanism.

ParameterTypeDescription
folderstringOptional folder name to group the keys under in the Policy editor (creates a node with key=null)
keysarrayCapability keys to register. Format <domain>:<capability>, lowercase, matching ^[a-z][a-z0-9_:./-]*$. The system: and workflow: namespaces are reserved.
policyNamestringName of the policy the keys will be granted on (for the generated step description)

get_package_versions

Get current versions for all Buildpad source packages from the registry. Returns a map of package name → { version, changelogUrl }.

list_outdated

List installed Buildpad components and lib modules (utils, services, hooks, ...) that have updates. Reads the consumer project's buildpad.json and compares each file's recorded source hash with this server's registry. Each entry has kind 'component' or 'lib'.

ParameterTypeDescription
projectPath *stringAbsolute path to the consumer project root (directory containing buildpad.json)

get_component_changelog

Get the changelog for a Buildpad source package or component. Fetches and returns the relevant CHANGELOG.md slice from the registry.

ParameterTypeDescription
target *stringPackage name (e.g. "@buildpad/ui-interfaces") or component name (e.g. "input")
sinceVersionstringOnly return entries newer than this version (e.g. "1.3.0")

get_upgrade_plan

Dry-run upgrade plan: for each installed component and lib module shows the release delta, stale files, local-modification status per file (paths resolved the way the CLI writes them), and the recommended action. Naming an entry also plans the outdated components and lib modules it depends on, and lists the ones the project lacks (missingDependencies), which apply_upgrade installs. Read-only — does not touch any consumer files.

ParameterTypeDescription
projectPath *stringAbsolute path to the consumer project root (directory containing buildpad.json)
componentsarraySpecific component or lib-module names to check. Omit to plan every installed component and lib module.

apply_upgrade

⚠️ WRITE TOOL — Upgrade Buildpad components and lib modules in a consumer project by running `npx @buildpad/cli@<this server's version> upgrade`, so the CLI applies the same registry this server reports. Upgrading everything (omit components) is the safest path. For locally-modified files, strategy controls conflict resolution: "overwrite" replaces them, "new-file" writes a .new file, "three-way" attempts a 3-way merge. Refuses to run when the project was installed from a newer release than this server.

ParameterTypeDescription
projectPath *stringAbsolute path to the consumer project root (directory containing buildpad.json)
componentsarrayComponent or lib-module names to upgrade (lowercase, e.g. "input", "utils"). Omit to upgrade every installed component and lib module.
includeDependenciesbooleanAlso upgrade the outdated components and lib modules the upgraded entries depend on, and install the ones the project lacks: their new code is imported by the upgraded entries. Defaults to true. Set f…
includeLibDependenciesbooleanDeprecated: the earlier name of includeDependencies.
strategystringConflict resolution strategy for locally-modified files. Defaults to "new-file".