Private by default
Melius documentation
All docs
Reference · 21 min read

MCP Server

Melius runs its own MCP (Model Context Protocol) server, so any MCP-compatible client, such as an editor, a desktop assistant, or your own tooling, can connect and use your Melius connectors as tools, governed by whatever permissions you grant that client.

The server URL is:

https://api.melius.tools/api/v1/mcp

For create_workspace_location, both path and gitUrl are optional individually; supply at least one. Feature and standalone-task workspace defaults are described in Workspace Locations.

Connecting a client

There are two ways to connect. OAuth is preferred; use an API key only for tools that do not support OAuth.

Connect with OAuth (preferred) (Recommended)

With OAuth, you give your MCP client only the server URL. The client registers itself with Melius, sends you to Melius to sign in and approve access, and then receives its own access token. There is no API key to create, paste, or accidentally leak, and many tools, including Claude, only support this method.

Steps

  1. In your MCP client (for example Claude), add a custom MCP server and enter the server URL. Leave any API key or authorization header empty.
  2. The client opens a browser window to Melius. Sign in if you are not already signed in.
  3. On the authorization page, review the request. For a new client, choose which connector it should use, confirm the working directory, and review the file, command, and network permissions it will have.
  4. Select Approve. To refuse, select Deny.
  5. Return to your MCP client. It is now connected and can list and call the tools it has permission to use.

If a client you already approved needs to reconnect, the authorization page asks you to approve again without repeating the connector and permission setup.

Reviewing and revoking access

Every client you approve through OAuth appears on the MCP Clients page alongside clients created with an API key, and its detail page shows its OAuth client ID. Open the client to review its connector, permissions, and activity. Deleting the client revokes its access: its tokens stop working and it must be approved again to reconnect.

OAuth access uses the authorization code flow with PKCE (S256). Clients are public clients and request the mcp scope. Clients that support dynamic client registration and the standard OAuth discovery documents need no further configuration.

Connect with an API key

Use an API key for tools that cannot use OAuth. Each key belongs to an MCP client: a named client tied to one of your connectors. When you create a client you choose:

  • A name, to identify where it is used.
  • A connector. The client's tool calls execute through this connector.
  • Permissions. Which file system, command, and network operations this client may perform. Defaults to your organization's default tool permissions and can be overridden per client.

Create the client from the MCP Clients page and copy the API key immediately. It is only shown once. Then add it to your MCP client's configuration:

{
  "mcpServers": {
    "melius": {
      "url": "https://api.melius.tools/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer <your-client-api-key>"
      }
    }
  }
}

If a key is lost or exposed, rotate it from the client's detail page. The old key stops working as soon as a new one is issued, so update every tool that uses it.

Identifiers and the MCP cutover

Use task keys such as MEL-12, resource slugs such as feat-user-friendly-ids, and UUIDs where a run ID is required. Numeric IDs for these resources are no longer accepted: MCP requests using them return a 400 error with the expected format. Update saved client calls and examples to use the current key, slug, or UUID. Previous slugs continue to resolve as aliases after a slug change; responses use the current slug. See Projects, Features & Tasks for finding and copying identifiers.

Work tools

When a managed agent runs, it acts on the work it has been assigned through the work tools. They always apply to the agent's current assignment, so none of them takes a task, feature or review ID.

  • melius__work__get_assignment — summarize the current assignment: what it is, its status or stage, what is expected of the current iteration, and related items such as the parent feature or project.
  • melius__work__get_history — read the history of the assignment, including earlier feedback requests and answers, recent conversation messages and earlier progress and completion notices. Results are paginated.
  • melius__work__report_progress — post a progress update to the work's Conversation. It does not change the status of the work.
  • melius__work__complete_work — tell Melius the agent has finished the current assignment, with a summary. Melius then decides what happens next, for example moving a task to review or to done. Reviews are completed by submitting a verdict with melius__review__submit_review instead.
  • melius__work__cannot_complete — report that an assigned lifecycle stage task cannot be completed because its action failed or is impossible. Provide a non-empty reason string. This fails the activity and ends the assignment; Melius handles the failure. This tool applies only to lifecycle stage tasks.

Use melius__work__complete_work when the assignment is finished, or melius__work__cannot_complete when a lifecycle stage task's action cannot be done. For blocking questions or decisions, including when a person could help the agent proceed, use melius__user__ask_feedback to stop and wait for an answer. It applies to the current assignment by default. There is no separate blocker tool; for a regular task, ask for feedback instead.

