Model Context Protocol

MCP setup & integration guide

Connect ElarisLabs Creative Studio to Claude, Cursor, and other MCP clients. Generate images, video, audio, brand packs, and composer edits from any agent that speaks MCP — credits bill to the brand your API key is bound to.


What is MCP?#

The Model Context Protocol (MCP) is an open standard for connecting AI assistants to external tools and data. Instead of copy-pasting API docs into a chat, the client discovers callable tools from a server and the model invokes them when your prompt needs real actions — generate an image, list projects, resize a brand pack, etc.

You (prompt) MCP client
Claude, Cursor, …
ElarisLabs MCP
/api/mcp
Creative Studio
models + credits

Tools, not chat plugins

The agent sees structured tools with schemas. It picks the right one and passes arguments — no manual API calls.

Remote HTTP

ElarisLabs runs a hosted MCP endpoint. No local install required — just paste a JSON config and your API key.

Brand-scoped billing

Every key is bound to one brand. Generation tools deduct credits from that brand's balance; discovery tools are free.

Quick start#

1
Create an API key in your profileAPI keys / MCP. Pick a brand, set expiry and spend cap, copy the key (elx_live_…) — shown once.
2
Add the server to your MCP client config (Claude or Cursor examples below). Use your key in the Authorization: Bearer … header.
3
Restart the client, enable the server in settings, then ask naturally: "List available image models, then generate a product shot with flux-2-flash."
Tip: Start with free tools (list_models, list_brands) to confirm the connection before running paid generation.

Create & manage an API key#

Keys are created in your ElarisLabs profile under API keys / MCP. Open your profile, choose a brand, set an expiry (max 24 weeks) and a spend cap (max 2000 credits), then copy the key — it is shown only once.

Bound to a brand

The key acts on one brand. All spend is billed to that brand's credit balance.

Expiry & spend cap

Required expiry up to 24 weeks. Per-key spend cap up to 2000 credits, editable anytime.

Revoke / rotate

Rotate to replace a key, or revoke to disable it instantly. Manage all keys from settings.

Scopes

Keys ship with studio:read and studio:generate — enough to list projects and run generation tools.

Endpoint: your MCP URL is https://studio.elarislabs.ai/api/mcp. Authenticate with Authorization: Bearer elx_live_…. The server uses Streamable HTTP (stateless) — compatible with Claude Desktop, Cursor, and mcp-remote for older clients.
Security: Treat elx_live_… like a password. Never commit it to git, paste it in public channels, or share it in screenshots. Use per-developer keys with low spend caps when possible.

How the server works#

When an MCP client connects, it calls tools/list to discover available tools, then tools/call when the model decides to act. ElarisLabs validates your bearer token, resolves the bound brand, and runs the tool — either a free read (list projects) or a billed generation (image, video, brand pack).

AspectDetails
ProtocolMCP over Streamable HTTP at /api/mcp
AuthAuthorization: Bearer elx_live_… header on every request
SessionStateless — no persistent connection to manage
TimeoutsVideo and brand-pack jobs may take 30–90s; clients should allow long tool calls
ErrorsInvalid, expired, or revoked keys return auth errors; insufficient credits return a billing error

Claude Desktop#

Works with Claude Desktop on macOS and Windows. Requires a recent version with remote MCP (URL) support.

Option A — Remote URL (recommended)#

1
Open Claude Desktop → Settings → Developer → Edit Config. This opens claude_desktop_config.json.
2
Config file locations:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
3
Add the ElarisLabs server (replace the token with your key):
claude_desktop_config.json
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer elx_live_YOUR_KEY_HERE"
      }
    }
  }
}
4
Save and fully quit and restart Claude Desktop (not just close the window). Open a new chat — ElarisLabs tools appear in the tools panel.

Option B — stdio bridge (older Claude builds)#

If your Claude version does not support remote url servers, use the mcp-remote npm package as a local bridge:

claude_desktop_config.json
{
  "mcpServers": {
    "elarislabs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://studio.elarislabs.ai/api/mcp",
        "--header",
        "Authorization: Bearer elx_live_YOUR_KEY_HERE"
      ]
    }
  }
}
Requires Node.js 18+ installed. The bridge forwards stdio ↔ HTTP so Claude can talk to the remote server.

