Framework-native first
Guides for React, Next.js, Remix, Vue, Nuxt, Svelte, Angular, Solid, Astro, and plain HTML. Only React has an adapter, and it is optional.
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.
npm install @timbenniks/contentstack-webmcp @contentstack/delivery-sdkimport 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.
Guides for React, Next.js, Remix, Vue, Nuxt, Svelte, Angular, Solid, Astro, and plain HTML โ plus server runtimes if you host the proxy.
| Package | Use when |
|---|---|
| @timbenniks/contentstack-webmcp | Agents run in the browser tab on your public site |
| @contentstack/mcp | External MCP clients (Claude Desktop, Cursor, etc.) |