Creating a feature with handover context

melius__feature__create_feature accepts carryOverMessages when called from the user's own chat: use {"mode":"all"} or {"mode":"last_n","count":10}. The count must be an integer of at least one for last_n and must be omitted for all. An invalid selection, a missing chat, or a chat that is not owned by the caller or is not a chat session is rejected before a feature is created. The selection is a snapshot of all message kinds; an empty chat is valid and an oversized count copies all messages.

Alternatively, pass sourceFeatureId as a feature slug in the same organization and a nonblank initialMessage with what should change or be added. The tool creates a new feature with a handover brief and an empty spec; it does not copy the source feature's conversation. sourceFeatureId and carryOverMessages are mutually exclusive. Missing or blank change requests and calls combining both options are rejected before creation.

For other creation calls, initialMessage is optional and appears before copied messages. A description over 500 characters is shortened and, unless an initial message is supplied, its full text becomes the first message. For chat handovers, a seeding failure leaves the feature and planning work in place and returns a handover error with zero copied messages. For a source-feature call, the tool currently returns the feature without a seeding result, so check its conversation for the brief before continuing. Source notices are best effort. See Conversations and Projects, Features & Tasks for the user workflows.

The feature-copy REST endpoint returns HTTP 201 with status: partial and handover.seeded: falseif the brief could not be seeded; the feature and planning work remain. A successful seed returns status: success and handover.seeded: true.

Feature tools and new work on a feature

melius__feature__reopen_planning moves a feature back to its planning (design) stage, reopens planning work and posts the reason as a system notice on the feature conversation. It takes the feature slug and a required, non-empty reason, and any agent with access to the feature can call it. It is rejected when the feature is already in planning, or when its lifecycle has no design stage to return to. Calling it again in the same run returns the original result.

melius__task__create_task with a feature behaves according to the feature's stage. If the feature is past implementation but not done (for example in a review stage), the task is created and the feature returns to its implementation stage so the full lifecycle runs again. If the feature is done, the call is rejected with a message telling the agent to call melius__feature__reopen_planning first and then create tasks. This is checked only when a task is created, not when a task is claimed.

Artifact tools

Agents and MCP clients can attach outputs to tasks with the artifact tools. Artifacts then appear on the task's Artifacts tab (see Projects, Features & Tasks).

  • melius__artifact__create_artifact — create an artifact on a task from text or base64 content, a URL, or a connector path. Using an existing name creates a new version.
  • melius__artifact__create_diff_artifact — capture the code changes in the task's workspace (or between two commits) as a diff artifact.
  • melius__artifact__list_artifacts — list the artifacts and versions for a task.
  • melius__artifact__read_artifact — read an artifact's content. For a URL it returns the link; for a connector path it reads the file through the connector.

Content passed directly through these tools is limited to 1 MB. For anything larger, save the file on the connector's machine and create a connector path artifact that points to it. Reviewer agents can list and read the artifacts of the task or feature they are reviewing.

Context Library tools

The Library tools let agents and MCP clients work with a project's Library documents (see Projects, Features & Tasks). Each tool takes an optional projectId, which defaults to the project of the current task. Tools that act on an existing document are addressed by title only, case-insensitively. Titles contain 1–80 letters, digits, spaces, hyphens, underscores or periods after trimming and collapsing spaces. notes is reserved for project notes.

The reserved notes entry is always included in prompts and can be read or edited by agents, but cannot be created or deleted as a library document.

  • melius__library__list_library_docs — list the documents in a project with their ID, title, size and agent editing setting. Content is not included.
  • melius__library__read_library_doc — read a document. Large documents are read in pages with start_line and max_lines; the result reports the total line count, whether more lines remain, and where to continue.
  • melius__library__create_library_doc — create a markdown document with a unique title. Documents created this way have agent editing on.
  • melius__library__write_library_doc — replace the whole content of a document.
  • melius__library__edit_library_doc — partially edit a document with a mode of overwrite, append, insert (at a 0-based character position) or replace (the first occurrence of old_content).
  • melius__library__delete_library_doc — delete a document.

Writing, editing and deleting fail with an error when agent editing is turned off for the document. Reading is always allowed. The agent editing setting can only be changed by users in the app.

Managing the server

From the MCP Server page you can also:

Managing the server

From the MCP Server page you can also:

  • Set base permissions that apply to every client on the server unless a client overrides them.
  • Review clients, their status, and open any client to see its details.
  • Watch recent activity and quick stats (total and active clients, tool call volume, success rate) for the server as a whole. For a deeper look at individual tool calls, see the Logs docs.

