npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sitecore-gql-mcp

v0.1.0-alpha.0

Published

Ship-anywhere MCP server that turns user-defined Sitecore GraphQL queries into MCP tools. Bundles generic read-only get_item / search / list_sites tools; extend with your own.

Readme

sitecore-gql-mcp

Ship-anywhere MCP server that turns user-defined Sitecore GraphQL queries into MCP tools. Runs on any standard Sitecore GraphQL endpoint (XP ItemService, XM Cloud, Edge). Bundles two generic tools (get_item, search) so it works out of the box; point it at a folder of your own tool definitions to extend or override.

Quick start

# get_item + search, no config, over stdio
SITECORE_API_KEY=xxx npx -y sitecore-gql-mcp \
  --endpoint https://cm.local/sitecore/api/graph/items/master

Wire it into an MCP client (Claude Code .mcp.json, VS Code .vscode/mcp.json, Copilot):

{
  "mcpServers": {
    "sitecore": {
      "command": "npx",
      "args": ["-y", "sitecore-gql-mcp", "--tools", "./my-tools"],
      "env": {
        "SITECORE_GRAPHQL_ENDPOINT": "https://cm.local/sitecore/api/graph/items/master",
        "SITECORE_API_KEY": "{APIKEY}"
      }
    }
  }
}

Define your own tools

A tool is a folder of up to three files:

my-tools/get_setting/
  index.yaml     # name, description, input (JSON Schema), variable mapping, query file
  query.gql      # the GraphQL document
  transform.js   # optional (data, args) => result — reshape the raw result

sitecore-gql-mcp init scaffolds a config file and an example get_setting tool to copy from.

  • variables maps tool args onto GraphQL variables. A template of exactly {{arg}} passes the raw typed value; anything else is rendered as a string (e.g. build a path).
  • transform.js default-exports (data, args) => result. Without it, an optional transform: JMESPath string is applied; without either, the raw data is returned.
  • REST tools: replace query with a rest: { path, method, query } block to hit an endpoint on the same host with the same auth (for data GraphQL does not expose).

Commands

sitecore-gql-mcp                 # stdio (default)
sitecore-gql-mcp serve --port 3000   # Streamable-HTTP
sitecore-gql-mcp list                # print discovered tools
sitecore-gql-mcp validate            # load + validate tools (CI), non-zero on error
sitecore-gql-mcp init                # scaffold config + example tool
sitecore-gql-mcp --help

Configuration

CLI flag > env var > sitecore-gql-mcp.config.yaml (cwd) > default.

| Flag | Env | Default | |------|-----|---------| | --endpoint | SITECORE_GRAPHQL_ENDPOINT | (required) | | --api-key | SITECORE_API_KEY | — | | --api-key-header | SITECORE_API_KEY_HEADER | sc_apikey | | --bearer | SITECORE_BEARER | — | | --tools <dir,…> | SITECORE_MCP_TOOLS | ./tools if present | | --no-builtins | SITECORE_NO_BUILTINS | off | | --disable a,b | SITECORE_DISABLE_TOOLS | — | | --allow-mutations | SITECORE_ALLOW_MUTATIONS | off (read-only) | | --port | PORT | 3000 | | --insecure | SITECORE_INSECURE | off |

Read-only by default

Any tool whose GraphQL document contains a mutation is refused unless you pass --allow-mutations. Combined with the read-only tool annotations, the default server is safe to hand to an agent.

License

MIT