# Put your AI assistant to work on your account

Last updated:

<!-- -->

December 2, 2026

<!-- -->

\| 30 minutes read

<br />

<br />

The **Magic Lane MCP DevKit Server** gives an AI assistant tools for what you manage in the Magic Lane developer portal: your Magic Lane Studio styles, your projects and their API keys, and the offline maps your apps use. This page shows how to install the server, connect it to your AI client and use its tools.

## Core capabilities[​](#core-capabilities "Direct link to Core capabilities")

The server offers 20 tools in three groups. Each group is a toolset that you can turn on or off (see [Toolsets](#toolsets)):

* **Styles** - List the Magic Lane Studio styles of your account and the shared templates, read a style's full JSON, create a style from a template or from a document, save new content, and edit the name, description, tags and purposes
* **Style validation** - Check a style document against the style schema on your computer, with every problem listed by its place in the JSON
* **Style downloads** - Get a style as JSON, or as the `.style` file your app loads with the Magic Lane Maps SDK
* **Style reference** - Read the style editing essentials and the full style format pages, so the assistant edits with the format in front of it
* **Projects** - List, read, create and update developer portal projects: name, description, allowed web origins and settings
* **API keys** - List, read, create and rename the API keys of a project, masked unless you ask to see one on a local server
* **Offline maps** - List the map versions an SDK can read, browse the catalog of a version, and download map files, with downloads that resume and are checked against the catalog

## Getting started[​](#getting-started "Direct link to Getting started")

### Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* **Node.js 22.12+** ([Download here](https://nodejs.org/))
* For the style and project tools: a **Magic Lane secret key**, created in the developer portal under **CLI & Access**, as [Create a secret key](/docs/guides/get-started.md#create-a-secret-key) shows. It starts with `mlsk_`
* For the offline maps tools: an application's **API token and its secret** for the Offline Maps API. To get them, contact Magic Lane through [Contact us](https://www.magiclane.com/web/contact). They are separate from the secret key, which is used for the portal only
* An **MCP-compatible client** that can start a local server, such as Claude Code, [Claude Desktop](https://claude.ai/download), [Grok Build](https://grok.com/product/build) (formerly Cursor), VS Code with [GitHub Copilot](https://github.com/features/copilot), Windsurf, a JetBrains IDE with AI Assistant, OpenAI Codex CLI or Gemini CLI (see [Client configuration](#client-configuration))

When you create the secret key, you choose a level for each category. The levels decide what the assistant may do:

| Category | `Read`                                                                               | `Read & write` adds                                  |
| -------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| Studio   | The tools that list, read and download styles, and `validate_style` given a style id | `create_style`, `update_style`, `edit_style_details` |
| Projects | `list_projects`, `get_project`                                                       | `create_project`, `update_project`                   |
| API keys | `list_api_keys`, `get_api_key`                                                       | `create_api_key`, `rename_api_key`                   |

A tool whose level the key lacks answers `insufficient_scope` and names the level to add. `get_style_reference`, and `validate_style` given a document or a file, do not read your account, so they need no level.

warning

A secret key is not an API key. API keys are what your apps use with the Magic Lane SDKs and APIs; a secret key lets a tool work on your account. Keep it to yourself, since the assistant acts as you, and give it only the levels you need.

### Installation[​](#installation "Direct link to Installation")

* Quick Start (npx)
* Claude Desktop extension
* Local Build
* Docker

Run the server directly without installation:

```bash
export MAGICLANE_SECRET_KEY="mlsk_your_secret_key"
npx -y -p @magiclane/mcp-devkit-server magiclane-devkit-mcp

```

Most of the time you do not run this yourself: your AI client starts the server with the same command (see [Client configuration](#client-configuration)).

Install the server in Claude Desktop without editing a configuration file:

1. Download `magiclane-mcp-devkit-<version>.mcpb`, the Claude Desktop extension, from the [latest release](https://github.com/magiclane/magiclane-mcp-devkit-server/releases/latest). One file serves every system.

2. In Claude Desktop, open **Settings → Extensions** and drag the file onto the window, or open the file with Claude Desktop. Click **Install**.

3. Fill in the settings Claude Desktop shows, then enable the extension:

   <!-- -->

   * **Magic Lane secret key:** needed for the style and project tools. Leave it empty to use the offline maps tools alone.
   * **Toolsets:** `all` by default, or the groups to offer, separated by commas (see [Toolsets](#toolsets)).
   * **Offline maps API token** and **Offline maps API secret:** for the offline maps tools only. Leave both empty, or set both.
   * **Folder for files:** the one folder the tools may read and write files in (`MAGICLANE_FILES_DIR`). It is your Documents folder unless you choose another, so a relative path in a prompt, such as `styles/night.style`, lands there. Clear it to allow any path on your computer.

The extension needs no Node.js of your own: Claude Desktop runs it with its built-in Node.js. Until the secret key, or the offline maps token and its secret, are filled in, the server does not start. To change a setting later, open the extension under **Settings → Extensions**. To update, install the `.mcpb` of the new release the same way.

Clone and build the project locally:

```bash
git clone https://github.com/magiclane/magiclane-mcp-devkit-server.git
cd magiclane-mcp-devkit-server
npm install
npm run build

```

Build and run using Docker, from a clone of the repository:

```bash
docker build -t magiclane-mcp-devkit .
export MAGICLANE_SECRET_KEY="mlsk_your_secret_key"
docker run --rm -i -e MAGICLANE_SECRET_KEY magiclane-mcp-devkit

```

`-e MAGICLANE_SECRET_KEY` with no value passes the key from your shell into the container. Do not write the key itself after `-e`: other users of the computer can read a command line while the container runs. Pass the offline maps token and secret the same way (`-e MAGICLANE_OFFLINE_MAPS_API_KEY -e MAGICLANE_OFFLINE_MAPS_SECRET`), or all the variables from a file with `--env-file`. The image runs the server on Node 22, as an unprivileged user.

The container sees no file of your computer. For the tools that read or save a file, mount a folder, for example `-v /path/on/your/computer:/data`, and give paths under `/data`. If you set `MAGICLANE_FILES_DIR` with Docker, name the folder inside the container (`/data`), not the path on your computer.

### Configuration[​](#configuration "Direct link to Configuration")

The server takes its settings from environment variables:

| Variable                         | Required                | Default | Purpose                                                                                                                                                                                                                                                                                                                    |
| -------------------------------- | ----------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MAGICLANE_SECRET_KEY`           | for styles and projects | -       | Your secret key (`mlsk_...`), with the levels you need. Used for the portal only: styles, projects and API keys. Without it, the server offers the offline maps tools alone                                                                                                                                                |
| `MAGICLANE_OFFLINE_MAPS_API_KEY` | no                      | -       | An application's API token, for the offline maps tools only. Magic Lane support gives you the token and its secret. Set it together with the secret below, or neither                                                                                                                                                      |
| `MAGICLANE_OFFLINE_MAPS_SECRET`  | no                      | -       | The secret of that application                                                                                                                                                                                                                                                                                             |
| `MAGICLANE_TOOLSETS`             | no                      | `all`   | The groups of tools to offer: `styles`, `projects`, `offline_maps`, separated by commas                                                                                                                                                                                                                                    |
| `MAGICLANE_FILES_DIR`            | no                      | -       | The one folder the tools may read and write files in, on a local server: style files, downloads, key files and offline maps. A relative path is taken from it, and a path outside it is refused, also through a link. The folder must exist. Unset, any path on your computer is allowed                                   |
| `HTTP_TIMEOUT_SECONDS`           | no                      | `30`    | Timeout for one outgoing request. Whatever it is set to, a request with its retry and waits ends within 50 seconds, so a tool call answers before AI clients give up on it (often after 60 seconds). A map download is the exception: it runs until the file is complete, and stops only when no data comes for 60 seconds |
| `VERBOSE`                        | no                      | `false` | Print a line for every tool call and its result to the server's log. Warnings and errors are always printed                                                                                                                                                                                                                |

* **Keys are never tool inputs.** They come from the environment only, so the assistant never needs them and never asks for them.
* **The server reads no `.env` file.** An AI client starts it in a folder of its own choosing, often your project, so give the server its variables in the client's configuration.
* **A key that cannot work stops the server at startup**, with a message that names the variable: a secret key that does not start with `mlsk_`, or any key with a space, a line break or a character outside plain ASCII in it. Paste it again as one line.

### Toolsets[​](#toolsets "Direct link to Toolsets")

Every tool's name, description and input schema is sent to the model in every conversation, whether the tool is used or not. `MAGICLANE_TOOLSETS` keeps the server to the tools you need:

| Toolset        | Tools                                                                                                                                                         | Needs                                                                |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `styles`       | `list_styles`, `list_templates`, `get_style`, `download_style`, `create_style`, `update_style`, `edit_style_details`, `validate_style`, `get_style_reference` | `MAGICLANE_SECRET_KEY`, with Studio levels                           |
| `projects`     | `list_projects`, `get_project`, `create_project`, `update_project`, `list_api_keys`, `get_api_key`, `create_api_key`, `rename_api_key`                        | `MAGICLANE_SECRET_KEY`, with Projects and API keys levels            |
| `offline_maps` | `list_offline_map_versions`, `list_offline_maps`, `download_offline_map`                                                                                      | `MAGICLANE_OFFLINE_MAPS_API_KEY` and `MAGICLANE_OFFLINE_MAPS_SECRET` |

* **Unset, empty or `all`** offers every toolset: 20 tools with the offline maps token and secret set, 17 without them, because `offline_maps` is then left out.
* **A toolset that is off is not offered at all**, whatever the secret key allows: a server with `styles` only cannot create projects or API keys.
* **Without a secret key, `styles` and `projects` are left out**, and the server offers the offline maps tools alone.
* **A mistake stops the server at startup** with a message that says what to fix: an unknown name, `styles` or `projects` named without a secret key, neither a secret key nor the offline maps token and secret, `offline_maps` named without its token and secret, or only one of the two set.

For example, to offer the style tools only:

```json
"env": {
  "MAGICLANE_SECRET_KEY": "mlsk_...",
  "MAGICLANE_TOOLSETS": "styles"
}

```

### Client configuration[​](#client-configuration "Direct link to Client configuration")

Every client below starts the server on your own computer and gives it your secret key in its configuration. Put your key in place of `mlsk_...`, and add the other variables of [Configuration](#configuration) next to it when you need them.

* Claude Code
* Claude Desktop
* Grok Build
* VS Code
* Windsurf
* JetBrains
* Codex
* Gemini CLI

Run this in a terminal, with your key in place of `mlsk_...`. It adds the server for all your projects:

```bash
claude mcp add --scope user --env MAGICLANE_SECRET_KEY=mlsk_... --transport stdio magiclane-devkit -- npx -y -p @magiclane/mcp-devkit-server magiclane-devkit-mcp

```

Run `claude mcp list` to check that the server is connected.

Install the [Claude Desktop extension](#installation), or open the configuration file from **Settings → Developer → Local MCP servers → Edit Config** and add the server:

```json
{
  "mcpServers": {
    "magiclane-devkit": {
      "command": "npx",
      "args": ["-y", "-p", "@magiclane/mcp-devkit-server", "magiclane-devkit-mcp"],
      "env": {
        "MAGICLANE_SECRET_KEY": "mlsk_..."
      }
    }
  }
}

```

Restart Claude Desktop. The tools appear under the server's tool list.

Grok Build, formerly Cursor, still reads the Cursor files. Put this in `~/.cursor/mcp.json`, or in `.cursor/mcp.json` for one project:

```json
{
  "mcpServers": {
    "magiclane-devkit": {
      "command": "npx",
      "args": ["-y", "-p", "@magiclane/mcp-devkit-server", "magiclane-devkit-mcp"],
      "env": {
        "MAGICLANE_SECRET_KEY": "mlsk_..."
      }
    }
  }
}

```

Do not commit a project's `mcp.json` that holds the key: keep the key in the file in your home folder.

Put this in `.vscode/mcp.json` in your workspace. The input keeps the key out of the file: VS Code asks for it when the server starts.

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "magiclane-access-key",
      "description": "Magic Lane secret key (mlsk_...)",
      "password": true
    }
  ],
  "servers": {
    "magiclane-devkit": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "-p", "@magiclane/mcp-devkit-server", "magiclane-devkit-mcp"],
      "env": {
        "MAGICLANE_SECRET_KEY": "${input:magiclane-access-key}"
      }
    }
  }
}

```

The tools are available in Copilot Chat's agent mode.

Put this in `~/.codeium/windsurf/mcp_config.json`, then refresh the MCP servers in Windsurf's Cascade panel:

\~/.codeium/windsurf/mcp\_config.json

```json
{
  "mcpServers": {
    "magiclane-devkit": {
      "command": "npx",
      "args": ["-y", "-p", "@magiclane/mcp-devkit-server", "magiclane-devkit-mcp"],
      "env": {
        "MAGICLANE_SECRET_KEY": "mlsk_..."
      }
    }
  }
}

```

In your JetBrains IDE, with AI Assistant, open **Settings › Tools › AI Assistant › Model Context Protocol (MCP)**, add a server, choose **As JSON** and paste:

```json
{
  "mcpServers": {
    "magiclane-devkit": {
      "command": "npx",
      "args": ["-y", "-p", "@magiclane/mcp-devkit-server", "magiclane-devkit-mcp"],
      "env": {
        "MAGICLANE_SECRET_KEY": "mlsk_..."
      }
    }
  }
}

```

Add this to `~/.codex/config.toml`:

\~/.codex/config.toml

```text
[mcp_servers.magiclane-devkit]
command = "npx"
args = ["-y", "-p", "@magiclane/mcp-devkit-server", "magiclane-devkit-mcp"]
startup_timeout_sec = 30

[mcp_servers.magiclane-devkit.env]
MAGICLANE_SECRET_KEY = "mlsk_..."

```

Codex waits 10 seconds for a server to start unless `startup_timeout_sec` says otherwise, and the first start can take longer while `npx` downloads the package.

Or run this in OpenAI Codex CLI, with your key in place of `mlsk_...`:

```bash
codex mcp add magiclane-devkit --env MAGICLANE_SECRET_KEY=mlsk_... -- npx -y -p @magiclane/mcp-devkit-server magiclane-devkit-mcp

```

Add this to `~/.gemini/settings.json`:

\~/.gemini/settings.json

```json
{
  "mcpServers": {
    "magiclane-devkit": {
      "command": "npx",
      "args": ["-y", "-p", "@magiclane/mcp-devkit-server", "magiclane-devkit-mcp"],
      "env": {
        "MAGICLANE_SECRET_KEY": "mlsk_..."
      }
    }
  }
}

```

The keys must be named in `env`: Gemini CLI does not pass variables whose names contain `KEY` or `SECRET` from its own environment to a server. To keep the key out of the file, write `"$MAGICLANE_SECRET_KEY"` as its value and set the variable in your shell.

Don't add `"trust": true`: it lets Gemini CLI call the server's tools without asking you first, the ones that save a style or create an API key included.

For a local build, use the command `node` with the absolute path to `dist/devkit-server.esm.js` in place of `npx` and its arguments.

The repository has setup guides for these clients:

* [Claude Desktop Setup](https://github.com/magiclane/magiclane-mcp-devkit-server/blob/HEAD/docs/claude-desktop-setup.md)
* [Grok Build Setup](https://github.com/magiclane/magiclane-mcp-devkit-server/blob/HEAD/docs/grok-build-setup.md)
* [VS Code Setup](https://github.com/magiclane/magiclane-mcp-devkit-server/blob/HEAD/docs/vscode-setup.md)
* [Android Studio Setup](https://github.com/magiclane/magiclane-mcp-devkit-server/blob/HEAD/docs/android-studio-setup.md), with Gemini, which connects to the [HTTP server](#running-the-server-over-http)

### Running the server over HTTP[​](#running-the-server-over-http "Direct link to Running the server over HTTP")

The stdio server above is for MCP-native clients, which start it on your own computer. For web applications, remote agents and clients that cannot start a process, run the Streamable HTTP server:

```bash
export MAGICLANE_SECRET_KEY="mlsk_your_secret_key"
npx -y -p @magiclane/mcp-devkit-server magiclane-devkit-mcp-http

```

It listens on `http://127.0.0.1:3000/mcp`.

* **Every request presents the server's access key**, in the `magiclane-access-key` header or as `Authorization: Bearer`. Unless you set a token, the access key is the secret key itself, which is allowed only for clients on your own computer: the server must listen on `127.0.0.1`, `localhost` or `::1`, and each request must be addressed to one of those names and carry no `Forwarded`, `X-Forwarded-For`, `X-Forwarded-Host` or `X-Real-IP` header. Any other request is refused with `403`.
* **On any other address the server needs `MCP_AUTH_TOKEN`**, a token of at least 32 characters, at least 8 of them different, and does not start without it. A server for the offline maps tools alone has no secret key, so it needs the token on your own computer too. Clients then present the token and never hold the secret key, which stays on the server. Put the server behind TLS before other machines can reach it.
* **A reverse proxy needs `MCP_AUTH_TOKEN`**, also one on the same computer. A proxy can hide that a request came through it, so the check above cannot be relied on behind one. Also set `MCP_TRUST_PROXY` to the number of proxies in front of the server, usually `1`. The server then counts each client by the address the proxy writes in the `X-Forwarded-For` header; without it, every client counts as the proxy, and they share one rate limit. The proxy must write that header itself, or add the client's address to it.
* **Browser apps need `ALLOWED_ORIGINS`.** A request from a web page carries an `Origin` header, and the server refuses it unless `ALLOWED_ORIGINS` lists that origin, such as `https://app.example.com`. `MCP_HOST` and `MCP_PORT` set the address and the port the server listens on.
* **No tool reads or writes a file.** Over HTTP a path would name a file on the server, so the tools have no `path` or `tokenPath` input and `download_offline_map` is not offered. `download_style` returns the download in the result.
* **No full API key is shown.** `get_api_key` and `create_api_key` have no `revealToken` input over HTTP, so a client that runs read-only tools without asking cannot put a key into the conversation. See the full key in the developer portal.
* **A request body is limited** to 40 MiB (`MCP_MAX_BODY_BYTES`) and 1,000,000 JSON values.

Each client presents the access key in the `magiclane-access-key` header: the token, or the secret key when the server has no token. Clients write the entry differently. In each snippet, replace the address with your server's.

* Grok Build
* VS Code
* Claude Desktop

Grok Build, formerly Cursor, still reads the Cursor files. Put this in `~/.cursor/mcp.json`, or in `.cursor/mcp.json` for one project:

```json
{
  "mcpServers": {
    "magiclane-devkit": {
      "url": "http://127.0.0.1:3000/mcp",
      "headers": {
        "magiclane-access-key": "<the token, or the secret key when the server has no token>"
      }
    }
  }
}

```

Put this in `.vscode/mcp.json`. The list is `servers`, not `mcpServers`, the entry needs `"type": "http"`, and the input keeps the key out of the file:

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "magiclane-access-key",
      "description": "Key of the Magic Lane DevKit HTTP server",
      "password": true
    }
  ],
  "servers": {
    "magiclane-devkit": {
      "type": "http",
      "url": "http://127.0.0.1:3000/mcp",
      "headers": {
        "magiclane-access-key": "${input:magiclane-access-key}"
      }
    }
  }
}

```

A server in Claude Desktop's configuration file is a command that Claude Desktop starts, so the [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge connects to the HTTP server and passes the key header on. Write the header without a space after the colon: the space would split the argument on Windows.

```json
{
  "mcpServers": {
    "magiclane-devkit": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://127.0.0.1:3000/mcp",
        "--header",
        "magiclane-access-key:${MAGICLANE_ACCESS_KEY}"
      ],
      "env": {
        "MAGICLANE_ACCESS_KEY": "<the token, or the secret key when the server has no token>"
      }
    }
  }
}

```

For a server on another computer, give its `https://` address: `mcp-remote` refuses a plain `http://` address other than `localhost` and `127.0.0.1` unless `--allow-http` is added. When Claude Desktop runs on the same computer as the server, the local (stdio) server in [Client configuration](#client-configuration) is simpler.

See the [HTTP Server Setup Guide](https://github.com/magiclane/magiclane-mcp-devkit-server/blob/HEAD/docs/http-server-setup.md) for complete documentation.

## Available tools[​](#available-tools "Direct link to Available tools")

warning

Style, template, project and API key names, descriptions and tags, and the style reference pages, are written by other people with access to the account or the website, and the model reads them in tool results. Such a text can be written to look like an instruction. The server tells the model to treat it as data, never as instructions, and removes control and bidirectional characters from it. Every tool declares `readOnlyHint` and `destructiveHint`: keep your client asking before it runs a tool that changes something, above all `update_project`, the style saves and `create_api_key`, so that no such text can make a change or reveal a key without you seeing it.

### 1. Styles[​](#1-styles "Direct link to 1. Styles")

Read and change the styles of your account, the ones you edit in [Magic Lane Studio](/docs/guides/map-studio.md). The secret key needs `Studio: Read`, and `Studio: Read & write` for the tools that change a style.

| Tool                  | What it does                                                                                                                                           |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `list_styles`         | Lists your styles, newest first                                                                                                                        |
| `list_templates`      | Lists the shared templates a new style can start from                                                                                                  |
| `get_style`           | Reads one style or template, with its JSON and version                                                                                                 |
| `download_style`      | Downloads a style as JSON, or as the `.style` file your app loads                                                                                      |
| `create_style`        | Creates a style from a template, a document or a file                                                                                                  |
| `update_style`        | Replaces the whole content of a style                                                                                                                  |
| `edit_style_details`  | Changes the name, description, tags and purposes                                                                                                       |
| `validate_style`      | Checks a style document on your computer against the style schema and the rules the schema cannot express; given a style id, it reads that style first |
| `get_style_reference` | Reads the style format documentation                                                                                                                   |

The usual way to change a style:

1. `get_style` reads the JSON and its `version`.
2. The assistant edits the JSON, then `validate_style` checks it.
3. `update_style` saves it, with that `version` as `baseVersion`. It checks the document against the style schema again before sending it, and sends nothing if the check finds a problem.
4. If the save returns `warnings`, the assistant fixes them and saves again.

Keep in mind:

* **Problems stop a save, warnings do not.** A problem is something the style schema refuses, listed with its place in the JSON. A warning is something to fix before you finish: a filter with an empty condition list, which Studio shows as *Filter unreadable*, or a break of a rule the schema cannot express, such as layer ids that do not go down to 1, a group or image that a layer names but the style does not have, `minzoom` above `maxzoom`, or an image over Studio's 400 KB. Each warning names the layer, group, image or font. It comes with a fix that does not change the map, asks you to decide when every fix would change it, or says how the assistant fixes it, as for layer ids. `validate_style`, `create_style` and `update_style` all return them. Some shared templates have warnings, so a style made from one starts with them. Paint that Studio does not offer for a layer's type is only a note: Studio hides it, and it can stay.
* **Versions protect your work.** A style's `version` changes on each save, by the server or in Studio. If the style was saved since the assistant read it, the save is refused with a `conflict`, nothing changes, and the assistant reads the style again.
* **A save only saves.** Publishing, reverting and deleting a style are done in Studio.
* **A style can stay in a file.** A style is 170 to 190 KB of JSON. On a local server, `download_style` writes it to a file whose name ends in `.json` (a `.style` file's name ends in `.style`), the assistant edits only the lines it needs, and `validate_style` and `update_style` read it from that file.
* **The assistant reads the format before it edits.** `get_style_reference` returns the style editing essentials, and the full [style file format](/docs/guides/map-studio/reference/style-file-format.md), [map data sources](/docs/guides/map-studio/reference/map-data-sources.md) and [layer types reference](/docs/guides/map-studio/reference/layer-types-reference.md) pages of this documentation.

The same reference is also offered as MCP resources, for clients that read them:

| Resource                                 | What it holds                                        |
| ---------------------------------------- | ---------------------------------------------------- |
| `magiclane://docs/style-essentials`      | The style editing essentials, built into the server  |
| `magiclane://docs/style-file-format`     | The style file format page                           |
| `magiclane://docs/map-data-sources`      | The map data sources page                            |
| `magiclane://docs/layer-types-reference` | The layer types reference page                       |
| `magiclane://schemas/engine-style`       | The style JSON Schema that `validate_style` applies  |
| `magiclane://studio/templates`           | The template list, the same data as `list_templates` |

**Example Prompts:**

* "List my Studio styles. Which of them have never been published?"
* "Create a style called Night mode from the Basic 1 Modern template and tag it night."
* "Make the water in my Night mode style darker and save it."
* "Validate the style file styles/night.json and list what is wrong."
* "Download the .style file of my Night mode style into my app's assets folder."
* "How are colours stored in a style file?"

### 2. Projects and API keys[​](#2-projects-and-api-keys "Direct link to 2. Projects and API keys")

Manage the projects of your account and the API keys inside them, the ones the Get Started guide creates by hand in [Create a project](/docs/guides/get-started.md#create-a-project) and [Create an API Key](/docs/guides/get-started.md#create-an-api-key). Each tool needs its own level on the secret key:

| Tool             | What it does                       | Secret key level         |
| ---------------- | ---------------------------------- | ------------------------ |
| `list_projects`  | Lists your projects                | `Projects: Read`         |
| `get_project`    | Reads one project                  | `Projects: Read`         |
| `create_project` | Creates a project                  | `Projects: Read & write` |
| `update_project` | Changes a project's settings       | `Projects: Read & write` |
| `list_api_keys`  | Lists a project's API keys, masked | `API keys: Read`         |
| `get_api_key`    | Reads one API key                  | `API keys: Read`         |
| `create_api_key` | Creates an API key in a project    | `API keys: Read & write` |
| `rename_api_key` | Renames an API key                 | `API keys: Read & write` |

Keep in mind:

* **API keys are secrets.** A key is shown masked, as its last 4 characters, unless you ask to see it on a local server. The HTTP server never shows the full key: see it in the developer portal.
* **A key can go to a file.** On a local server, ask the assistant to save the key to a file: the full key is written there and never enters the conversation. An existing file is replaced only when you ask for it.
* **A key expires.** A new key is valid for 6 months unless you ask for another date, which can be at most 10 years ahead.
* **A project created here has no API key** until you ask for one.
* **Nothing is deleted here.** Disabling or deleting a project or an API key is done in the developer portal.

**Example Prompts:**

* "List my Magic Lane projects."
* "Create a project called Fleet tracker for our delivery web app on <https://fleet.example.com>."
* "Add <https://app.example.com> to the origins of my Fleet tracker project."
* "Create a key Production for my Fleet tracker project, valid until the end of 2027, and save it to keys/fleet-production.txt."
* "Are any keys of my Fleet tracker project expired or about to expire?"
* "Rename the key Web staging of my Fleet tracker project to Web testing."

### 3. Offline maps[​](#3-offline-maps "Direct link to 3. Offline maps")

Find and download the map files an app uses without a connection, using the [Magic Lane Offline Maps API](/docs/cloud-rest-api/guides/maps-3dscene/offline-maps-api/). These tools need `MAGICLANE_OFFLINE_MAPS_API_KEY` and `MAGICLANE_OFFLINE_MAPS_SECRET`; without them they are not offered. To get the API token and its secret, contact Magic Lane through [Contact us](https://www.magiclane.com/web/contact).

| Tool                        | What it does                                                                                                         |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `list_offline_map_versions` | Lists the map versions an SDK can read, newest first                                                                 |
| `list_offline_maps`         | Lists the downloadable maps of one version: the world basemap and the maps of countries and states, with their sizes |
| `download_offline_map`      | Downloads one map file to disk. Local server only                                                                    |

The usual way to get maps:

1. `list_offline_map_versions` to pick a version.
2. `list_offline_maps`, with a filter such as a continent or a country, to find the maps.
3. `download_offline_map` for the basemap, then for each map.

Keep in mind:

* **Name the map capability of your SDK.** Without it the tools use the latest, which may list versions an older SDK cannot read.
* **One map version on a device.** Every map must have the same map version as its basemap. When you upgrade, download the new basemap first, then every regional map again.
* **One catalog on a device.** All maps on a device must come from the same catalog. An account with a custom catalog gets it automatically; ask for the standard catalog if you need the standard Magic Lane one.
* **Downloads are resumable and checked.** Maps are large: the basemap is about 190 MB, a country up to several GB. A download that is cancelled or breaks off continues on the next call, and the finished file is checked against the size and checksum of the catalog before it gets its name.
* **Large downloads report their progress.** A client that asks for progress gets progress notifications while a map downloads. A country can take longer than your client waits for a tool call: if the client gives up, what was downloaded is kept, and asking for the same map again continues it.
* **One download at a time for a file.** A second request to download to the same path is refused while the first is running. Downloads to other paths run at the same time.
* **An existing file is never replaced** unless you ask for it.

**Example Prompts:**

* "Which offline map versions can an SDK with capability 15 use?"
* "List the offline maps of Europe in the latest map version, with their sizes."
* "Download the world basemap and the Netherlands map of version 7.546 into ./maps."

For the parameters of every tool, see the [README](https://github.com/magiclane/magiclane-mcp-devkit-server#tools) of the repository.

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

Every tool error says what went wrong in a sentence and carries a `code`:

| Error                                                                   | Solution                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`key_invalid`**, **`key_expired`**                                    | The secret key is unknown, revoked or expired. Check it under **CLI & Access** in the developer portal, and regenerate it or create a new one: see [Regenerate or revoke a secret key](/docs/guides/get-started.md#regenerate-or-revoke-a-secret-key)                                                                                                                                                                                                                                         |
| **`insufficient_scope`**                                                | The secret key lacks the level the tool needs. The message names the level to add                                                                                                                                                                                                                                                                                                                                                                                                             |
| **`account_inactive`**                                                  | The account that owns the secret key is not active. Contact Magic Lane                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **`studio_not_allowed`**                                                | Magic Lane Studio is not enabled for your account, so the style tools cannot be used. The project tools still work                                                                                                                                                                                                                                                                                                                                                                            |
| **`too_many_failed_attempts`**                                          | Too many requests with a missing, invalid or revoked key came from your address. A valid key is never refused by this limit, so fix the key rather than wait                                                                                                                                                                                                                                                                                                                                  |
| **`style_not_found`**, **`project_not_found`**, **`api_key_not_found`** | The id does not exist in your account. Ask the assistant to list the items again                                                                                                                                                                                                                                                                                                                                                                                                              |
| **`conflict`**                                                          | The style was saved since the assistant read it. Ask it to read the style again before saving                                                                                                                                                                                                                                                                                                                                                                                                 |
| **`template_read_only`**                                                | Templates cannot be changed. Create a style from the template, then change that style                                                                                                                                                                                                                                                                                                                                                                                                         |
| **`template_not_found`**                                                | A new style starts from a template in the template list, not from one of your styles. To copy a style, ask the assistant to read it and create a style from its JSON                                                                                                                                                                                                                                                                                                                          |
| **`invalid_style`**                                                     | The style document does not match the style schema, found by the check on your computer or by the portal. The error lists what is wrong, and nothing was saved                                                                                                                                                                                                                                                                                                                                |
| **`payload_too_large`**                                                 | The style is larger than the portal accepts. The message gives the limit                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **`build_failed`**, **`build_timeout`**                                 | The portal could not build the `.style` file. The message says what it reported: fix the style, or try again later                                                                                                                                                                                                                                                                                                                                                                            |
| **`name_taken`**                                                        | The name is already used. Project names are unique in your account, and API key names in their project                                                                                                                                                                                                                                                                                                                                                                                        |
| **`project_limit_reached`**, **`api_key_limit_reached`**                | Your plan allows no more projects, or the project has too many API keys. Disabling projects and keys is done in the developer portal                                                                                                                                                                                                                                                                                                                                                          |
| **`api_key_not_created`**                                               | The key service could not create the key. Try again later, or create it in the developer portal                                                                                                                                                                                                                                                                                                                                                                                               |
| **`offline_maps_not_allowed`**                                          | Your account has no offline maps, so a project cannot be given an offline maps key                                                                                                                                                                                                                                                                                                                                                                                                            |
| **`rate_limited`**                                                      | Too many requests in a minute. Wait the time the error gives                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **`validation`**, **`invalid_parameter`**                               | A tool input is not valid. Check the format of what you asked for                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **`config`**                                                            | The offline maps API token or its secret is missing. Set `MAGICLANE_OFFLINE_MAPS_API_KEY` and `MAGICLANE_OFFLINE_MAPS_SECRET`. A wrong one answers `key_invalid`                                                                                                                                                                                                                                                                                                                              |
| **`integrity`**                                                         | A downloaded map did not match the catalog's checksum and was deleted. Download it again                                                                                                                                                                                                                                                                                                                                                                                                      |
| **`cancelled`**                                                         | A map download was cancelled. What was downloaded is kept, and the same request continues it                                                                                                                                                                                                                                                                                                                                                                                                  |
| **`result_mismatch`**                                                   | The call completed, but its result was not in the expected form. If the tool changes something, the change was made: do not repeat it                                                                                                                                                                                                                                                                                                                                                         |
| **`network`**, **`timeout`**, **`non_json`**                            | The service could not be reached, or did not answer as expected. Try again later. For a create, read the note below first                                                                                                                                                                                                                                                                                                                                                                     |
| **HTTP `403`**                                                          | The HTTP server has no `MCP_AUTH_TOKEN`, and the request did not come straight from this computer: it was addressed to a name other than `127.0.0.1`, `localhost` or `::1`, or carried a proxy forwarding header. Set `MCP_AUTH_TOKEN` and give clients the token. A `403` from `/health` on a server that has a token means the same about the name: a server that listens on your own computer answers `/health` only as `127.0.0.1`, `localhost` or `::1`, unless `MCP_TRUST_PROXY` is set |
| **HTTP `413`**                                                          | The request body is larger than `MCP_MAX_BODY_BYTES` (40 MiB by default) or holds more than 1,000,000 JSON values                                                                                                                                                                                                                                                                                                                                                                             |
| **`internal_error`**                                                    | The portal hit an error of its own. The error carries a `request_id`: quote it to Magic Lane support                                                                                                                                                                                                                                                                                                                                                                                          |
| **`not_found`**                                                         | The portal has no such address, usually because an id is not in the right form. Ask the assistant to list the items again                                                                                                                                                                                                                                                                                                                                                                     |

When the answer to `create_style`, `create_project` or `create_api_key` is lost, the tool does not send the request again, since the API cannot delete what a second request would create. It looks the new item up in your account instead and says what it found (`create_style` reads your style list before it creates, and takes a style as the new one only if it has the name, was not in that list and is not published): the item was created, it was **probably not created**, or the outcome **is not known** because the account could not be read either. In the last two cases, ask the assistant to list the items and look for the name before creating it again.

If something else is wrong:

* **The server does not start:** check that `node --version` shows 22.12 or newer, and read the message in your client's MCP log. It names the setting to fix: a secret key that is misspelled or missing for the style and project tools, a `MAGICLANE_FILES_DIR` that names no folder, an unknown toolset, or only one of the two offline maps variables.
* **Tools are missing:** a toolset left out of `MAGICLANE_TOOLSETS` is not offered, and the offline maps tools need their token and secret. `download_offline_map` and the file inputs exist on the local server only.
* **You need more detail:** set `VERBOSE=true` to see a line for every tool call and its result in your client's MCP log, with the request ids to quote to support.

For detailed troubleshooting and complete parameter documentation, visit the [GitHub repository](https://github.com/magiclane/magiclane-mcp-devkit-server).

## Data usage & privacy[​](#data-usage--privacy "Direct link to Data usage & privacy")

The server works on your own Magic Lane account, and contacts Magic Lane services only:

* **Your Account Data** - The styles, projects and API keys you read, create or change are sent to and stored by the developer portal, as they are when you use the portal or Studio yourself
* **Keys Stay in the Environment** - The secret key is sent only to the portal, and the offline maps token and secret only to the Offline Maps API. They are never tool inputs and are never written to the server's logs
* **No Database** - Requests are made only when a tool is called. The server keeps the style reference pages and an offline maps catalog in memory for a short time, and nothing else
* **Files Only Where You Say** - The server writes a file to your computer only when a tool is given a path: a downloaded style, an API key or an offline map. With `MAGICLANE_FILES_DIR` set, only inside that folder
* **Your AI Client Sees the Conversation** - Tool inputs and results pass through your AI client and its model provider, under their own terms. API keys are masked in results unless you ask to see one on a local server

For details, review our [Terms of Service](https://www.magiclane.com/web/terms-and-conditions) and [Privacy Policy](https://www.magiclane.com/web/terms-and-conditions#privacy).

## Resources[​](#resources "Direct link to Resources")

* **API Dashboard**: [developer.magiclane.com/api/dashboard](https://developer.magiclane.com/api/dashboard)
* **Magic Lane Studio**: [developer.magiclane.com/studio](https://developer.magiclane.com/studio)
* **Source Code**: [github.com/magiclane/magiclane-mcp-devkit-server](https://github.com/magiclane/magiclane-mcp-devkit-server)
* **npm Package**: [@magiclane/mcp-devkit-server](https://www.npmjs.com/package/@magiclane/mcp-devkit-server)
* **Portal API Reference**: [external-api-v1-reference.md](https://github.com/magiclane/magiclane-mcp-devkit-server/blob/HEAD/docs/external-api-v1-reference.md)
* **Issues**: [github.com/magiclane/magiclane-mcp-devkit-server/issues](https://github.com/magiclane/magiclane-mcp-devkit-server/issues)
