Skip to main content
Glama

Sitecore MCP Server

by GaryWenneker

Sitecore MCP Server

A Model Context Protocol (MCP) server for Sitecore with GraphQL API, version control, parent navigation, and item statistics. Query Sitecore items via AI assistants like Claude and GitHub Copilot.

✨ Features

šŸŽÆ Core Tools (18 total)

Item Operations:

  • šŸ” sitecore_get_item - Get a specific Sitecore item (✨ with version support!)

  • šŸ‘¶ sitecore_get_children - Get child items (✨ with version support!)

  • šŸ“„ sitecore_get_field_value - Get a field value (✨ with version support!)

  • šŸ”Ž sitecore_query - Execute Sitecore queries

  • šŸ” sitecore_search - Search items by name

  • šŸ“‹ sitecore_get_template - Get template information

Version Control (NEW in v1.3.0!):

  • šŸ• sitecore_get_item_versions - See all versions of an item

  • šŸ“Š sitecore_get_item_with_statistics - Get created/updated dates and users

Navigation (NEW in v1.3.0!):

  • ā¬†ļø sitecore_get_parent - Navigate to parent item

  • 🧭 sitecore_get_ancestors - Get all ancestors (breadcrumb!)

Advanced Features:

  • šŸ”¬ sitecore_scan_schema - Automatic GraphQL schema analysis

  • šŸ’¬ sitecore_command - Natural language /sitecore commands in chat

  • ⚔ Slash Command Menu - Type / in chat to see the šŸ”§ /sitecore command!

šŸ“£ Live progress (all tools)

All MCP tools now report progress via stderr so you can see what's happening during longer operations in your AI client.

  • Format: [tool_name] Message...

  • Examples:

    • [sitecore_get_item] Starting (path=/sitecore/content/Home, language=nl-NL)

    • [sitecore_get_item] Completed: Home (template=Page, version=1)

    • [sitecore_search_paginated] Completed: 50 item(s), hasNextPage=true

Note: We always mention the language in messages (critical for Sitecore).

šŸŽØ Examples

Via Slash Command Menu (Type / in chat):

# 1. Type / to open the menu # 2. Choose "šŸ”§ /sitecore - Sitecore command interface" # 3. Type your command (with or without /sitecore prefix) help get item /sitecore/content/Home get item /sitecore/content/Home version 2 # NEW: Version support! get parent /sitecore/content/Home/Article # NEW: Parent navigation! get ancestors /sitecore/content/Home/Article # NEW: Breadcrumb! search articles field Title from /sitecore/content/Home templates

Direct Natural Language Commands:

/sitecore help /sitecore scan schema /sitecore get item /sitecore/content/Home /sitecore get item /sitecore/content/Home version 2 /sitecore get parent /sitecore/content/Home/Article /sitecore get ancestors /sitecore/content/Home/Article /sitecore search articles /sitecore field Title from /sitecore/content/Home /sitecore templates

Version Control Examples:

// Get specific version sitecore_get_item({ path: "/sitecore/content/Home", language: "en", version: 2 }) // Get all versions sitecore_get_item_versions({ path: "/sitecore/content/Home", language: "en" }) // Returns: { totalVersions: 5, versions: [...], latestVersion: 5 } // Get item with statistics sitecore_get_item_with_statistics({ path: "/sitecore/content/Home", language: "en" }) // Returns: { created: "20211011T073530Z", createdBy: "sitecore\admin", ... }

Navigation Examples:

// Get parent sitecore_get_parent({ path: "/sitecore/content/Home/Article" }) // Returns: { name: "Home", path: "/sitecore/content/Home", ... } // Get all ancestors (breadcrumb) sitecore_get_ancestors({ path: "/sitecore/content/Home/Article" }) // Returns: { // count: 3, // ancestors: [...], // breadcrumb: "sitecore > content > Home" // }

šŸ“š Docs Map

  • docs/guides/ - Technical guides and implementation details (GUID formats, content discovery, slash commands, etc.)

  • docs/releases/ - Release notes per version (RELEASE-NOTES-v1.x.md)

  • docs/ready-to-ship/ - Release checklists and readiness documents per version

  • docs/status/ - Progress reports and status updates

  • docs/summaries/ - Version summaries and overviews

  • docs/BACKLOG.md - Product backlog and planning

Tip: All documentation is organized under docs/. Root contains only README.md.

šŸ“ Repository Structuur

