MCP

A Streamable HTTP Model Context Protocol server over the live Cubix registry - so Cursor, Codex, Claude, and other agents can list, search, and install components without scraping the docs.

One public URL for every MCP client. Pair it with the Cubix Skill for composition rules.

The endpoint is public and read-only. It speaks MCP 2025-03-26 Streamable HTTP (JSON or SSE responses), backed by the same public/r catalog the CLI uses. No API key is required for registry reads.

Endpoint: https://cubixflow.ir/api/mcp

Cursor

Add a remote server in project .cursor/mcp.json or the global ~/.cursor/mcp.json, then enable Cubix in Cursor Settings → MCP:

.cursor/mcp.json
{
  "mcpServers": {
    "cubix": {
      "url": "https://cubixflow.ir/api/mcp"
    }
  }
}

Codex

CLI:

Terminal
codex mcp add cubix --url https://cubixflow.ir/api/mcp

Or in ~/.codex/config.toml (top-level key is mcp_servers):

config.toml
[mcp_servers.cubix]
url = "https://cubixflow.ir/api/mcp"

Claude

Claude Code / Claude Desktop style clients:

Terminal
claude mcp add --transport http cubix https://cubixflow.ir/api/mcp

Tools

Five tools wrap the public registry. Prefer search_components then get_component_demo before composing a screen; use get_install_command or the install field from get_component so the agent runs cubix-ui add instead of pasting stubs.

  • list_components

    Every installable registry name with title, bases, and docs URL.

  • search_components

    Find components by name, title, or description.

  • get_component

    Install command, dependencies, files (optional source).

  • get_component_demo

    Paste-ready docs demo with public @/components/cubix imports.

  • get_install_command

    Exact cubix-ui add line for one or more names.

Protocol notes

  • Client-agnostic - any MCP host that supports Streamable HTTP can use the same URL (Cursor, Codex, Claude, and others).
  • Transport - single POST endpoint. GET returns 405 (no long-lived SSE listen stream).
  • Responses - if Accept includes text/event-stream, the server replies with SSE event: message frames; otherwise JSON.
  • Sessions - stateless. No Mcp-Session-Id is issued.
  • Notifications - notifications/initialized and similar return 202 Accepted with an empty body.
Terminal
curl -sS -X POST https://cubixflow.ir/api/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2025-03-26",
      "capabilities": {},
      "clientInfo": { "name": "curl", "version": "1.0.0" }
    }
  }'

With Skills

MCP gives the agent live registry tools. The Cubix Skill teaches project context (cubix.json), token rules, bases, and composition. Install both for the best results:

Terminal
npx skills add aminebdali1992/cubix-design-system
# then connect MCP in Cursor, Codex, or Claude - see above

Next steps