Available tools

Tools are exposed as namespace__tool, for example fs__read_file. A client only sees and can call the tools its permissions allow: file system, command, and network access follow the client's permission settings. The server also supports MCP prompts, so clients can list and fetch your saved prompt templates with prompts/list and prompts/get.

Tools marked for agent runs are designed for agents that Melius runs for you, such as asking you a question or submitting a review. An external client can see them but rarely needs them.

File system

Mainly for external clients

  • fs__get_working_dir Returns the working directory the client is scoped to.
  • fs__read_file Reads a file, optionally a range of lines or only lines matching a pattern.
  • fs__list_directory Lists the contents of a directory.
  • fs__stat_path Returns metadata for a file or directory.
  • fs__write_file Creates or edits a file.
  • fs__create_directory Creates a directory.

Commands

Mainly for external clients

  • cmd__execute_command Runs a shell command on the connector. Pass background: true to run it without waiting.
  • cmd__command_execution_status Returns the state of a background command: status, exit code, elapsed and remaining time, and recent output.
  • cmd__command_execution_cancel Stops a running background command. The job ends as cancelled.
  • cmd__command_execution_list Lists background commands for the current work, or for you when there is no work, newest first.

Connector information

Mainly for external clients

  • link__system_info Reports information about the connector's machine.

Browser

Useful to both

  • browser__open Starts a headless browser session, optionally at a URL. Read-only tier.
  • browser__close Ends the browser session and closes the browser. Read-only tier.
  • browser__navigate Loads a URL in the session. Read-only tier.
  • browser__snapshot Returns the page's text content and structure for reading and finding elements. Read-only tier.
  • browser__screenshot Captures the page as an image, optionally the full page. Read-only tier.
  • browser__console Returns recent console messages from the page. Read-only tier.
  • browser__network Returns recent network requests and failures. Read-only tier.
  • browser__click Clicks an element on the page. Interactive tier.
  • browser__type Fills text into an input. Interactive tier.
  • browser__press_key Presses a keyboard key. Interactive tier.
  • browser__wait_for Waits for an element or condition on the page. Interactive tier.
  • browser__set_viewport docs.mcpServer.tools.browser.set_viewport

Projects

Useful to both

  • project__create_project Creates a project. Optional defaultWorkspaceLocationId and spec.
  • project__list_projects Lists your projects. Returns a truncated description plus specLength and notesLength; use describe_project for full content.
  • project__describe_project Returns one project in full: description, spec, notes, default workspace location, and a list of its features (id, name, status). Parameter: projectId.
  • project__update_project Updates a project. Accepts name, description, spec, notes, and defaultWorkspaceLocationId as full overwrites, or a partial edit with target, mode, content, position, and old_content (see Partial edits below).

Features

Useful to both

  • feature__create_feature Creates a feature in a project. Optional workspaceLocationId and assignedAgentId, which must belong to you. Optional lifecycleId (from list_lifecycles) selects its lifecycle; omitted uses the project default.
  • feature__list_features Lists features. Returns a truncated description plus specLength and notesLength; use describe_feature for full content.
  • feature__describe_feature Returns one feature in full: description, spec, notes, path, workspaceLocationId, assigned agent, status, current lifecycle stage, and a summary of its tasks (id, title, status). Parameter: featureId.
  • feature__update_feature Updates a feature. Accepts the full-overwrite fields plus workspaceLocationId and assignedAgentId, or a partial edit with target, mode, content, position, and old_content (see Partial edits below).
  • feature__advance_feature_stage Moves a feature to its next lifecycle stage.
  • feature__reopen_planning docs.mcpServer.tools.feature.reopen_planning

Tasks

Useful to both

  • task__create_task Creates a task. Optional lifecycleId (from list_lifecycles) selects its lifecycle; omitted uses the project default.
  • task__list_tasks Lists tasks, with optional filters.
  • task__update_task_status Changes a task's status.
  • task__get_task_details Returns a task's details and conversation.
  • task__add_task_comment Posts a message to a task's conversation.
  • task__add_task_dependency Makes one task depend on another.
  • task__remove_task_dependency Removes a dependency between two tasks.

Memory

Useful to both

  • memory__add_memory Saves a memory entry.
  • memory__get_memory Reads a memory entry.
  • memory__list_memory Lists memory entries.
  • memory__delete_memory Deletes a memory entry.

docs.mcpServer.areas.work

