icon for mcp server

Sitecore

STDIO

Model Context Protocol server for Sitecore with GraphQL, Item Service, and PowerShell APIs

Model Context Protocol server for Sitecore

Build

PRs Welcome

Implemented tools

  • GraphQL API

    • introspection-grahpql-{schema}: returns the GraphQL schema
    • query-graphql-{schema}: executes a GraphQL query
  • Item Service API

    • item-service-get-item: returns an item by ID
    • item-service-get-item-children: returns the children of an item by ID
    • item-service-get-item-by-path: returns an item by path
    • item-service-create-item: creates an item by providing a template ID and parent path.
    • item-service-edit-item: edits an item by ID
    • item-service-delete-item: deletes an item by ID
    • item-service-search-items: searches for items
    • item-service-run-stored-query: runs a stored query
    • item-service-run-stored-search: runs a stored search
    • Composite Item Service API
      • item-service-get-languages: returns Sitcore languages in the instance
      • item-service-get-item-descendants: returns the descendants of an item by ID
  • Sitecore Powershell

    • Security
      • security-get-current-user: returns the current user
      • security-get-user-by-identity: returns a user by name
      • security-get-user-by-filter: returns a user by filter
      • security-new-domain: creates a new domain
      • security-new-user: creates a new user
      • security-new-role: creates a new role
      • security-remove-domain: removes a domain
      • security-remove-user: removes a user
      • security-remove-role: removes a role
      • security-get-domain: returns a domains
      • security-get-domain-by-name: returns a domain by name
      • security-get-role-by-identity: returns a role by name
      • security-get-role-by-filter: returns a role by filter
      • security-get-role-member: returns members of a role
      • security-enable-user: enables a user
      • security-disable-user: disables a user
      • security-set-user-password: changes a user's password
      • security-lock-item-by-id: locks an item by ID
      • security-unlock-item-by-id: unlocks an item by ID
      • security-lock-item-by-path: locks an item by path
      • security-unlock-item-by-path: unlocks an item by path
      • security-protect-item-by-id: protects an item by ID
      • security-protect-item-by-path: protects an item by path
      • security-unprotect-item-by-id: unprotects an item by ID
      • security-unprotect-item-by-path: unprotects an item by path
      • security-test-acccount: tests an account
      • security-unlock-user: unlocks a user
        • test covergage requires logging user with wrong password
      • security-login-user: logs in a user. Blocked by SPE issue.
      • security-logout-user: logs out a user. Blocked by SPE issue
      • security-export-user: exports a user. Blocked by SPE issue
      • security-import-user: imports a user. Blocked by SPE issue
      • security-export-role: exports a role. Blocked by SPE issue
      • security-import-role: imports a role. Blocked by SPE issue
      • security-add-role-member: adds a member to a role
      • security-remove-role-member: removes a member from a role
      • security-test-item-acl-by-id: tests an item ACL by ID
      • security-test-item-acl-by-path: tests an item ACL by path
      • security-add-item-acl-by-id: adds an item ACL by ID
      • security-add-item-acl-by-path: adds an item ACL by path
      • security-clear-item-acl-by-id: clears an item ACL by ID
      • security-clear-item-acl-by-path: clears an item ACL by path
      • security-set-item-acl-by-id: sets an item ACL by ID
      • security-set-item-acl-by-path: sets an item ACL by path
    • Provider
      • provider-get-item-by-id: returns an item by ID
      • provider-get-item-by-path: returns an item by path
      • provider-get-item-by-query: returns an item by query
      • provider-get-item-by-path: returns an item by path
    • Presentation
      • presentation-get-layout-by-id: returns item presentation layout by ID
      • presentation-get-layout-by-path: returns item presentation layout by path
      • presentation-set-layout-by-id: sets item presentation layout by ID
      • presentation-set-layout-by-path: sets item presentation layout by path
      • presentation-reset-layout-by-id: resets item presentation layout by ID
      • presentation-reset-layout-by-path: resets item presentation layout by path
      • presentation-merge-layout-by-id: Merges final and shared layouts by item Id
      • presentation-merge-layout-by-path: Merges final and shared layouts by item path
      • presentation-get-layout-device: Gets the layout for the device specified
      • presentation-get-default-layout-device: Gets the default layout
    • Indexing
      • indexing-initialize-search-index: initializes one or more search indexes
      • indexing-get-search-index: returns a search index
      • indexing-find-item: finds an item in a search index
      • indexing-suspend-search-index: suspends one or more running search indexes
      • indexing-stop-search-index: stops one or more running search indexes
      • indexing-resume-search-index: resumes one or more paused search indexes
      • indexing-initialize-search-index-item-by-id: rebuilds the index for a given tree with the specified root item by ID and index name
      • indexing-initialize-search-index-item-by-path: rebuilds the index for a given tree with the specified root item by path and index name
      • indexing-remove-search-index-item-by-id: removes the item with the specified ID from the search index
      • indexing-remove-search-index-item-by-path: removes the item with the specified path from the search index
      • indexing-initialize-item: initializes items with the PowerShell automatic properties for each field. Skipped, no value for MCP server.
    • Common
      • common-get-database: returns information about Sitecore databases
      • common-get-cache: returns information about Sitecore caches
      • common-get-item-template-by-id: returns template information for a Sitecore item by ID
      • common-get-item-template-by-path: returns template information for a Sitecore item by path
      • common-get-item-reference-by-id: returns item references (where it is used) for a Sitecore item by ID
      • common-get-item-reference-by-path: returns item references (where it is used) for a Sitecore item by path
      • common-get-item-referrer-by-id: returns items referring to a Sitecore item by ID (which items reference it)
      • common-get-item-referrer-by-path: returns items referring to a Sitecore item by path (which items reference it)
    • Logging
      • logging-get-logs: retrieves Sitecore logs from the log directory with filtering options
  • Sitecore CLI

