Skip to content

@timbenniks/contentstack-webmcpAgent-ready public sites

WebMCP tools for Contentstack public sites โ€” built by Tim Benniks.

Experimental ยท Unofficial

Built by Tim Benniks. This is not an official Contentstack product and is not supported by Contentstack.

Quick install โ€‹

bash
npm install @timbenniks/contentstack-webmcp @contentstack/delivery-sdk

Minimal setup โ€‹

typescript
import contentstack from "@contentstack/delivery-sdk";
import { createContentstackWebMcp, isWebMcpSupported } from "@timbenniks/contentstack-webmcp";

const stack = contentstack.stack({
  apiKey: import.meta.env.VITE_CONTENTSTACK_API_KEY,
  deliveryToken: import.meta.env.VITE_CONTENTSTACK_DELIVERY_TOKEN,
  environment: import.meta.env.VITE_CONTENTSTACK_ENVIRONMENT,
});

const webmcp = createContentstackWebMcp({
  mode: "direct",
  stack,
  contentTypes: [{ uid: "page", label: "Page", urlField: "url", titleField: "title" }],
});

if (isWebMcpSupported()) {
  const controller = new AbortController();
  await webmcp.register({ signal: controller.signal, navigate: (p) => location.assign(p) });
}

Use a read-only delivery token scoped to an environment holding only content you are happy to have public. To keep the token off the client, switch to proxy mode โ€” one config line plus a server route.

Your framework โ€‹

Guides for React, Next.js, Remix, Vue, Nuxt, Svelte, Angular, Solid, Astro, and plain HTML โ€” plus server runtimes if you host the proxy.

Pick your stack โ†’

PackageUse when
@timbenniks/contentstack-webmcpAgents run in the browser tab on your public site
@contentstack/mcpExternal MCP clients (Claude Desktop, Cursor, etc.)

Released under the MIT License.