Cursor#

Cursor has first-class MCP support. Use Agent mode so the model can call tools autonomously.

Global vs project config#

ScopeFileWhen to use
Global~/.cursor/mcp.jsonAvailable in every project on your machine
Project.cursor/mcp.json in repo rootShare with teammates via git (use env vars for secrets — see below)
1
Create or edit your MCP config file.
2
Add the server:
.cursor/mcp.json
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer elx_live_YOUR_KEY_HERE"
      }
    }
  }
}
3
Open Cursor Settings → MCP. Confirm elarislabs is listed and the toggle is on (green). A red dot means the server failed to connect — see Troubleshooting.
4
Open Agent mode (not Ask) and prompt naturally. The agent discovers tools automatically — you do not need to @-mention the server unless you want to force it.
5
Try: "Use list_models to show image models, then generate_image with flux-2-flash — a neon city skyline at dusk."
Keep secrets out of git (project-level config)

Cursor supports environment variable interpolation in mcp.json. Set ELARIS_MCP_KEY in your shell or .env, then reference it:

.cursor/mcp.json
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:ELARIS_MCP_KEY}"
      }
    }
  }
}

Other MCP clients#

Any client that supports remote MCP (URL + headers) can use the same config block. The JSON shape is always mcpServers → { name → { url, headers } }.

Claude Code Windsurf VS Code + Copilot Zed Cline

Claude Code (CLI)

Add to ~/.claude/settings.json or project .mcp.json — same structure as Claude Desktop. Run claude mcp list to verify.

Windsurf

Open Windsurf Settings → Cascade → MCP and add a custom server, or edit ~/.codeium/windsurf/mcp_config.json with the same JSON block.

VS Code (GitHub Copilot agent mode)

In VS Code 1.99+, add MCP servers via Command Palette → "MCP: Add Server" or edit .vscode/mcp.json in your workspace. Use the URL transport with the Authorization header.

Generic stdio fallback

Clients that only support local stdio processes can use the mcp-remote bridge (same as Claude Option B above).

Terminal
npx -y mcp-remote https://studio.elarislabs.ai/api/mcp \
  --header "Authorization: Bearer elx_live_YOUR_KEY_HERE"

Using multiple MCP servers#

MCP clients can connect to many servers at once. ElarisLabs handles creative generation; other servers handle their own domains (databases, docs, Google Workspace, etc.). Add each server as a separate entry under mcpServers.

mcp.json
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer elx_live_YOUR_KEY_HERE"
      }
    },
    "another-server": {
      "command": "npx",
      "args": ["-y", "@example/some-mcp-server"],
      "env": {
        "API_KEY": "your-other-key"
      }
    }
  }
}

