Dev

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

  1. Ask your AI assistant to build something with the CloudCart API
  2. The assistant searches the CloudCart GraphQL schema for relevant types, queries, and mutations
  3. 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

APIStatusDescription
Admin GraphQL APIAvailableFull store management — products, orders, customers, discounts, settings
Storefront APIComing soonCustomer-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"]
    }
  }
}
  1. Open Cursor > Settings > Cursor Settings > Tools and Integrations > New MCP Server
  2. Paste the configuration above
  3. 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@latest

Then 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

  1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Select MCP: Open User Configuration
  3. Add to your mcp.json:
{
  "servers": {
    "cloudcart-dev-mcp": {
      "command": "npx",
      "args": ["-y", "@cloudcart/dev-mcp@latest"]
    }
  }
}
  1. 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.

ParameterTypeDescription
apistringWhich API to learn about. Currently: admin
modelstringYour AI model name (e.g. claude-sonnet-4-6)
conversationIdstringOptional. Reuse an existing conversation ID

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, …
ParameterTypeDescription
querystringNatural-language description of what you want to do or find
kindsstring[]Optional filter: type, field, operation, op-arg, input-field
limitnumberTop matches to return (1–20, default 8)
conversationIdstringRequired. 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.

ParameterTypeDescription
querystringSearch term (e.g. product, createOrder, discount)
filterstring[]Filter by category: all, types, queries, mutations
conversationIdstringRequired. From learn_cloudcart_api
apistringWhich 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.

ParameterTypeDescription
codeblocksarrayArray of { content, artifactId?, revision? } objects
conversationIdstringRequired. From learn_cloudcart_api
apistringWhich API schema to validate against. Default: admin

Features:

  • Detects invalid or hallucinated fields with "Did you mean..." suggestions
  • Warns about deprecated fields with INFORM status
  • 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?":

  1. AI calls learn_cloudcart_api to get instructions and a conversation ID
  2. AI calls semantic_search with "create a product" if it doesn't know the operation name — or goes straight to step 3
  3. AI calls introspect_graphql_schema with query createProduct to find the mutation and its input type
  4. AI calls introspect_graphql_schema with query CreateProductInput to discover required fields
  5. AI generates a GraphQL mutation based on the schema
  6. AI calls validate_graphql_codeblocks to verify the mutation is correct
  7. If validation fails, AI fixes errors and re-validates
  8. You receive a working, verified GraphQL mutation

Install

npm install -g @cloudcart/dev-mcp

Or use directly without installing:

npx @cloudcart/dev-mcp

On this page