SitecoreMCP/ ā”œā”€ā”€ .github/ # CI/CD workflows en GitHub configuratie │ └── workflows/ │ └── root-scan.yml # Root hygiene enforcement │ ā”œā”€ā”€ src/ # TypeScript source code │ ā”œā”€ā”€ index.ts # MCP server entry point (11 tools) │ ā”œā”€ā”€ sitecore-service.ts # GraphQL client & business logic │ ā”œā”€ā”€ sitecore-types.ts # TypeScript type definitions (auto-generated) │ └── sitecore-types-FULL.ts # Extended type definitions │ ā”œā”€ā”€ dist/ # Compiled JavaScript (build output) │ ā”œā”€ā”€ scripts/ # All scripts organized by category │ ā”œā”€ā”€ build/ │ │ └── build-vsix.ps1 # VS Code extension packaging │ │ │ ā”œā”€ā”€ schema/ # GraphQL schema management │ │ ā”œā”€ā”€ download-schema.ps1 # Download schema from Sitecore │ │ ā”œā”€ā”€ download-full-schema.ps1 │ │ ā”œā”€ā”€ analyze-schema.ps1 # Analyze schema structure │ │ ā”œā”€ā”€ extract-schema-types.ps1 │ │ ā”œā”€ā”€ find-mutations.ps1 # Find mutation capabilities │ │ ā”œā”€ā”€ generate-types.ps1 # Generate TypeScript types │ │ ā”œā”€ā”€ generate-types-full.ps1 │ │ └── check-search-schema.cjs # Validate search schema │ │ │ ā”œā”€ā”€ tests/ # Test scripts (72 files) │ │ ā”œā”€ā”€ Load-DotEnv.ps1 # Environment loader for tests │ │ ā”œā”€ā”€ test-*.ps1 # PowerShell test scripts │ │ └── test-*.cjs # Node.js test scripts │ │ │ ā”œā”€ā”€ tools/ # Utility tools │ │ ā”œā”€ā”€ build-relationship-graph.ps1 # Build item relationship graphs │ │ ā”œā”€ā”€ parse-field-references.ps1 # Parse field references │ │ └── Load-DotEnv.ps1 # Canonical environment loader │ │ │ └── wrappers/ # Backward compatibility wrappers │ ā”œā”€ā”€ *.ps1 # PowerShell wrappers (deprecated) │ └── *.cjs # Node.js wrappers (deprecated) │ ā”œā”€ā”€ docs/ # All documentation │ ā”œā”€ā”€ guides/ # Technical guides (35+ documents) │ ā”œā”€ā”€ releases/ # Release notes per version │ ā”œā”€ā”€ ready-to-ship/ # Release readiness checklists │ ā”œā”€ā”€ status/ # Status and progress reports │ ā”œā”€ā”€ summaries/ # Version summaries │ └── BACKLOG.md # Product backlog │ ā”œā”€ā”€ data/ # Schema and graph data (generated) │ ā”œā”€ā”€ graphql-schema.json # GraphQL schema dump │ ā”œā”€ā”€ graphql-schema-full.json # Full introspection result │ └── graph.json # Relationship graph data │ ā”œā”€ā”€ .env.example # Environment variabelen template ā”œā”€ā”€ package.json # NPM dependencies en scripts ā”œā”€ā”€ tsconfig.json # TypeScript compiler configuratie ā”œā”€ā”€ LICENSE # MIT licentie └── README.md # Dit bestand (quick start)

Purpose per Directory

Directory

Purpose

Allowed Files

Root

Project metadata and entry point

Config files + README.md only

src/

TypeScript source code

.ts files

dist/

Build output

.js, .d.ts files (generated)

scripts/

All scripts organized

Subdirectories per category

scripts/build/

Build and packaging scripts

build-vsix.ps1

scripts/schema/

GraphQL schema management

Schema tools (9 scripts)

scripts/tests/

Test scripts

Test files (72 files)

scripts/tools/

Utility tools

Helpers and utilities (3 tools)

scripts/wrappers/

Backward compatibility

Deprecated wrappers (11 files)

docs/

All documentation

.md files in subdirectories

data/

Generated data files

.json schema dumps (gitignored)

.github/

CI/CD workflows

GitHub Actions workflows

Hygiene Policy: Root contains ONLY config files and README.md. All documentation is under docs/, all scripts under scripts/. This structure is enforced by CI workflow (root-scan.yml).

āœ… API Status

GraphQL API is active and working!

  • āœ… Item queries

  • āœ… Get children

  • āœ… Get field values

  • āœ… Template information

  • āœ… Variables in queries

Requirements

  • Node.js 18 or higher

  • Sitecore instance with GraphQL endpoint: /sitecore/api/graph/items/master

  • Sitecore API Key (see configuration)

šŸš€ Quick Start

1. Install dependencies

cd c:\gary\Sitecore\SitecoreMCP npm install npm run build

2. Test SPE API

Before configuring the MCP server, first test if the SPE API works:

.\test-spe-api.ps1 -SitecoreHost "https://your-sitecore-instance.com" -Username "admin"

3. Configure your IDE/Tool

Choose your favorite tool and configure the Sitecore MCP server:

Claude Desktop: %APPDATA%\Claude\claude_desktop_config.json VS Code: .vscode/settings.json or User Settings
Rider: %APPDATA%\JetBrains\Rider2024.3\options\mcp-servers.json
Visual Studio: %USERPROFILE%\.github-copilot\mcp-servers.json