What ElarisLabs MCP does (and doesn't)

CapabilityElarisLabs MCPNeeds a different server
Image / video / audio generationYes
Brand pack resize & composer editsYes
Studio projects & templatesYes
Google Slides / Docs / SheetsYes — use a Google Workspace MCP server (community or official) alongside ElarisLabs
GitHub, Linear, Notion, etc.Yes — each has its own MCP server
Database queries (Supabase, Postgres)Yes — use the provider's MCP server
Combining servers: With ElarisLabs + a Google Slides MCP connected, you can ask: "Generate a hero image with flux-2-flash, then add it to slide 2 of this deck" — the agent picks the right tool from each server. You still need to install and authenticate the Google server separately; ElarisLabs does not proxy third-party MCPs.

Browse community servers at modelcontextprotocol/servers or your client's MCP directory (Cursor Settings → MCP → Add).

Example prompts#

Once connected, talk naturally. The agent maps your intent to tools.

Discovery (free)

"What brands and image models can this key access? List the top 5 image models."

Image generation

"Generate a square product shot of a matte black sneaker on white marble using flux-2-flash. 2K resolution."

Image-to-video

"Take the image you just generated and make a 6-second vertical video — slow camera push-in, cinematic lighting."

Brand pack

"List brand-pack sizes, then resize that hero image into Instagram feed, story, and 300×250 display. Return the zip."

Composer edit

"Add the text 'SUMMER DROP' in white at the bottom of the image, then remove the background."

Multi-step workflow

"Generate 3 lifestyle variants of our product, stitch them into a hyperlapse at 24fps, then generate a voiceover saying 'Built for the city.'"

Slack autonomous worker#

Slack is not an MCP client. Instead, the ElarisLabs Slack app runs the same tools in the background and delivers finished creative back to the thread. It can ask a clarifying question and resume when you reply.

1
Have an admin install the ElarisLabs Slack app to your workspace and invite the bot to a channel (or DM it).
2
Link your Slack identity to your ElarisLabs brand the first time. Mention the bot and it will reply with a one-time link; complete linking in the browser. Until linked, the bot cannot spend credits.
3
Task it in plain language:
Slack
@ElarisLabs make a square product shot of our new sneaker on a marble pedestal,
then build a brand pack for Instagram feed and story sizes.
4
The worker runs in the background. If it needs a detail (e.g. which sizes), it asks in-thread and waits for your reply, then delivers the assets and a short summary.
Self-hosting the Slack app: Use the manifest at docs/slack-app-manifest.yaml in the ElarisLabs repo, then set SLACK_BOT_TOKEN and SLACK_SIGNING_SECRET and point the event subscription URL at /api/webhooks/slack/events.

Available tools#

Discovery tools are free; generation and editing tools consume credits from the key's brand.

ToolWhat it doesKey parameters
list_brands Brand this key is bound to Free
list_workspaces Workspace for this key Free
list_projects Creative Studio projects Free
get_project Single project + flow graph projectId Free
list_models Image, video, audio models kind (optional filter) Free
list_templates Published Studio templates Free
generate_image Text-to-image or edit with references prompt, model, referenceImages, resolution
generate_audio Text-to-speech (ElevenLabs / Gemini) text, model, voice, language
generate_video Text-to-video or image-to-video prompt, imageUrl, durationSeconds
regenerate_video Re-run video with optional variation prompt, variationHint
create_hyperlapse Stitch images into a timelapse (ffmpeg) images[], fps, width, height
composer_edit add_text / inpaint / erase / remove_background operation, imageUrl, …
brand_pack_list_sizes Available output sizes Free
brand_pack_resize Resize into sizes, returns a zip sourceImage, sizeKeys
Model tip: Pass model: "auto" (default) to let the router pick, or a specific id from list_models — e.g. "flux-2-flash" for fast images.

Troubleshooting#

Server shows red / "failed to connect" in Cursor

Check that your JSON is valid (no trailing commas). Confirm the URL ends in /api/mcp with no extra slash. Verify the bearer token starts with elx_live_ and has not been revoked. Restart Cursor after editing mcp.json.

Tools don't appear in Claude after restart

Make sure you fully quit Claude (macOS: Cmd+Q, not just close the window). If using the URL transport and it still fails, switch to the mcp-remote stdio bridge. Check Claude's developer logs for connection errors.

"Invalid key" / "Key expired" / "Key revoked"

Create a new key in your profile and update the config. Keys have a required expiry (max 24 weeks). Revoked keys stop working immediately.

"Insufficient credits" or spend cap hit

Top up the brand's credit balance in Studio, or raise the per-key spend cap in profile settings (max 2000 credits per key). Free tools like list_models still work.

Agent doesn't call tools (just describes what it would do)

In Cursor, switch to Agent mode (not Ask). Explicitly ask it to use a tool: "Call generate_image with flux-2-flash …". Confirm the MCP server toggle is on in Settings → MCP.

Video or brand-pack tool times out

These jobs can take 30–90 seconds. If your client has a short tool timeout, retry or ask for a shorter durationSeconds on video. Brand packs with many sizes take longer.

Can I create Google Slides from a link via ElarisLabs MCP?

Not directly — ElarisLabs MCP is for creative generation (images, video, audio, brand packs). To edit Google Slides, install a separate Google Workspace MCP server and connect both. Then ask the agent to generate assets with ElarisLabs and place them with the Google server.

Testing the endpoint manually

With a valid key, the MCP initialize handshake should return a 200:

Terminal
curl -s -X POST "https://studio.elarislabs.ai/api/mcp" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer elx_live_YOUR_KEY_HERE" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'