Tools selection

AI Agents may have limit on the amount of tools they can use. Please make sure that you have disabled the tools you don't need. It will make your agent faster, cheaper and more efficient.

Installation

Add the following Model Context Protocol server to your Cursor, VS Code, Claud:

"Sitecore": { "type": "stdio", "command": "npx", "args": ["@antonytm/mcp-sitecore-server@latest"], "env": { "TRANSPORT": "stdio", "GRAPHQL_ENDPOINT": "https://xmcloudcm.localhost/sitecore/api/graph/", "GRAPHQL_SCHEMAS": "edge,master,core", "GRAPHQL_API_KEY": "{6D3F291E-66A5-4703-887A-D549AF83D859}", "GRAPHQL_HEADERS": "", "ITEM_SERVICE_DOMAIN": "sitecore", "ITEM_SERVICE_USERNAME": "admin", "ITEM_SERVICE_PASSWORD": "b", "ITEM_SERVICE_SERVER_URL": "https://xmcloudcm.localhost/", "POWERSHELL_DOMAIN": "sitecore", "POWERSHELL_USERNAME": "admin", "POWERSHELL_PASSWORD": "b", "POWERSHELL_SERVER_URL": "https://xmcloudcm.localhost/", } }

Environment Variables Description

  • TRANSPORT: The transport protocol to use. Options are stdio or sse.
  • GRAPHQL_ENDPOINT: The GraphQL endpoint URL for the Sitecore instance.
  • GRAPHQL_SCHEMAS: The Sitecore schemas to use for the GraphQL API, comma-separated.
  • GRAPHQL_API_KEY: The API key for the GraphQL endpoint.
  • GRAPHQL_HEADERS: Additional headers to include in the GraphQL requests.
  • ITEM_SERVICE_DOMAIN: The domain for the Item Service API authentication. Default is sitecore.
  • ITEM_SERVICE_USERNAME: The username for the Item Service API authentication.
  • ITEM_SERVICE_PASSWORD: The password for the Item Service API authentication.
  • ITEM_SERVICE_SERVER_URL: The base URL for the Item Service API.
  • POWERSHELL_DOMAIN: The domain for the Sitecore PowerShell Remoting API authentication. Default is sitecore.
  • POWERSHELL_USERNAME: The username for the Sitecore PowerShell Remoting API authentication.
  • POWERSHELL_PASSWORD: The password for the Sitecore PowerShell Remoting API authentication.
  • POWERSHELL_SERVER_URL: The base URL for the Sitecore PowerShell Remoting API.

Resources list

  • config: returns the configuration of the server. Use it to check if everything is properly configured.

Local Installation / Development

  1. Clone the repository
  2. Run npm install to install dependencies
  3. Run npm run build to build the project
  4. Run npm start to start the server

Contributing

Please read CONTRIBUTING.md for details.

Be the First to Experience MCP Now