Useful to both

  • work__get_assignment docs.mcpServer.tools.work.get_assignment
  • work__get_history docs.mcpServer.tools.work.get_history
  • work__report_progress docs.mcpServer.tools.work.report_progress
  • work__complete_work docs.mcpServer.tools.work.complete_work
  • work__cannot_complete docs.mcpServer.tools.work.cannot_complete

User feedback

Mainly for agent runs

  • user__ask_feedback Asks you a question and waits for your answer.

Prompt templates

Useful to both

  • prompt__list_templates Lists your saved prompt templates.
  • prompt__get_template Renders a prompt template with the variables you supply.

Agent profiles

Useful to both

  • agent_profile__list_agent_profiles Lists the available agent profiles.

Lifecycles

Useful to both

  • lifecycle__list_lifecycles Lists a project's active lifecycles for features or tasks, with each one's name, type, whether it is the default, and a short stage summary. Use the returned id as lifecycleId when creating a task or feature.

Reviews

Mainly for agent runs

  • review__add_review_finding Records a finding on a review.
  • review__submit_review Submits a review's verdict.
  • review__get_review Returns a review and its findings.

Connectors and workspace locations

Useful to both

  • workspace__list_connectors Lists your connectors with id, name, hostname, platform, status, and home directory.
  • workspace__list_workspace_locations Lists your workspace locations with id, name, path, and connector id.
  • workspace__create_workspace_location Creates a workspace location. Parameters: connectorId, name, and optionally path and gitUrl (at least one of path or gitUrl is required). Fails if the connector is not yours or that connector and path already have a location.
  • workspace__rename_workspace_location Renames a workspace location. Parameters: id, name. There is no tool to delete a location.

Agent runs

Mainly for agent runs

  • agent__extend_timeout Asks for more time during an agent run.
  • agent__list_managed_agents Lists your managed agents with a short summary of each. Read-only.
  • agent__describe_managed_agent Returns the full configuration and status of one managed agent (parameter: id). Environment variable values are redacted. Read-only; agents cannot be created, edited, or deleted through MCP.

Network tools

Web search finds pages through Tavily. HTTP requests fetch text from a specific URL through the connector; use the browser tools for pages that require JavaScript rendering.

melius__network__search_web

Provide a non-empty query of at most 400 characters and an optional positive integer max_results (default 5; values above 10 are capped at 10). The result contains the query and ranked results, each with a title, URL, content snippet, and optional score. Invalid input, rate limits, provider errors, and timeouts return errors.

For self-hosted or local mode, set TAVILY_API_KEY in the server environment to a Tavily API key and restart the server. If it is unset, the tool returns an error saying web search is not configured and that TAVILY_API_KEY is not set on the server.

melius__network__http_request

Provide an HTTP or HTTPS url. The tool performs a GET and returns the final URL, status, selected headers, content type, text body, byte count, truncation flag, and redirect information. URLs with credentials are rejected. Request bodies, custom headers, other methods, and binary downloads are not supported.

  • format: raw (default) returns the body as received; text converts HTML to readable text.
  • max_bytes: maximum body bytes to read, from 1 to 2,097,152; default 524,288. A response reaching the limit is marked truncated.
  • timeout_ms: request timeout in milliseconds, from 1 to 30,000; default 15,000.

