> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamlayer.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP installation by client

> Configure DreamLayer for Claude Code, Codex, Cursor, Hermes, OpenClaw, or another stdio MCP client.

# MCP installation by client

## What this lets you do

Connect Claude Code, Codex, Cursor, Hermes, OpenClaw, or another stdio MCP client to DreamLayer image tools.

## What you need

* Node.js 22.12 or later
* A DreamLayer API key with credits
* One supported MCP client

## Steps

The examples below install the stable package. For the sprite-sheet beta, replace
`@dreamlayer/mcp` with `@dreamlayer/mcp@0.4.0-beta.5` in your chosen command or
JSON `args`, then reconnect the server. The `beta` tag points to that version;
`latest` remains `0.3.0`. See the [beta configuration](/mcp/index) for a complete example.

### 1. Configure Claude Code

```bash theme={null}
claude mcp add dreamlayer --env DREAMLAYER_API_KEY=dlr_live_your_key_here -- npx -y @dreamlayer/mcp
```

### 2. Configure Codex

```bash theme={null}
codex mcp add dreamlayer --env DREAMLAYER_API_KEY=dlr_live_your_key_here -- npx -y @dreamlayer/mcp
```

### 3. Configure Cursor, Hermes, OpenClaw, or a generic client

Add a stdio server to the client's MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "dreamlayer": {
      "command": "npx",
      "args": ["-y", "@dreamlayer/mcp"],
      "env": { "DREAMLAYER_API_KEY": "dlr_live_your_key_here" }
    }
  }
}
```

Client configuration keys change over time. Use the client's current MCP documentation for the location of this object. DreamLayer needs only a stdio command and one environment variable.

## Confirm it worked

Restart the client, list its MCP tools, and call the DreamLayer capabilities tool. The result must report protocol version `1`.

## Common errors

| Error | What to do |
| - | - |
| Command not found | Node.js is not on the client's PATH. Clients started from a desktop launcher often do not inherit a shell PATH; use an absolute path to `npx`. |
| Auth failure on every tool | The key is missing from the server's own environment. A key exported in your shell does not reach a subprocess. |
| JSON-RPC parse failure | Something is writing to stdout. Keep all non-protocol output on stderr. |

## Troubleshooting

Run `npx -y @dreamlayer/mcp` in a terminal to confirm the package resolves and the process starts, then check the client's configuration file location in its current documentation.

## Next steps

* [Review MCP tool behavior](/mcp/index)
* [Use the same key from the command line](/cli)


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