CloudCart Dev MCP Server
Connect AI assistants to CloudCart's GraphQL APIs for accurate code generation and validation.
The CloudCart Dev MCP server connects AI coding assistants to CloudCart's development resources. It gives your AI assistant direct access to the GraphQL schema, so it can generate accurate queries, mutations, and provide guidance based on the actual API structure.
How it works
- Ask your AI assistant to build something with the CloudCart API
- The assistant searches the CloudCart GraphQL schema for relevant types, queries, and mutations
- The MCP server validates generated GraphQL code against the real schema before presenting it to you
This eliminates hallucinated fields and incorrect queries — every GraphQL operation your AI writes is verified against the live CloudCart schema.
Requirements
- Node.js 18 or higher
- An AI development tool that supports MCP (Claude Code, Cursor, Claude Desktop, VS Code, Codex CLI, Gemini CLI)
What you can ask your AI assistant
Once the MCP server is configured, you can ask questions like:
- "How do I create a product using the CloudCart Admin API?"
- "What fields are available on the Order object?"
- "Write a mutation to update a customer's email"
- "How do I query paginated products with filters?"
- "Create a discount with a coupon code"
- "What's the input type for creating an order?"
Supported APIs
| API | Status | Description |
|---|---|---|
| Admin GraphQL API | Available | Full store management — products, orders, customers, discounts, settings |
| Storefront API | Coming soon | Customer-facing headless API for custom storefronts |
Set up the server
Cursor
Add to your Cursor MCP configuration:
{
"mcpServers": {
"cloudcart-dev-mcp": {
"command": "npx",
"args": ["-y", "@cloudcart/dev-mcp@latest"]
}
}
}- Open Cursor > Settings > Cursor Settings > Tools and Integrations > New MCP Server
- Paste the configuration above
- Save and restart Cursor
Windows:
{
"mcpServers": {
"cloudcart-dev-mcp": {
"command": "cmd",
"args": ["/k", "npx", "-y", "@cloudcart/dev-mcp@latest"]
}
}
}Claude Code
Run this command in your terminal:
claude mcp add --transport stdio cloudcart-dev-mcp -- npx -y @cloudcart/dev-mcp@latestThen restart Claude Code.
Claude Desktop
Open your Claude Desktop configuration file and add:
{
"mcpServers": {
"cloudcart-dev-mcp": {
"command": "npx",
"args": ["-y", "@cloudcart/dev-mcp@latest"]
}
}
}Save and restart Claude Desktop.
VS Code
- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Select MCP: Open User Configuration
- Add to your
mcp.json:
{
"servers": {
"cloudcart-dev-mcp": {
"command": "npx",
"args": ["-y", "@cloudcart/dev-mcp@latest"]
}
}
}- Save and restart VS Code
Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.cloudcart-dev-mcp]
command = "npx"
args = ["-y", "@cloudcart/dev-mcp@latest"]Gemini CLI
Add to ~/.gemini/settings.json (or .gemini/settings.json in your project):
{
"mcpServers": {
"cloudcart-dev-mcp": {
"command": "npx",
"args": ["-y", "@cloudcart/dev-mcp@latest"]
}
}
}Then restart Gemini CLI and verify with /mcp.
Available tools
The MCP server provides four tools that work together:
learn_cloudcart_api
Teaches your AI assistant how to use the CloudCart GraphQL APIs and generates a conversation ID for tracking tool calls within a session.
Always called first — other tools require the conversation ID this tool generates.
| Parameter | Type | Description |
|---|---|---|
api | string | Which API to learn about. Currently: admin |
model | string | Your AI model name (e.g. claude-sonnet-4-6) |
conversationId | string | Optional. Reuse an existing conversation ID |
semantic_search
Natural-language search over the GraphQL schema. Use it when you know what you want to accomplish but not the exact type or field name — it understands intent, in any language (English, Bulgarian, …).
"customers who spent a lot" → Customer, orders_sum filters, …
"направи отстъпка за нови клиенти" → Discount, DiscountCodeInput, …| Parameter | Type | Description |
|---|---|---|
query | string | Natural-language description of what you want to do or find |
kinds | string[] | Optional filter: type, field, operation, op-arg, input-field |
limit | number | Top matches to return (1–20, default 8) |
conversationId | string | Required. From learn_cloudcart_api |
Returns the top matching types, fields, operations, and input fields ranked by semantic similarity, with signatures and descriptions. Follow up with introspect_graphql_schema for full details on an exact name.
introspect_graphql_schema
Searches the CloudCart GraphQL schema for types, queries, and mutations by exact name. Uses substring matching — use it when you already know the name (Product, createOrder); use semantic_search when you only know the goal.
| Parameter | Type | Description |
|---|---|---|
query | string | Search term (e.g. product, createOrder, discount) |
filter | string[] | Filter by category: all, types, queries, mutations |
conversationId | string | Required. From learn_cloudcart_api |
api | string | Which API schema to search. Default: admin |
Tips:
- Search by resource name:
product,order,customer,discount - Search by action:
create,update,delete - If no results, try shorter or broader terms
- Results are limited to 10 per category, sorted by relevance
validate_graphql_codeblocks
Validates GraphQL queries and mutations against the CloudCart schema. Catches syntax errors, invalid fields, and incorrect types before you use them.
| Parameter | Type | Description |
|---|---|---|
codeblocks | array | Array of { content, artifactId?, revision? } objects |
conversationId | string | Required. From learn_cloudcart_api |
api | string | Which API schema to validate against. Default: admin |
Features:
- Detects invalid or hallucinated fields with "Did you mean..." suggestions
- Warns about deprecated fields with
INFORMstatus - Correctly identifies query vs mutation operations
- Tracks iterations with artifact IDs and revision numbers
Example workflow
Here's what happens behind the scenes when you ask "How do I create a product?":
- AI calls
learn_cloudcart_apito get instructions and a conversation ID - AI calls
semantic_searchwith "create a product" if it doesn't know the operation name — or goes straight to step 3 - AI calls
introspect_graphql_schemawith querycreateProductto find the mutation and its input type - AI calls
introspect_graphql_schemawith queryCreateProductInputto discover required fields - AI generates a GraphQL mutation based on the schema
- AI calls
validate_graphql_codeblocksto verify the mutation is correct - If validation fails, AI fixes errors and re-validates
- You receive a working, verified GraphQL mutation
Install
npm install -g @cloudcart/dev-mcpOr use directly without installing:
npx @cloudcart/dev-mcpRelated resources
- GraphQL Admin API — Full API reference and guides
- CloudCart CLI — execute the queries your assistant writes (CLI + AI agents)
- AI Integrations — per-client setup guides: Claude, Codex/ChatGPT, Gemini, Cursor
- Nitrogen — headless storefronts powered by the Storefront API
- Getting Started — Authentication and first API call
- Composio CloudCart toolkit — 150 pre-built tools for agent frameworks, with managed auth