MIB Component MCP — registry
A machine-readable catalog of MIB Core components, extension seams, recipes, config keys and escape-hatches. It powers the MIB component MCP (a shadcn-MCP analog) so an LLM or developer can discover building blocks and decide whether to reuse, configure, extend-via-seam, or build a fully custom component.
Principle: docs are the source of truth
The registry is a validated projection of the MibDocs extension docs
(cms/frontend_server/components/extension-reference.md, extension-samples.md,
the per-component pages, …), never a hand-maintained parallel copy. Where a fact
is not reliably in the docs, the registry does not own it:
baseClass.fqcn(the C# class you subclass) is sourced from BFF source.dbRegistrationIdentityis the DB-row string (MIB3UX_COMPONENTS), which is not a C# type and is inconsistent across stock components — so it is recorded per item, never derived.- MIB version ↔ branch/package resolution is delegated to
tvop/ mib-architecture.
Status
- v1 (now):
registry.jsonis hand-curated in the exact shape the generator will later emit. This is a representative seed for review, not the full catalog. - Parity & drift (
mib registry): the registry is a projection of the docs, not NLP-generated from prose (fields the docs don't carry —baseClass.fqcn,dbRegistrationIdentity, seam signatures — stay sourced from the BFF). So instead of regenerating,mib registry checkvalidates structure + doc-parity (every item'ssource.doc/anchorresolves to a real doc section) and sha-drift, andmib registry buildstamps each anchor-resolvable item'ssource.shaso a later doc edit is caught. Pass--source-root <dir>to also validate BFF-sourced items.
Item kinds
name is <kind>.<slug> (routable by prefix). type is one of:
type |
what it is |
|---|---|
mib:component |
a built-in component (List, Form, …) + its base class, DB identity, config keys, seams, seamSupport |
mib:seam |
an override point — verbatim signature, archetypes, stage, error contract, traps |
mib:plugin |
a Tier-2 plugin (custom validator, business rule, image-url-resolver, page-persistence, custom-behavior) — interface, registration scope, hooks |
mib:config-key |
a zero-code knob (scoped: component-config / page-config / registration / server-env / json-blob) |
mib:recipe |
a concrete extension pattern and the decide-engine index entry (intent + synonyms + evalLabel) |
mib:escape-hatch |
a case with no clean seam — stay custom, use the building blocks |
mib:building-block |
a reusable helper a seam body calls |
seamSupport (on components)
full— exposes the protected-virtual seam hooks (List, EditableList, SimpleRelatedList, OrderedRelatedList, Form, ContentCriteria).v2-no-seams— rendersIRenderableComponentV2but has no seam hooks (EPG, DMM, DmmLegacy).v1-frozen— V1IRenderableComponentonly; no V2, no seams (Message, IFrame, Html, QuickUpload, RelatedAutoComplete, RelatedForm, legacy RelatedList).
The version gate
Seam items carry availableFrom (e.g. 7.0 / prerelease). The seams are merged
into releases/7.0 but absent from released 6.0.x, so for a 6.0.x-pinned
project decide must downgrade an "extend" recommendation to configure/plugin (or
move to 7.0) — this is the single most correctness-critical behavior of the MCP.
Configure tier — the default path
Most MIB pages are built with no code, purely by configuring the stock components and wiring them onto a page. The registry treats this as a first-class peer of the seam (extend) tier:
component.knobs[]— the typed configuration surface of each component (MEDIA_TYPE,INCLUDE_FIELDS,EDIT_URL,READONLY, …). There is no config-key enum in MIB: keys bind to*ComponentConfigurationproperties by reflection, so the class property set is the catalog.requiredis per archetype (List/Form needMEDIA_TYPE; Related also needsPARENT_MEDIA_TYPE; ContentCriteria needsPARENT_MEDIA_TYPE+CONTENT_CRITERIA_ID+CONTENT_SELECTION_FIELD).mib:config-keywithscope: page-config— page-level knobs (DisplayConfiguration).- configure recipes —
mib:recipewithrecommendedTier: configure,seams: [], and the page shape inmeta(e.g.recipe.compose-list-page).
decide is configure-first: it advances to plugin/seam/custom only when a
requirement cannot be met by knobs + page wiring + mediaType binding. A fully wired
page is invisible without an AUTH_PERMISSIONS grant + the group's CanRead on the
mediaType — a configure answer must include that.
Validate
# parse + schema (pick whichever is available)
python3 -m jsonschema -i registry/registry.json registry/registry.schema.json
# or
npx --yes ajv-cli validate -s registry/registry.schema.json -d registry/registry.json --spec=draft2020
Tests
dotnet test tests/Mib.ComponentRegistry.Tests --collect:"XPlat Code Coverage"
python3 scripts/coverage-gate.py # Client.cs + Inventory.cs ≥ 80% line AND branch
The fixtures are real or copied from the owning contract source: PageSchemas captured verbatim from a live BFF
(testdata/bff/), MibFrontEnd's component schemas (testdata/mock/) and React route responses
(testdata/react/), and a real mib export snapshot (testdata/inventory/).
The parser tests are therefore contract tests — when the BFF's response shape drifts, they fail. CI runs
both commands on any change under mcp/src or mcp/tests.
Install as a tool (mib)
Mib.Cli (net8.0) ships the mib CLI and bundles registry.json so it works from any directory. It
publishes to the agilecontent GitHub Packages NuGet feed. GH Packages requires authentication even to
read, so installing is a one-time source setup with a personal access token:
# one-time: a CLASSIC PAT with read:packages, authorized for the agilecontent SSO org
dotnet nuget add source https://nuget.pkg.github.com/agilecontent/index.json \
-n github-agilecontent -u <gh-username> -p <PAT> --store-password-in-clear-text # clear-text required on macOS/Linux
dotnet tool install -g Mib.Cli # puts `mib` on PATH
dotnet tool update -g Mib.Cli # later, to upgrade
Releases are cut by pushing a mib-cli-v* tag — see docs/RELEASING.md.
Build from source instead (no feed access, or hacking on the CLI):
dotnet pack src/Mib.ComponentRegistry -c Release -o ./nupkg
dotnet tool install -g --add-source ./nupkg Mib.Cli # puts `mib` on PATH
# or, no SDK on the box:
dotnet publish src/Mib.ComponentRegistry -c Release -r osx-arm64 \
--self-contained -p:PublishSingleFile=true -p:AssemblyName=mib
Try it
The product is the catalog Q&A: ask what to use, which tier, which knobs. It needs no per-repo config — point an editor at the MCP (below) or use the CLI directly.
# the AI-native loop: intent -> reason over catalog FACTS (the model picks the tier — there is no
# `decide` verb) -> author the C# migration -> apply -> verify wiring
mib search "list rows from an external API" # fuzzy-find candidates before you know the exact name
mib get component.list # one catalog item as JSON — includes its `tiers` (configure/plugin/extend/custom)
mib knobs component.list # the no-code configure surface (primary; --all = every knob)
mib contract component.list # the BFF /api/v2 contract the component consumes
mib list mib:seam # browse a kind
# inspect THIS repo / the live stack (read-only):
mib status # which repos fetched, services up, endpoint health, per-DB migration state
mib inventory # what's really wired, JOINED per page (custom vs core+hook) + drift warnings
mib datamodel MOVIE_ITEMS # the content model a customization consumes (media types · ADM fields · relateds)
# author + apply a customization unit (migrations are hand-authored C# using the vendored AddOrUpdate* helpers):
mib migration new AddMovieList # scaffold the MibMigrator migration pair into the repo's migration project
mib redeploy migrations # apply metadata/customization migrations, then restart services
mib redeploy component # rebuild + ship the backend overlay (NOT the React remote)
mib redeploy frontend # rebuild ONLY the federated React remote + bounce nginx
mib check # gating verify: endpoints + BFF liveness + permission cache + login wiring (exit != 0 on failure)
mib registry check # doc-parity + sha-drift (keep the registry honest)
# wire the agent layer into your editor (brownfield repos need only this):
mib agentify # ONE command: merge AGENTS.md + sync .claude/skills/ + wire the MCP
mib mcp install # just the MCP, if you prefer
# initialize a brand-new customization repo (greenfield):
mib init --tenant Acme --project Demo --mib 6.0 # tree + MCP + AGENTS.md/CLAUDE.md + the mib Agent Skills
mib init --with-stack --tenant Acme --project Demo --mib 6.0 # ALSO drops the full runnable Docker stack + BOOTSTRAP.md
# run MULTIPLE local MIB stacks at once — each is its OWN checkout (one root/worktree = one installation):
mib install add prod-like --dir ../demo-prod --port-offset 1000 # register a 2nd --with-stack checkout (own project + ports + URLs)
mib install list --status # registered installations + ports + a live up/down column
mib install deploy prod-like # bring it up; later `mib install up|down prod-like`
mib env is a deprecated alias for mib install. A database name another installation already owns is
refused until you choose --separate-db (an isolated copy) or --share (the same rows).
Every mib init makes the repo agent-ready: it writes AGENTS.md + CLAUDE.md (the
cheapest-tier-first rule, the version gate, verbatim-signature rule, stack commands, project
facts) and installs the mib Agent Skills into .claude/skills/ — a mib-platform router plus
the focused skills it dispatches to (setup, architecture, migrations, datamodel, pages, components,
frontend, stack, debug) — so an editor agent loads the MIB extension philosophy automatically. The
skills ship with the tool (mcp/skills/) and can also be installed globally under ~/.claude/skills/.
mib skills sync refreshes them and prunes any skill that has since been retired (so a stale
skill can never linger and instruct a removed command).
mib init --with-stack copies the canonical compose stack (4 mib-cms services + SQL Server +
React shell + nginx + the canonical-migration config), parameterized to your project and pinned
via ${MIB_TAG} in compose/.env. Then mib deploy brings it up from nothing to a
login at https://frontend.localtest.me/app/ (needs Docker + ECR/GHCR login + the internal NuGet feed;
see the generated BOOTSTRAP.md).
In an EXISTING MIB repo
mib initscaffolds nothing: it recordssetup.yamland wires the MCP and the agent layer (--greenfieldforces the scaffold anyway). Components are configured in the DB (the source of truth), not derived from a source scan.mib agentifyalone refreshes the agent layer.
Run & connect (MCP)
The server is the CLI itself: mib mcp serve speaks MCP over stdio (ModelContextProtocol SDK).
mib mcp install (and mib init / mib agentify) writes the block below for you — the mib binary
resolved per machine, merged non-destructively into any existing .mcp.json (and .vscode/mcp.json for
Copilot). mib mcp print shows what it writes. To wire it by hand:
{
"mcpServers": {
"mib-components": {
"command": "/abs/path/to/mib",
"args": ["mcp", "serve"]
}
}
}
src/Mib.ComponentRegistry.Server is a standalone dev alternative (dotnet run --project …). It serves the
same tools but not the handshake instructions.
Since 0.9.262, mib mcp serve sends short instructions at the handshake, so they reach a session wherever it
was started:
orient in the MIB repo first with mib_context; read the repo's AGENTS.md and mib skills, or run
mib agentify where they are missing; discover through the catalog (mib_search → mib_get / mib_knobs /
mib_contract, mib_inventory, mib_datamodel) before reading platform source, which only confirms a
catalog fact or settles a mib doctor DRIFT; and mib <command> --help prints help without running anything.
Tools are mib_-prefixed so they never collide with the runtime content MCP's find/get/set. The catalog
and live-structure ring is read-only; deploy/redeploy/verify/agentify and other operational commands remain
CLI-only:
- catalog:
mib_list(by kind),mib_search(fuzzy keyword — the discovery entry point),mib_get,mib_knobs,mib_contract. - live structure:
mib_inventory(per-page joined model,has/usesfilters) andmib_datamodel(the mib.api content model — media types / ADM_FIELDS / relations). - installation:
mib_contextandmib_status(read-only identity/topology/health). - existing content edit session:
mib_client_edit_open,mib_client_edit_stage,mib_client_edit_diff,mib_client_edit_commit, andmib_client_edit_abort; these preserve their existing per-tool safeguards and are not part of the read-only ring.mib_client_edit_commitis the one that writes (dryRun: truereturns the payload without sending it).
The catalog, structure, and installation tools share their command models/serializers with the corresponding CLI commands. Content edit tools call the shared edit-session implementation directly rather than shelling out.
The capability tools are deliberately absent from the default MCP inventory while the reviewed manifest and
rollout gates are unfinished. For development/lab validation only, start the server with
MIB_CLIENT_CAPABILITY_MCP=1 to add 19 of them:
- discovery:
mib_client_discover_pages,mib_client_discover_permissions. - typed inspect:
mib_client_inspect_form,mib_client_inspect_list,mib_client_inspect_related,mib_client_inspect_content_criteria,mib_client_inspect_permission_list. - List query:
mib_client_list_sources,mib_client_search. - writes, validate + dry-run only:
mib_client_set_form,mib_client_create_form,mib_client_clone_form,mib_client_set_data,mib_client_edit_content_criteria,mib_client_link_related,mib_client_unlink_related,mib_client_reorder_related,mib_client_move_related,mib_client_set_permission_grant.
The write family never persists: each tool returns the exact display payload it WOULD send, and the commit
stays in the CLI (mib client … --yes). mib mcp tools prints their metadata (name · risk · gating · input
schema). The normal mib client search command shares the same List query engine through a compatibility
profile that keeps its human interface, response handling and string-valued filter payloads, and sends the
shell's search: the visible columns as displayFields, the clause lowercased (and|or|in, no per-condition
clause), the page size of the shell's theme by default (20 under the compact theme, else 10). A related list on an
entity's page (--component) is searched through its own route, as the shell searches it: a relatedList through
POST /display/{p}/{id}/{c}/data, an asyncRelatedList through async-data. The strict machine bounds and
typed-value rules apply to the MCP profile.
Inspection exposes schema-derived scalar, option/reference, and date/range value contracts before execution;
unknown variants are refused rather than forwarded as raw JSON. Source discovery returns at most 500 entries per
call. A continuation sends both continuation.nextCursor as cursor and its catalog fingerprint as
expectedCatalogFingerprint, so a changed live catalog cannot silently skip or duplicate entries. Search
re-fetches the authorized catalog before accepting source ids. Structured request failures preserve BFF request
correlation and classify retryability without returning an unbounded response body.
Smoke-test without a client (keeps stdin open to avoid the EOF race):
dotnet build src/Mib.ComponentRegistry.Server
python3 scripts/smoke.py src/Mib.ComponentRegistry.Server/bin/Debug/net10.0/mib-registry-mcp.dll