The tool follows up to five redirects. It accepts text types including text/*, JSON, XML, and XHTML; unsupported content types return an error. Invalid URLs or parameters, blocked addresses, DNS or connection failures, timeouts, and too many redirects also return errors. An HTTP error response can still be returned with its status and text body.

Network permissions and address restrictions

Configure these permissions for a Conversation or managed agent as trusted, requires approval, or never. Existing configurations inherit the defaults when these permissions have not been set.

  • search_web controls web search and defaults to trusted.
  • external_http_request controls requests to external addresses and defaults to requires approval.
  • private_http_request controls requests to localhost and private networks and defaults to requires approval.

Link-local addresses (169.254.0.0/16 and fe80::/10) and cloud metadata targets including fd00:ec2::254, metadata.google.internal, andmetadata.goog are always blocked, even when permission is granted. Resolved addresses and every redirect are checked. A request approved as external that reaches a private address is refused; its body is not returned.

Audit records include the search query or request URL and result status and byte count where available, but not response bodies. URL credentials and query values are removed from logged URLs.

Background commands

By default cmd__execute_command waits for the command to finish. To run a long build, test suite, or server without holding the tool call open, set background to true. The call returns immediately with a handle, and the command keeps running on the connector.

  • timeout is required with background. It is in milliseconds and must be greater than 0 and no more than 86400000 (24 hours). A missing, zero, or larger value is rejected with an error naming the limit.
  • stdout_path and stderr_path are optional. When set, the full output is also written to those files on the connector's machine, which is useful for commands with large output.
  • The returned handle identifies the job. Pass it to cmd__command_execution_status or cmd__command_execution_cancel.

When a job finishes, its result contains the status, exit code, duration, and the end of stdout and stderr, reported separately. Short output is included directly. Larger output is stored and the result refers to it instead of including it all, together with a preview. command_execution_status also reports elapsed time and the time remaining before the timeout while the job is running. command_execution_list shows recent jobs, with an optional filter for running jobs only.

A job has one of these statuses:

  • running — the command is still executing.
  • completed — the command exited with code 0.
  • failed — the command exited with a non-zero code.
  • timed_out — the timeout elapsed before the command finished.
  • cancelled — the job was stopped with command_execution_cancel.
  • lost — the connector stopped or restarted, or disconnected and lost track of the job. Background commands do not survive a connector crash or restart.

Getting the result. When a job started by a managed agent finishes, fails, or is lost, Melius posts the result and wakes an eligible idle agent for the work, so the result can reach its next prompt without polling. The wake is not guaranteed: a cancelled job does not wake the agent, and a task that is already completed or cancelled is not woken. An agent can always call command_execution_status to check a job. External MCP clients connected with an API key or OAuth have no conversation to wake, so they should call command_execution_status or command_execution_list to check on their jobs.

When a job started by an agent belongs to a task or feature, nothing appears in that item's Conversation tab while it runs. Once it finishes, it is added to the tool activity summary as a background command with its final status.

Listing, describing, and partial edits

The project and feature list tools keep responses small. They no longer return spec or notes. The description is cut to 1000 characters and, when cut, ends with ...[truncated: N chars], where N is the original length. Each item includes specLength and notesLength (0 when empty). Use the describe tools to read the full content.

The update tools still accept full-overwrite fields such as name, description, spec, and notes. To change part of a large field, pass these parameters instead:

  • target - description, spec, or notes.
  • mode - overwrite replaces the whole target; append adds content to the end; insert adds content at position; replace swaps the first occurrence of old_content for content.
  • content - the text to write, add, or insert.
  • position - 0-based character offset for insert. An offset outside the text is an error.
  • old_content - the text to find for replace. Only the first occurrence is changed; it is an error if the text is not found.

Example: append a note to a feature's notes.

{
  "featureId": "feat-user-friendly-ids",
  "target": "notes",
  "mode": "append",
  "content": "\nDecision: use cursor pagination."
}

Browser tool sessions and permissions

Browser tools run a headless Chromium on the connector of the task's Workspace Location. They are governed by two permissions that you set independently: Browser (read-only) allows opening, navigating, snapshots, screenshots, and console and network diagnostics; Browser (interactive) adds clicking, typing, key presses, and waiting for the page to change. Interactive includes read-only; read-only does not allow interaction.

To check responsive or mobile layouts, open accepts optional width and height (200 to 4000 pixels, default 1280 by 800), deviceScaleFactor, isMobile, hasTouch, or a device preset name such as iPhone 13 that sets the viewport, user agent, pixel ratio and touch together. These are fixed when the session opens. The set_viewport tool later resizes the open session's viewport without losing page state, but it cannot change the user agent or mobile emulation.

Read-only flow: open a session at your local dev server, take a snapshot to read the page (a structured view by default, or the visible text only with plaintext set to true), take a screenshot to check how it looks, read recent console messages for errors, then close the session.

Interactive flow: open a session, navigate to a sign-in page, type into the fields, click the submit button, wait for the next page to appear, take a screenshot to confirm, then close the session.

Only opening a session, navigating, snapshots, screenshots, and closing are recorded in the audit log, with the URLs involved. Clicks, typing, key presses, waits, and console and network reads are not recorded individually, and screenshot images, page content, and console or network output are never stored.

Only http and https URLs can be opened. file:, data:, and javascript: addresses are blocked, while localhost and private network addresses are allowed so agents can test local apps. Read-only access limits what an agent can do, but it cannot prevent a website from changing state in response to an ordinary page load (for example a link that triggers an action on a GET request), so only point agents with browser access at sites you trust. See the connector docs for browser installation requirements.

ReferenceNext: Logs