See docs/guides/INSTALLATION.md for detailed configuration per tool.

Example configuration (Claude Desktop):

{ "mcpServers": { "sitecore": { "command": "node", "args": ["c:\\gary\\Sitecore\\SitecoreMCP\\dist\\index.js"], "env": { "SITECORE_HOST": "https://your-sitecore-instance.com", "SITECORE_USERNAME": "admin", "SITECORE_PASSWORD": "your_password" } } } }

For VS Code, Rider and Visual Studio configurations, see docs/guides/INSTALLATION.md.

4. Restart your tool

  • Claude Desktop: Close completely and restart

  • VS Code: Reload Window (Ctrl+Shift+P)

  • Rider: Invalidate Caches & Restart

  • Visual Studio: Close solution and reopen

The Sitecore MCP server should now be available!

šŸ’” Gebruik Voorbeelden

Slash Command Menu (New in v1.2.0!)

Step 1: Open your AI chat (Claude Desktop, VS Code Copilot, etc.)
Step 2: Type / to open the slash command menu
Step 3: Choose šŸ”§ /sitecore from the menu
Step 4: Type your command (prefix is automatically added)

# Via slash menu: / → choose /sitecore → "help" / → choose /sitecore → "get item /sitecore/content/Home" / → choose /sitecore → "search articles" / → choose /sitecore → "field Title from /sitecore/content/Home"

Direct Commands

You can also type direct commands:

Get the Home item: /sitecore/content/Home
Show all children of /sitecore/content/Home
Execute this query: /sitecore/content/Home//*[@@templatename='Sample Item']
Search for items with "contact" in the name
What is the Title field of /sitecore/content/Home?

See docs/guides/EXAMPLES.md and docs/guides/SLASH-COMMAND.md for more extensive examples.

Sitecore PowerShell Extensions API

This MCP server uses the Sitecore PowerShell Extensions (SPE) API endpoint:

POST https://your-sitecore-instance.com/sitecore/api/spe/v2/script

Ensure SPE is correctly configured and the API is accessible.

šŸ“š Documentation

For a complete overview of all directories and their purposes, see the šŸ“ Repository Structure section above.

Main documents:

Documentation Structure:

  • docs/guides/ – Technical guides and how-to's (35+ documents)

  • docs/releases/ – Release notes per version (RELEASE-NOTES-v1.x.md)

  • docs/ready-to-ship/ – Release readiness checklists

  • docs/status/ – Status and progress reports

  • docs/summaries/ – Version summaries

Note: All documentation is under docs/. The root contains only README.md. Scripts are under scripts/ in categories (build, schema, tests, tools, wrappers).

šŸ”§ Troubleshooting

MCP server doesn't appear

  • Claude: Check claude_desktop_config.json syntax → Restart app

  • VS Code: Reload Window (Ctrl+Shift+P) → Check Output panel

  • Rider: Invalidate Caches → Check Event Log

  • Visual Studio: Restart as Administrator → Check Extension logs

SPE API errors

  • Run .\test-spe-api.ps1 to test the API

  • Verify that SPE remoting is enabled in Spe.config

  • Check Sitecore logs: https://your-sitecore-instance.com/sitecore/admin/showlog.aspx

Items not found

  • Verify that the path exists (case-sensitive!)

  • Verify database (master/web/core)

  • Check language code (en/nl/etc.)

For more details, see docs/guides/INSTALLATION.md.

āš ļø Security

Warning: This configuration is intended for LOCAL development!

For production environments:

  • āœ… Use HTTPS with valid certificate

  • āœ… No credentials in configuration files

  • āœ… Use Sitecore API keys

  • āœ… Restrict SPE permissions

  • āœ… Enable SSL certificate verification

šŸ¤ Contributing

Suggestions and improvements are welcome! Create an issue or submit a pull request.

šŸ“„ License

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables 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.

  1. ✨ Features
    1. šŸŽÆ Core Tools (18 total)
    2. šŸ“£ Live progress (all tools)
    3. šŸŽØ Examples
  2. šŸ“š Docs Map
    1. šŸ“ Repository Structuur
      1. Purpose per Directory
    2. āœ… API Status
      1. Requirements
        1. šŸš€ Quick Start
          1. 1. Install dependencies
          2. 2. Test SPE API
          3. 3. Configure your IDE/Tool
          4. 4. Restart your tool
        2. šŸ’” Gebruik Voorbeelden
          1. Slash Command Menu (New in v1.2.0!)
          2. Direct Commands
        3. Sitecore PowerShell Extensions API
          1. šŸ“š Documentation
            1. šŸ”§ Troubleshooting
              1. MCP server doesn't appear
              2. SPE API errors
              3. Items not found
            2. āš ļø Security
              1. šŸ¤ Contributing
                1. šŸ“„ License

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/GaryWenneker/SitecoreMCP'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server