sitecore-component-mcp
Integrates with SitecoreAI (via the SitecoreAI Agent API) to expose deployed JSS component contracts to AI agents. Provides tools to list components with their allowed placeholders, fetch exact field contracts (types, required flags, length limits, params), detect duplicate or subset components and orphaned renderings, validate a page plan with actionable fixes, build pages/components after server-side re-validation, and revert Agent API jobs by job ID.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
sitecore-component-mcp
A component-aware MCP server for SitecoreAI. It gives AI agents (Cursor, Claude Code, any MCP client) the real contracts of your JSS components, finds duplicate components in your library, and validates a page plan before anything is written through the SitecoreAI Agent API.
This is the companion code for the article Your Agent Doesn't Know Your Components, which explains every file step by step.
The problem
Marketer MCP and the Agent API know Sitecore primitives: renderings, placeholders, field types. They don't know the layer you own: which fields are required, how long a heading can be, which placeholders a component is allowed in, or that PromoSplit and PromoBanner are the same component under two names. An agent without that knowledge picks components by name match and invents field names.
Related MCP server: Questionnaire Component Governance MCP Demo
What it does
Tool | Purpose |
| One line per deployed component, with allowed placeholders |
| Exact fields, types, required flags, length guidance, allowed params |
| Groups identical, near-identical and subset components by field signature |
| Renderings in Sitecore with no matching component in source |
| Checks a plan and returns each issue with a |
| Creates the page and components after validating again on the server |
| Undoes an Agent API operation by job ID |
Contracts come from your JSS source at build time. scripts/generate-manifest.ts uses ts-morph to read each <ComponentName>Fields type and its JSDoc tags:
/**
* Two-column promotional block.
* @placeholder main
* @placeholder promo-zone
* @maxPerPage 3
* @param variant image-left | image-right | stacked
*/
export type PromoSplitFields = {
/** Two-line clamp on mobile — keep it tight. @maxLength 60 */
Heading: Field<string>;
Body: RichTextField;
/** Omit unless there's a genuine secondary action. */
SecondaryCta?: LinkField;
};At runtime the manifest is reconciled with the renderings the Agent API reports, so the agent only sees components that are actually deployed to the environment.
Getting started
Requires Node.js 20+.
npm install
cp .env.example .env.local # fill in your values
export JSS_COMPONENTS_PATH=./example/src/components # or your JSS app's components folder
npm run devnpm run manifest regenerates generated/manifest.json. npm run manifest:check fails if the committed manifest is out of date, which is useful in CI.
Environment variables
Variable | Description |
| Environment automation client (SitecoreAI Deploy → Credentials) |
| Authoring environment host name |
| Path to your JSS components folder |
| Bearer token required on |
|
|
Connect a client
Cursor (.cursor/mcp.json is included):
{ "mcpServers": { "sitecore-components": { "url": "http://localhost:3000/api/mcp" } } }Claude Code:
claude mcp add --transport http sitecore-components http://localhost:3000/api/mcp \
--header "Authorization: Bearer $MCP_SHARED_SECRET"Before you point it at a real environment
Check the Agent API paths. Every endpoint is in
lib/sitecore/agent-api.ts. Verify them, and the request bodies inlib/build.ts, against the Agent API OpenAPI definition for your environment.Start on a non-production environment. Keep
ALLOW_PRODUCTION_WRITES=false.The shared secret is a minimum. For anything outside your team, use OAuth 2.1 as the MCP spec requires (
withMcpAuthin mcp-handler).
Tests
npm test # validation, duplicate detection and manifest extraction
npm run typecheckDifferences from the article
Uses mcp-handler 2.x: the route lives at
app/api/mcp/route.tsandmaxDurationis a route segment export, because 2.x leaves routing to Next.js.Fixes
@paramparsing in the extractor. TypeScript keeps a@paramtag's name separate from its comment, so the article's version recordedimage-leftas the parameter name instead ofvariant.Validation and duplicate grouping are split into pure functions (
checkPlan,groupDuplicates) so they can be tested without the Agent API.
License
MIT © Teja Vallabhaneni
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Serves your design system and coding standards to coding agents, so they stop guessing.
Give AI agents your deeepSpace design system: components, tokens, styles and code mappings.
Gives AI agents direct access to your Sanity projects and guidance for working with them
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Sitecore CMS through GraphQL API, providing item operations, version control, navigation, and content management capabilities. Supports natural language commands and slash command menu interface for querying Sitecore items, templates, and hierarchies.3MIT
- FlicenseAqualityDmaintenanceEnables AI agents to query component governance rules, validate component props, and generate development prompts for questionnaire editors.4-

componecatofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to access an organization's software component catalog, including entities, relationships, interfaces, documentation, and team ownership, for grounded context and impact analysis.1MIT- AlicenseNot gradedqualityCmaintenanceEnables coding agents to retrieve accurate design system information, component APIs, design tokens, and coding standards, so they build with real specs rather than guessing.2MIT