> ## Documentation Index
> Fetch the complete documentation index at: https://elarislabs-87.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP setup

> Configure Claude Desktop, Cursor, Windsurf, VS Code, and other MCP clients to use ElarisLabs Creative Studio tools in three steps.

Connect Creative Studio to your agent in three steps.

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

**1. Create an API key**

Open [your profile](https://studio.elarislabs.ai/en/profile) and go to
**API keys / MCP**.

* Pick a brand.
* Set an expiry and a spend cap.
* Copy the key (`elx_live_...`). It is shown only once.

**2. Add the server to your client**

Paste the config below into your MCP client. Use your key in the
`Authorization: Bearer` header.

```json Claude Desktop theme={"dark"}
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer elx_live_YOUR_KEY_HERE"
      }
    }
  }
}
```

```json Cursor theme={"dark"}
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer elx_live_YOUR_KEY_HERE"
      }
    }
  }
}
```

**3. Restart and prompt**

Restart the client and enable the server in settings. Then ask in plain
language:

> "List available image models, then generate a product shot with flux-2-flash."

> [!TIP]
>
> Start with free tools like `list_models` and `list_brands` to confirm the
> connection before running paid generation.

## How do I set up Claude Desktop?

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

### Option A. Remote URL (recommended)

**1. Open the config**

Open Claude Desktop, then go to **Settings > Developer > Edit Config**. This
opens `claude_desktop_config.json`.

**2. Find the config file**

* 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 server**

Replace the token with your key.

```json claude_desktop_config.json theme={"dark"}
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer elx_live_YOUR_KEY_HERE"
      }
    }
  }
}
```

**4. Restart Claude**

Save, then fully quit and restart Claude Desktop. Do not just close the
window. Open a new chat and the 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.

```json claude_desktop_config.json theme={"dark"}
{
  "mcpServers": {
    "elarislabs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://studio.elarislabs.ai/api/mcp",
        "--header",
        "Authorization: Bearer elx_live_YOUR_KEY_HERE"
      ]
    }
  }
}
```

> [!NOTE]
>
> Requires Node.js 18+ installed. The bridge forwards stdio to HTTP so Claude can
> talk to the remote server.

## How do I set up Cursor?

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

### Global vs project config

| Scope | File | When to use |
| - | - | - |
| Global | `~/.cursor/mcp.json` | Available in every project on your machine |
| Project | `.cursor/mcp.json` in repo root | Share with teammates via git. Use env vars for secrets |

**1. Edit your config**

Create or edit your MCP config file.

**2. Add the server**

```json .cursor/mcp.json theme={"dark"}
{
  "mcpServers": {
    "elarislabs": {
      "url": "https://studio.elarislabs.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer elx_live_YOUR_KEY_HERE"
      }
    }
  }
}
```

**3. Enable it**

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](#troubleshooting).

**4. Use Agent mode**

Open Agent mode, not Ask. Then prompt in plain language. The agent discovers
tools on its own. You do not need to mention the server unless you want to
force it.

**5. Try a prompt**

> "Use list\_models to show image models, then generate\_image with flux-2-flash. A neon city skyline at dusk."

> [accordion] 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.
>
> ```json .cursor/mcp.json theme={"dark"}
> {
>   "mcpServers": {
>     "elarislabs": {
>       "url": "https://studio.elarislabs.ai/api/mcp",
>       "headers": {
>         "Authorization": "Bearer ${env:ELARIS_MCP_KEY}"
>       }
>     }
>   }
> }
> ```

## What about other MCP clients?

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

> [accordion] Claude Code (CLI)
>
> Add to `~/.claude/settings.json` or project `.mcp.json`. It uses the same
> structure as Claude Desktop. Run `claude mcp list` to verify.

> [accordion] Windsurf
>
> Open **Windsurf Settings > Cascade > MCP** and add a custom server. Or edit
> `~/.codeium/windsurf/mcp_config.json` with the same JSON block.

> [accordion] 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.

> [accordion] Generic stdio fallback
>
> Clients that only support local stdio processes can use the `mcp-remote`
> bridge. This is the same as Claude Option B above.
>
> ```bash Terminal theme={"dark"}
> npx -y mcp-remote https://studio.elarislabs.ai/api/mcp \
>   --header "Authorization: Bearer elx_live_YOUR_KEY_HERE"
> ```

## Can I use ElarisLabs alongside other MCP servers?

MCP clients can connect to many servers at once.

ElarisLabs handles creative generation. Other servers handle their own domains,
like databases, docs, or Google Workspace. Add each server as a separate entry
under `mcpServers`.

```json mcp.json theme={"dark"}
{
  "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 does not do

| Capability | ElarisLabs MCP | Needs a different server |
| - | - | - |
| Image, video, audio generation | Yes | No |
| Brand pack resize and composer edits | Yes | No |
| Studio projects and templates | Yes | No |
| Google Slides, Docs, Sheets | No | Yes. Use a Google Workspace MCP server alongside ElarisLabs |
| GitHub, Linear, Notion | No | Yes. Each has its own MCP server |
| Database queries (Supabase, Postgres) | No | Yes. Use the provider's MCP server |

> [!TIP]
>
> **Combining servers:** with ElarisLabs and 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 install
> and authenticate the Google server yourself. ElarisLabs does not proxy
> third-party MCPs.

Browse community servers at
[modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers)
or your client's MCP directory.

## Example prompts

Once connected, talk in plain language. The agent maps your intent to tools.

> [accordion] Discovery (free)
>
> "What brands and image models can this key access? List the top 5 image
> models."

> [accordion] Image generation
>
> "Generate a square product shot of a matte black sneaker on white marble using
> flux-2-flash. 2K resolution."

> [accordion] Image to video
>
> "Take the image you just generated and make a 6-second vertical video. Slow
> camera push-in, cinematic lighting."

> [accordion] Brand pack
>
> "List brand-pack sizes, then resize that hero image into Instagram feed,
> story, and 300x250 display. Return the zip."

> [accordion] Composer edit
>
> "Add the text 'SUMMER DROP' in white at the bottom of the image, then remove
> the background."

> [accordion] 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.'"

## Troubleshooting

> [accordion] Server shows red or "failed to connect" in Cursor
>
> Check that your JSON is valid, with 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`.

> [accordion] Tools do not appear in Claude after restart
>
> Make sure you fully quit Claude. On macOS use Cmd+Q, not just close the
> window. If you use the URL transport and it still fails, switch to the
> `mcp-remote` stdio bridge. Check Claude's developer logs for connection
> errors.

> [accordion] "Invalid key", "Key expired", or "Key revoked"
>
> Create a new key in [your profile](https://studio.elarislabs.ai/en/profile)
> and update the config. Keys have a required expiry, max 24 weeks. Revoked keys
> stop working immediately.

> [accordion] "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.

> [accordion] Agent does not call tools, only 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.

> [accordion] Video or brand-pack tool times out
>
> These jobs can take 30 to 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.

> [accordion] Can I create Google Slides from a link via ElarisLabs MCP?
>
> Not directly. ElarisLabs MCP is for creative generation, like images, video,
> audio, and 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.

> [accordion] Testing the endpoint manually
>
> With a valid key, the MCP initialize handshake should return a 200.
>
> ```bash Terminal theme={"dark"}
> 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"}}}'
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.