
Crystallize MCP
io.github.HayoDev由 GitHub 帳號 HayoDev 發布v0.2.0更新於 Oct 25, 2026
Crystallize headless commerce tools for AI agents via Model Context Protocol
概覽
本機 MCP 伺服器,讓 AI 助理讀寫 Crystallize 無頭電商的商品目錄、形狀、訂單、客戶與內容。
- 可以做什麼
- 瀏覽、取得並以關鍵字搜尋商品目錄項目,列出含價格與庫存的商品變體,每個回應都附有回到 Crystallize 介面的深層連結。檢視形狀及其可查詢欄位,並依篩選、分頁與欄位選擇瀏覽某個形狀下的項目。讀取形狀與租戶設定,包括可用語言(需要驗證)。分頁列出並檢視訂單與客戶(需要驗證)。建立項目並更新單一元件值,包括巢狀內容區塊,僅寫入草稿。
- 適用情境
- 適合讓助理在 Crystallize 商店內工作:查詢商品與內容、回答訂單與客戶相關問題,或起草新項目與元件修改,再由人員在 Crystallize 介面中審核並發布。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js。必須設定 CRYSTALLIZE_TENANT_IDENTIFIER;目錄與探索類工具無需驗證。PIM 工具(形狀、租戶資訊、訂單、客戶)需要 CRYSTALLIZE_ACCESS_TOKEN_ID 與 CRYSTALLIZE_ACCESS_TOKEN_SECRET,或 CRYSTALLIZE_STATIC_AUTH_TOKEN。寫入工具需要將 CRYSTALLIZE_ACCESS_MODE 設為 write 或 admin,並使用具寫入權限的權杖。需要能連線至 Crystallize 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Crystallize MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Crystallize MCP
[npm version] [npm downloads] [license] [node]
MCP server for Crystallize headless commerce. Gives AI agents read and write access to your catalogue, products, shapes, orders, customers, and tenant config — with deep links back to the Crystallize UI, dry-run safety for mutations, and PII masking for customer data.
Works with Claude Code, Claude Desktop, Cursor, Windsurf, Copilot, and any MCP-compatible client.
Getting started
Setup wizard
The interactive wizard handles config, auth tokens, keychain storage, and PII mode in one step:
Manual config
Standard MCP config (works in any client):
Add CRYSTALLIZE_ACCESS_TOKEN_ID and CRYSTALLIZE_ACCESS_TOKEN_SECRET to the env block for PIM tools (shapes, orders, customers). See Authentication.
Claude Code (CLI)
Use --scope project to write to .mcp.json (shared with your team) or --scope user for personal use across all projects.
Claude Desktop
Add the standard config to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
Cursor
Add the standard config to your Cursor MCP settings (~/.cursor/mcp.json or the project-level .cursor/mcp.json).
VS Code / GitHub Copilot
Add the standard config to .vscode/mcp.json in your project root.
Windsurf
Add the standard config to ~/.codeium/windsurf/mcp_config.json.
Gemini CLI
Add the standard config to ~/.gemini/settings.json.
JetBrains AI Assistant
Add the standard config to .junie/mcp.json in your project root.
Warp
Add the standard config to ~/.warp/mcp.json.
Raycast
Open "Install MCP Server" in Raycast and fill in:
- Command:
npx - Arguments:
-y @hayodev/crystallize-mcp@latest - Environment: add
CRYSTALLIZE_TENANT_IDENTIFIERand your token vars
Or copy the standard config JSON above before opening the command — Raycast will auto-fill the form.
From source (maintainers)
The --local flag is for developing crystallize-mcp itself. It writes .mcp.json pointing to the local build output — run this from the repo root only:
Or point your MCP client directly at the built entry point:
Tools (16)
Catalogue (4 tools)
Discovery (3 tools)
Shapes & Tenant (3 tools, requires auth)
Orders (2 tools, requires auth)
Customers (2 tools, requires auth)
Content (2 tools, requires auth + write mode)
Write tools
Write tools require CRYSTALLIZE_ACCESS_MODE=write (or admin) and a token with write permissions.
Dry-run mode
Set CRYSTALLIZE_DRY_RUN=true to preview mutations without executing them. The response shows exactly what would change — the mutation payload, before/after values, and a deep link to the item:
Example prompts
Create an item:
"Create a new blog post under /blog using the article shape with title 'Getting Started'"
Update a top-level component:
"Find the item at /products/summer-collection and update its description to 'New summer arrivals'"
Update a component inside a content chunk:
"Get the item at /articles/my-post, then update hero.title to 'Updated Headline' and give me the deep link to review the draft"
Update with change summary:
"Get the item at /articles/guides/my-guide, update its title component to 'New Guide Title', give me the deep link, and show a table of which fields in the chunk changed vs remained unchanged with before/after values"
The agent will update the target component in draft only, preserve all sibling components in the chunk, and return a summary like:
No publishing happens — you review the change in the Crystallize UI via the deep link and publish when ready.
Authentication
Catalogue and Discovery tools work without auth — just set CRYSTALLIZE_TENANT_IDENTIFIER.
For PIM tools (shapes, tenant info, orders, customers), create an access token at:
https://app.crystallize.com/{tenant}/en/settings/access-tokens
Note: Crystallize tokens inherit permissions from the user who created them. To restrict an agent to read-only access, generate the token under a user with a read-only role. See Crystallize Roles.
Environment variables
PII mode (opt-in)
By default all customer and order data is returned as-is (full). Set CRYSTALLIZE_PII_MODE to opt in to data minimisation:
Applies to list_customers, get_customer, list_orders, and get_order. No effect on catalogue or shape tools.
Relevant for teams handling real customer data, GDPR Article 25 compliance (data minimisation by design), or environments where the AI doesn't need raw contact details to do its job. A common pattern is masked on production and full on dev.
Audit log (opt-in)
Set CRYSTALLIZE_AUDIT_LOG to an absolute file path to enable structured logging of every tool call:
One JSON line per call — timestamp, tool name, params, result (ok/error), and tenant. Write tools also log mutation metadata (before/after state) for audit trails.
Note: Params are logged as-is and may contain PII — for example, a
searchTermof[email protected]or acustomerIdentifier. Treat the audit log file as sensitive data and restrict access accordingly. Param scrubbing is on the roadmap but not yet implemented.
Easy to pipe into log aggregators (Datadog, CloudWatch, Splunk) — but ensure your pipeline handles the file with appropriate access controls.
Keychain storage (optional)
The setup wizard (npx @hayodev/crystallize-mcp --setup) can store tokens in the OS keychain (macOS Keychain, Windows Credential Manager, or libsecret on Linux) so they never appear as plain text in config files. The MCP server resolves credentials from the keychain automatically at startup — no extra configuration needed.
This is useful when:
- Your
.mcp.jsonis committed to git — keychain keeps tokens out of the repository - You prefer not to have secrets in plain text config files — the config only needs
CRYSTALLIZE_TENANT_IDENTIFIER
When using --setup --global with Claude Code, this applies only if keychain storage is available and you opt into it: in that case, the wizard runs claude mcp add with only the non-secret env vars, and tokens are read from the keychain at runtime so they do not appear in Claude Code config. If keychain storage is unavailable or you choose not to use it, the wizard passes token env vars to claude mcp add, and Claude Code may store them in plain text.
Access mode
CRYSTALLIZE_ACCESS_MODE controls which tools the MCP server registers at startup:
read(default) — read-only tools onlywrite— includes content creation and component updates (with dry-run support)admin— full access including shape modifications and tenant config
Deep links
Every response includes clickable links to the Crystallize UI:
- Items →
app.crystallize.com/@{tenant}/{language}/catalogue/{type}/{itemId} - Shapes →
app.crystallize.com/@{tenant}/{language}/settings/shapes/{identifier} - Orders →
app.crystallize.com/@{tenant}/{language}/orders/{orderId}
The language segment is automatically set from the tenant's default language, bootstrapped at server startup — no configuration needed. Tools that accept a language parameter (catalogue, search) use the requested language in both the API call and the generated link.
Development
License
MIT
來源:README.md,提交 68282f3
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分