Skip to content
API > Mel API

Mel as an MCP server

Use Mel's coding agent from Claude, Cursor, Windsurf and VS Code: what you need, setup, and what Mel may do in your folders.


mel mcp serve runs Mel as a local Model Context Protocol server over stdio. Another app on your computer — Claude Desktop, Claude Code, Cursor, Windsurf, VS Code — starts it and can then hand Mel's coding agent a task in a folder, and read back what Mel found or did.

Status: built, not yet offered. The Mel API plan that mel mcp serve runs on is not on sale yet; until

it is, every task answers that the Mel API is not offered. These pages describe how it works when it is.

What you need

  1. Mel installed on the same computer (the MCP server is the mel binary itself).
  2. A Mel API key (melk_…) — created on your Mel account page, under API keys. It is shown once; keep it in the MCP app's configuration, nowhere else.
  3. The Mel API plan on your account — $49 a month for 1,000 runs, then $0.05 a run. Each task is one run. See pricing.
  4. Your own model key in Mel ▸ Settings ▸ AI. Tasks run on YOUR provider key; the Mel API plan never uses Mel's hosted credits.

Where the binary is:

OSPath to use as the server's command
macOS/Applications/Mel.app/Contents/MacOS/mel
WindowsC:\Users\<you>\AppData\Local\Programs\Mel\mel.exe
Linux/home/<you>/.local/bin/mel

The tools

ToolWhat it does
start_taskStart Mel on a task: folder (an absolute path) and task (plain words); optional model (auto by default). Returns a task_id at once.
get_taskThe task's status and, once it ends, its result. wait_seconds (0–50) waits for the end before answering.
cancel_taskStop a running task. What it already changed stays changed.
list_tasksThe tasks this server started, newest first.

A task ends with a named ending — done, cancelled, deadline (one hour by default), approval_expired (a question to you went unanswered for ten minutes), server_stopped (the app closed the server), or an error with its reason.

What Mel may do in your folders

Read-only, unless you say otherwise. An app that calls Mel gets Mel's read and search tools. Nothing it starts is approved silently:

  • Grant a folder in Mel ▸ Settings ▸ Profiles ▸ Other apps (MCP server): add the folder, then turn on Edit files, Run commands, or both. A grant covers the folder and everything under it, and takes effect on the next action (turn it off the same way).
  • Or answer each time. Where the calling app supports MCP elicitation (a question the server asks you through the app), Mel asks you before each change it has no grant for — one action at a time.
  • Otherwise the action is refused, the task says so, and it carries on read-only.

Your own conversations in Mel are never affected by these grants, and your Profiles settings never apply to another app's tasks. Mel's browser, desktop control, connectors and memory are never offered to another app.

Each task's transcript is kept on your computer (under Mel's data folder, in mcp-tasks/), out of your conversation list and never synced; "delete everything" in Mel removes it.

Setup snippets

Replace the path with your OS's path above and melk_… with your key.

Claude Desktop

claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/; Windows: %APPDATA%\Claude\):

{
  "mcpServers": {
    "mel": {
      "command": "/Applications/Mel.app/Contents/MacOS/mel",
      "args": ["mcp", "serve"],
      "env": { "MEL_API_KEY": "melk_…" }
    }
  }
}

Restart Claude Desktop after saving.

Claude Code

claude mcp add mel --scope user --env MEL_API_KEY=melk_… -- /Applications/Mel.app/Contents/MacOS/mel mcp serve

Or, for one project, a .mcp.json at its root (keep the key out of version control — Claude Code expands ${MEL_API_KEY} from your environment):

{
  "mcpServers": {
    "mel": {
      "command": "/Applications/Mel.app/Contents/MacOS/mel",
      "args": ["mcp", "serve"],
      "env": { "MEL_API_KEY": "${MEL_API_KEY}" }
    }
  }
}

Cursor

~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "mel": {
      "command": "/Applications/Mel.app/Contents/MacOS/mel",
      "args": ["mcp", "serve"],
      "env": { "MEL_API_KEY": "melk_…" }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "mel": {
      "command": "/Applications/Mel.app/Contents/MacOS/mel",
      "args": ["mcp", "serve"],
      "env": { "MEL_API_KEY": "melk_…" }
    }
  }
}

VS Code

.vscode/mcp.json in a workspace (or the user-level mcp.json, from the Command Palette: MCP: Open User Configuration). VS Code prompts for the key once and stores it securely:

{
  "inputs": [
    { "type": "promptString", "id": "mel-api-key", "description": "Mel API key (melk_…)", "password": true }
  ],
  "servers": {
    "mel": {
      "type": "stdio",
      "command": "/Applications/Mel.app/Contents/MacOS/mel",
      "args": ["mcp", "serve"],
      "env": { "MEL_API_KEY": "${input:mel-api-key}" }
    }
  }
}

VS Code supports elicitation, so Mel can ask you before each change it has no grant for.

Settings the server reads

VariableDefaultWhat it sets
MEL_API_KEY—your Mel API key (required to start tasks)
MEL_MCP_MAX_TASKS4tasks running at once (1–16)
MEL_MCP_TASK_MAX_SECS3600one task's time limit (60–86400)
MEL_MCP_ASK_SECS600how long a question to you waits (30–3600)

When something is wrong

Every refusal says what to do and, where one exists, links to it: a missing or revoked key → where to create one (API keys); no Mel API plan → where to subscribe (pricing); no model key of your own → Mel ▸ Settings ▸ AI; too many tasks → wait for one or cancel one. The server writes its own log lines to stderr, which each app shows in its MCP logs.