{
  "markdown": "# @neuraldraft/mcp\n\n> Make AI-built sites real businesses. Plug Neural Draft's CMS, blog, social, booking, and commerce APIs into Claude Code, Cursor, Continue, and any other MCP client.\n\n[![npm version](https://img.shields.io/npm/v/@neuraldraft/mcp.svg)](https://www.npmjs.com/package/@neuraldraft/mcp)\n[![npm downloads](https://img.shields.io/npm/dw/@neuraldraft/mcp.svg)](https://www.npmjs.com/package/@neuraldraft/mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![MCP Registry](https://img.shields.io/badge/MCP-registry-7c3aed.svg)](https://registry.modelcontextprotocol.io)\n\n## What it does\n\n`@neuraldraft/mcp` is a [Model Context Protocol](https://modelcontextprotocol.io) server that gives AI coding tools first-class access to the [Neural Draft](https://neuraldraft.io) backend platform. When your AI assistant builds a site, it can:\n\n- read your project's brand context (voice, colors, fonts, audience)\n- register every section it generates as an editable component in your admin\n- create translation keys, kick off blog/image generation, list products, set up booking widgets\n- emit markup that's CMS-managed by default — no manual wiring\n\n## Demo\n\nA real Claude Code session driving Neural Draft via MCP. One natural-language prompt creates 4 translation keys (EN + HR) and registers a hero image.\n\n![MCP demo](./assets/demo.gif)\n\n[Watch the full MP4 →](./assets/demo.mp4)\n\n## Why it exists\n\nAI codegen tools (Lovable, Claude Code, v0, Bolt, Cursor) are excellent at building frontends. They're terrible at the bits that make a frontend a real business — multi-language CMS, blog pipelines, social scheduling, bookings, e-commerce. Neural Draft is the backend that handles those. This MCP server is the wire between the two: the AI tool generates code that uses Neural Draft correctly **by default**, because the conventions and tools are exposed as MCP context.\n\nThe pitch: *\"Build your site with Lovable. Run the actual business on Neural Draft.\"*\n\n## Quick install\n\nYou need a Neural Draft project API key. Get one at [neuraldraft.io/dashboard/api-keys](https://neuraldraft.io/dashboard/api-keys). Test-mode keys (`ndsk_test_…`) work out of the box.\n\n### Claude Code\n\n`~/.config/claude-code/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"neuraldraft\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@neuraldraft/mcp\"],\n      \"env\": {\n        \"NEURALDRAFT_API_KEY\": \"ndsk_live_xxxxxxxxxxxxxxxxxxxxxxxx\"\n      }\n    }\n  }\n}\n```\n\nOr use the CLI:\n\n```bash\nclaude mcp add neuraldraft \\\n  -e NEURALDRAFT_API_KEY=ndsk_live_xxx \\\n  -- npx -y @neuraldraft/mcp\n```\n\n### Cursor\n\n`.cursor/mcp.json` (workspace) or `~/.cursor/mcp.json` (global):\n\n```json\n{\n  \"mcpServers\": {\n    \"neuraldraft\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@neuraldraft/mcp\"],\n      \"env\": {\n        \"NEURALDRAFT_API_KEY\": \"ndsk_live_xxxxxxxxxxxxxxxxxxxxxxxx\"\n      }\n    }\n  }\n}\n```\n\n### Continue\n\n`~/.continue/config.yaml`:\n\n```yaml\nexperimental:\n  modelContextProtocolServers:\n    - transport:\n        type: stdio\n        command: npx\n        args: [\"-y\", \"@neuraldraft/mcp\"]\n      env:\n        NEURALDRAFT_API_KEY: ndsk_live_xxxxxxxxxxxxxxxxxxxxxxxx\n```\n\nThen restart your editor. You should see `neuraldraft` listed under MCP servers, with resources, tools, and prompts available.\n\n## Auth setup\n\nThe server reads two environment variables (set by your MCP client config — never commit them):\n\n| Variable | Required | Default | Notes |\n|---|---|---|---|\n| `NEURALDRAFT_API_KEY` | yes | — | Project API key. Format: `ndsk_live_…` or `ndsk_test_…` |\n| `NEURALDRAFT_API_URL` | no | `https://api.neuraldraft.io/v1` | Override the API base. Useful for staging or local dev. |\n| `NEURALDRAFT_PROJECT_ID` | no | (derived from key) | Override when one key spans multiple projects. |\n| `NEURALDRAFT_DISPLAY_NAME` | no | — | Friendly name shown in your IDE's MCP list when you run multiple projects. |\n\n`NEURAL_DRAFT_*` (with underscore) is also accepted as an alias for any of the above.\n\n## What it exposes\n\n### Resources (read-only context)\n\n| URI | What |\n|---|---|\n| `brand://current` | Project brand: voice, audience, content tone, colors, fonts, logo, target topics |\n| `schema://blog-post` | JSON schema for blog post API responses |\n| `schema://product` | JSON schema for product API responses |\n| `schema://booking` | JSON schema for bookable services + bookings |\n| `conventions://editable-html` | The `data-translate` / `data-image-key` markup spec the AI should follow |\n| `conventions://api-usage` | Auth, errors, rate limits, idempotency, async/job patterns |\n\n### Tools (functions the AI can call)\n\n| Tool | Description |\n|---|---|\n| `get_brand` | Read the project's brand context (industry, audience, voice, colors, fonts) |\n| `update_brand` | Patch brand fields (voice, audience, colors, fonts, languages) |\n| `register_component` | Register generated HTML as editable in the admin. Call once per section. |\n| `generate_blog_post` | Kick off the AI blog pipeline (research → draft → image → SEO → translations) |\n| `get_blog_post` | Fetch a single blog post by id or slug (locale-aware) |\n| `list_blog_posts` | Paginated list with status / language / category / tag filters |\n| `update_blog_post` | Patch a post's title / body / SEO meta / status |\n| `generate_image` | Brand-consistent image generation (returns a Job) |\n| `list_images` | List registered image keys |\n| `get_image` | Resolve a single registered image URL by key |\n| `register_image` | Bind a direct image URL to a stable key (no AI) |\n| `replace_image` | Swap an image by URL or AI regeneration |\n| `delete_image` | Remove an image-key registration |\n| `generate_video` | Brand-aware video clip — budget (40 cr) or premium (300 cr) tier |\n| `create_page` | Create a TenantPage with per-page SEO meta |\n| `list_pages` | Paginated list of pages |\n| `get_page` | Fetch a page by id or slug (full SEO meta) |\n| `update_page` | Patch page fields and / or SEO meta (merge semantics) |\n| `create_translation_keys` | Bulk-create translation keys with default values |\n| `get_content` | Read a single translation key (resolved value + all_locales) |\n| `list_content` | Paginated key list with search / scope / language filters |\n| `list_products` | List the project's products (paginated) |\n| `get_product` | Fetch a single product by id or slug |\n| `create_bookable_service` | Create a bookable service (time-slot or date-range) |\n| `setup_booking_widget` | Get the embeddable booking widget HTML for a service |\n| `list_newsletter_subscribers` | List captured newsletter subscribers |\n| `list_contact_form_submissions` | List captured contact-form submissions |\n| `get_usage` | Current credit balance, monthly limit, reset date, breakdown |\n| `get_job` | Poll an async job (blog/image/video generation) for completion |\n| `find_workspaces` | List Neural Draft workspaces an email is registered against (calls the central host, not the per-tenant API) |\n\n### Prompts (slash commands)\n\n| Slash command | What it does |\n|---|---|\n| `/scaffold-marketing-site` | Generate a complete marketing site (hero, features, testimonials, pricing, CTA, footer) wired through Neural Draft |\n| `/scaffold-blog-page` | Drop a `/blog` and `/blog/[slug]` page into an existing project |\n| `/connect-existing-site` | Walk a developer through migrating an existing static site to Neural Draft |\n\n## Examples\n\n### 1. \"Build me a blog page\"\n\n```\nYou: /scaffold-blog-page framework=next language=en\n\nClaude: Reading brand://current… (voice: warm and grounded; audience: yoga-curious adults)\nClaude: Reading schema://blog-post… (got it — id, slug, title, content, featured_image, tags, …)\nClaude: Reading conventions://api-usage… (auth via Bearer ndsk_…, rate limit 60/min, RFC 7807 errors)\n\nClaude: Generating /lib/neuraldraft.ts…\nClaude: Generating /app/blog/page.tsx (index)…\nClaude: Calling register_component { intent: 'blog_index_card', html: ... }\nClaude: → cmp_2NgB7hKqL (edit at https://app.neuraldraft.io/c/cmp_2NgB7hKqL)\n\nClaude: Generating /app/blog/[slug]/page.tsx…\nClaude: Calling register_component { intent: 'blog_post_meta_block', html: ... }\nClaude: → cmp_2NgC9qPLq (edit at https://app.neuraldraft.io/c/cmp_2NgC9qPLq)\n\nClaude: Done. 2 components registered. Open the editor URLs to change copy.\n```\n\n### 2. \"Add a hero with my brand colors\"\n\n```\nYou: Build a hero section that says \"Find your calm\" with a CTA to /book.\n\nClaude: Reading brand://current… (deep sage #3F6B5C primary, linen #E8DCC4 secondary, Fraunces / Inter)\nClaude: Reading conventions://editable-html… (every text node needs data-translate)\n\nClaude: Calling generate_image { prompt: \"Serene yoga studio at dawn, sage and linen tones, no people\", aspect_ratio: \"16:9\", key: \"hero.background\" }\nClaude: → job_img_7K9L (poll with get_job)\n\nClaude: Drafting <section class=\"hero\">…</section> with data-translate=\"hero.headline\" / \"hero.subhead\" / \"hero.cta\"\nClaude: Calling register_component { intent: \"marketing_hero\", page_slug: \"home\", html: ... }\nClaude: → cmp_2NgD9KqL — translation keys created: hero.headline, hero.subhead, hero.cta.\n\nClaude: I'll poll the image job…\nClaude: Calling get_job { id: \"job_img_7K9L\" } → status: completed, url: https://cdn.neuraldraft.io/.../hero-bg.jpg\n\nClaude: Done. The hero is in your admin (https://app.neuraldraft.io/c/cmp_2NgD9KqL) — you can change the headline, swap the image, or recolor without touching code.\n```\n\n### 3. \"Set up a storefront for the products I already have\"\n\n```\nYou: I have 14 products in my Neural Draft project. Scaffold a /shop page.\n\nClaude: Calling list_products { page_size: 20 } → 14 products returned (page 1/1).\nClaude: Reading schema://product… (id, name, price_cents, currency, status, images, …)\nClaude: Reading brand://current… (warm voice; primary #3F6B5C)\nClaude: Reading conventions://editable-html…\n\nClaude: Generating /app/shop/page.tsx with a grid of 14 ProductCard components.\nClaude: Calling register_component { intent: \"product_grid_header\", page_slug: \"shop\", html: ... } → cmp_2NgE\nClaude: Generating /app/shop/[slug]/page.tsx with get_product fetch + buy-button widget.\nClaude: Calling register_component { intent: \"product_detail_layout\", page_slug: \"shop_detail\", html: ... } → cmp_2NgF\n\nClaude: Done. The grid auto-renders your 14 products (real names, prices, images). Edit the page header in admin: https://app.neuraldraft.io/c/cmp_2NgE.\n```\n\n## Local development\n\n```bash\ngit clone https://github.com/vbalagovic/neuraldraft-mcp.git\ncd mcp\nnpm install\nnpm run lint    # tsc --noEmit\nnpm test\nnpm run build   # → dist/\n```\n\nRun against a local API:\n\n```bash\nNEURALDRAFT_API_KEY=ndsk_test_xxx \\\nNEURALDRAFT_API_URL=http://localhost:8080/v1 \\\nnpm run dev\n```\n\nInspect interactively with the official MCP Inspector:\n\n```bash\nnpx @modelcontextprotocol/inspector node dist/index.js\n```\n\n(Or `npx @modelcontextprotocol/inspector --cli node dist/index.js --tool register_component --args '{\"html\":\"<h1>Hi</h1>\",\"intent\":\"hero\"}'` for one-shot CLI calls.)\n\n## Architecture\n\nThis server is a thin wrapper over the Neural Draft Project API v1. Every tool maps to one (or a handful of) REST calls; resources are either constants (schemas, conventions docs) or cached reads (`brand://current`). The full API spec lives at [openapi.yaml](https://github.com/vbalagovic/neuraldraft-mcp/blob/main/openapi.yaml) in the platform repo.\n\nStdio is the only transport in v0.x — every current AI coding tool spawns local processes. Streamable HTTP transport will arrive when there's hosted multi-tenant demand.\n\n## Contributing\n\nIssues and PRs welcome. See [open issues](https://github.com/vbalagovic/neuraldraft-mcp/issues) for places to start. PRs should:\n\n- Keep tests at ≥ 80% line coverage on `src/`\n- Use the existing `register*` helper pattern when adding tools/resources\n- Never write to stdout in server runtime code (stdio mode breaks)\n- Update the README's \"What it exposes\" table for any new surface\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md) (TBD — this is the first public release).\n\n## License\n\n[MIT](./LICENSE) — open-source from day one.\n\n---\n\nBuilt by [Neural Draft](https://neuraldraft.io). Questions? developers@neuraldraft.io.\n",
  "bytes": 12181,
  "sha": "b66b8347a8461deb8aa1cc992b226617461d3f6967e1c26fa19680635953ed19",
  "repo_slug": "vbalagovic/neuraldraft-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_vbalagovic_neuraldraft_mcp_2ab9515e/readme"
}