ROADMAP - MCP Unified Data Access (Search + Metadata + Code)
Status: Proposed Updated: May 2026
Goal
Make MCP the unified data access layer for pattern discovery and exports, with full access to generated metadata and generated code artifacts beyond search-index-only behavior.
Primary outcome:
- MCP can resolve pattern data from layered sources: discovery index, metadata artifacts, component code artifacts, and optional full page content.
Why This Exists
Planning is currently split across multiple docs (chatbot MCP, export code MCP, metadata cache, and AI access hardening). This roadmap unifies those plans into one delivery path and one ownership contract.
Consolidated Inputs
This roadmap consolidates strategy from:
ROADMAP_CHATBOT_MCPROADMAP_EXPORT_CODE_MCPROADMAP_EXPORT_CODEROADMAP_PATTERNS_METADATAROADMAP_AI_ACCESS_AND_CACHE_SYNCdocs/search-and-mcp/architecturedocs/build-and-deploy/setup/CACHE_PIPLINE
Unified Product Contract
Source tiers
- Tier A: Discovery (public)
- Source:
public/search-index.json - Purpose: fast search and lightweight pattern cards
- Source:
- Tier B: Enriched metadata (private-first)
- Source of truth: generated metadata artifacts (current file family under
public/componentsduring transition) - Purpose: high-quality descriptions, status, generation metadata, diagnostics
- Source of truth: generated metadata artifacts (current file family under
- Tier C: Generated component code (private-first)
- Source of truth: generated TSX artifacts and variant status
- Purpose: MCP code retrieval and export experiences
- Tier D: Full content resources (optional)
- Source: build cache for page content
- Purpose: MCP resources/read for rich page context
MCP access modes
- Discovery mode (default safe)
- Uses Tier A only
- Compatible with current search-only MCP behavior
- Enriched mode
- Uses Tier A + Tier B
- Returns metadata-enhanced pattern payloads when metadata artifacts exist
- Export mode
- Uses Tier A + Tier B + Tier C
- Returns variant availability and gated code payload retrieval
- Content mode (optional)
- Uses Tier D resources/read APIs for full page content
Fallback rule
MCP must never hard-fail when higher tiers are absent.
Resolution order per request:
- Preferred tier for the requested operation
- Next lower available tier
- Tier A discovery fallback
MCP API Plan
Keep existing tools stable
search_patternslist_categoriesget_pattern
Add enriched read tools
get_pattern_enriched- Input:
id | slug - Output: discovery fields + metadata fields when present + source diagnostics (
sourceTier,fallbackUsed)
- Input:
list_pattern_variants- Input:
id | slug - Output: available generated variants with status and quality markers
- Input:
get_pattern_component- Input:
id | slug, optionalvariantId - Output: code payload (or preview) under entitlement policy
- Input:
Add MCP resources endpoints
resources/listforpattern://resourcesresources/readfor:pattern://{id}/metadatapattern://{id}/code/{variantId}pattern://{id}/content(optional full content mode)
Keep async generation trigger
generate_components_exportstays enqueue-only- Generation execution remains outside edge runtime via worker/job pipeline
Build and Storage Strategy
Near-term (transition)
- Preserve current local artifacts workflow:
npm run build:artifactsnpm run validate:artifacts
- MCP enriched/export modes can read these artifacts when present.
Target
- Introduce private enriched index for MCP/chatbot/server use.
- Move generated code artifacts to private storage path.
- Keep public discovery index minimal and stable.
Security and Entitlement Strategy
- Anonymous users
- Search + discovery responses
- no raw premium code payloads
- Authenticated non-entitled users
- metadata-enriched responses
- limited code preview only
- Entitled users
- full generated code retrieval
- variant export access
Delivery Phases
P0 - Canonical Contract and Schema
Scope:
- define one canonical MCP data contract (tiers, fallback, error model)
- add schema/version markers for discovery and enriched sources
Done when:
- one MCP contract doc exists and is referenced by all related roadmaps
P1 - Enriched Metadata Reads
Scope:
- implement
get_pattern_enriched - wire metadata resolver with fallback to discovery index
Done when:
- MCP serves metadata-enriched output when artifacts exist
- MCP returns discovery-only output when artifacts are missing
P2 - Code Variant Reads
Scope:
- implement
list_pattern_variants - implement
get_pattern_componentwith entitlement-aware output policy
Done when:
- MCP can list and return generated code variants
- unauthorized requests are safely downgraded
P3 - Resources Layer
Scope:
- add
resources/listandresources/read - support metadata, code, and optional full content resources
Done when:
- MCP clients can read pattern resources through standard MCP resources APIs
P4 - Async Generation Convergence
Scope:
- keep
generate_components_exportas enqueue-only - ensure frontend/chatbot/MCP all use one job contract and one worker pipeline
Done when:
- all generation paths converge on the same queue and status model
P5 - Private Storage Hardening
Scope:
- move enriched data and code artifacts to private paths
- keep public discovery index lightweight
Done when:
- MCP enriched/export modes do not depend on publicly reachable raw artifacts
Observability and Reliability
Required metrics:
- MCP request volume by tool and mode
- fallback rate by source tier
- missing-artifact rate
- generation enqueue success/failure and queue latency
- entitlement deny counts for code retrieval
Operational guards:
- concurrency locks per pattern for write paths
- idempotent dedupe for generation payloads
- explicit terminal states for jobs
Rollout and Risk Control
- Feature-flag MCP enriched mode.
- Enable read tools in shadow mode with diagnostics.
- Turn on response fields incrementally.
- Gate code retrieval by entitlement before broad rollout.
- Keep discovery-only fallback always available.
Definition of Done
- MCP supports full pattern reads beyond search-index (metadata + code) with stable fallbacks.
- MCP resources/read is available for metadata and code resources.
- Generation triggers remain async and safe.
- Public/private data boundaries match access policy.
- Related roadmap docs reference this file as canonical execution plan.