Marianne MCP Integration Guide¶
This guide explains how to integrate Marianne AI Compose with a Model Context Protocol (MCP) client such as Claude Desktop.
MCP uses machine identifiers such as job_id because it talks to the daemon
API. In composer-facing terms, that ID is the runtime handle for a submitted
score, and the conductor remains the execution authority.
Overview¶
Marianne's MCP server exposes these current capabilities:
- Submitted-score lifecycle: list, inspect, and submit scores through the conductor-facing service layer.
- Conductor controls: pause, resume, and cancel submitted scores.
- Workspace access: list files, read files, inspect artifacts, and read bounded log tails.
- Score references: read the current score schema, score example, instrument options, validation types, learning options, score templates, and conductor records.
There are no quality-score tools. The former validate_score / generate_score
names were never advertised and returned placeholder text; they were removed
(GH #232). Use mzt validate for score validation.
Claude Desktop Configuration¶
Prerequisites¶
Confirm Marianne is installed in the Python environment that will run the MCP server:
Validate any score before submitting it through MCP:
Configure Claude Desktop¶
Add the Marianne MCP server to your Claude Desktop configuration file.
Configuration locations:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
Example:
{
"mcpServers": {
"marianne": {
"command": "python",
"args": ["-m", "marianne.mcp.server"],
"env": {
"MZT_WORKSPACE_ROOT": "/path/to/workspaces"
}
}
}
}
Environment variables:
| Variable | Purpose | Default |
|---|---|---|
MZT_WORKSPACE_ROOT |
Root directory for workspace file operations | Current working directory |
MZT_LOG_LEVEL |
MCP server logging level | INFO |
Available Tools¶
Submitted-Score Tools¶
list_jobs¶
List conductor records for submitted Marianne scores.
Parameters:
status_filteroptional:running,paused,completed,failed, orcancelled.limitoptional: maximum records to return. Default50, maximum500.
get_job¶
Read detailed conductor state for one submitted score.
Parameters:
job_idrequired: conductor runtime identifier for the submitted score.
start_job¶
Submit a Marianne score YAML file.
Parameters:
config_pathrequired: path to the score YAML file.workspaceoptional: workspace directory for score execution.client_cwdoptional: client working directory for resolving relative score paths.start_sheetoptional: first sheet number, default1.self_healingoptional: enable self-healing mode.self_healing_auto_confirmoptional: auto-confirm self-healing fixes.escalationoptional: pause for composer decision on exhaustion.dry_runoptional: validate without executing when supported.runtime_variablesoptional: per-run variables for score templates.freshoptional: clear existing score state before submitting.confirm_freshrequired whenfreshis true. Fresh submissions are destructive because they clear existing score state.
Conductor Control Tools¶
pause_job¶
Ask the conductor to pause a submitted score at the next sheet boundary.
Parameters:
job_idrequired.
resume_job¶
Ask the conductor to resume a paused score.
Parameters:
job_idrequired.
cancel_job¶
Ask the conductor to cancel a submitted score.
Parameters:
job_idrequired.
Artifact Tools¶
marianne_artifact_list¶
List files in a workspace.
Parameters:
workspacerequired.pathoptional: subdirectory inside the workspace.include_hiddenoptional: include dotfiles and hidden directories.
marianne_artifact_read¶
Read a file inside a workspace.
Parameters:
workspacerequired.file_pathrequired.max_sizeoptional: default50000, maximum100000.encodingoptional: defaultutf-8.
marianne_artifact_get_logs¶
Read bounded log tails for a submitted score.
Parameters:
job_idrequired.workspaceoptional: auto-detected when possible.linesoptional: default100, maximum10000.leveloptional:debug,info,warning,error, orall.
The log result names its state explicitly:
unavailable: the workspace was not found.no-sources: no log source was found.no-lines: a log source exists and is empty.available: bounded log lines were read.stream-only: source logs are large; MCP returns bounded tails only.
marianne_artifact_list_artifacts¶
List artifacts created in a submitted score workspace.
Parameters:
job_idrequired.workspaceoptional.sheet_filteroptional.artifact_typeoptional:output,error,log,state, orall.
marianne_artifact_get_artifact¶
Read one artifact from a submitted score workspace.
Parameters:
job_idrequired.artifact_pathrequired.workspaceoptional.max_sizeoptional: default100000, maximum1000000.
Available Resources¶
Score References¶
config://schema: JSON schema for current score YAML.config://example: current score YAML example usinginstrument.config://instrument-options: instrument profiles and configuration options.config://validation-types: current validation types.config://learning-options: learning configuration reference.
Conductor Records¶
marianne://jobs: overview of submitted scores.marianne://jobs/{job_id}: detailed conductor record for one submitted score when a state backend is available.marianne://templates: current score templates.
Usage Examples¶
In Claude Desktop you normally ask in natural language. The snippets below show the MCP call shape a client sends internally.
Submit A Score¶
await call_tool("start_job", {
config_path: "/workspaces/my-project/scores/review.yaml",
workspace: "/workspaces/my-project/workspace",
client_cwd: "/workspaces/my-project",
runtime_variables: {
run_label: "review-2026-07-08"
}
});
Submit With Fresh State¶
await call_tool("start_job", {
config_path: "/workspaces/my-project/scores/review.yaml",
workspace: "/workspaces/my-project/workspace",
fresh: true,
confirm_fresh: true
});
Monitor A Submitted Score¶
const status = await call_tool("get_job", {
job_id: "review-2026-07-08"
});
const logs = await call_tool("marianne_artifact_get_logs", {
job_id: "review-2026-07-08",
lines: 50,
level: "error"
});
Read Artifacts¶
const artifacts = await call_tool("marianne_artifact_list_artifacts", {
job_id: "review-2026-07-08",
workspace: "/workspaces/my-project/workspace"
});
const report = await call_tool("marianne_artifact_get_artifact", {
job_id: "review-2026-07-08",
workspace: "/workspaces/my-project/workspace",
artifact_path: "analysis-summary.md"
});
Read Score References¶
const schema = await read_resource("config://schema");
const instruments = await read_resource("config://instrument-options");
const validationTypes = await read_resource("config://validation-types");
const templates = await read_resource("marianne://templates");
Security And Operational Boundaries¶
All MCP tools require client-side user consent because they can read workspace files or send conductor control requests.
File operations are restricted to the configured workspace root. Paths are validated to prevent directory traversal and workspace escape.
Sensitive configuration values are masked where Marianne surfaces them. Log and artifact reads are size-bounded.
MCP clients should submit through the conductor-facing start_job tool and then
poll conductor records. A short-lived CLI process is not proof that score
execution has finished.
Do not restart or stop the conductor from an embedded MCP workflow while scores are active. Use pause, resume, or cancel for score-level control.
Troubleshooting¶
MCP Server Not Starting¶
Permission Errors¶
Confirm MZT_WORKSPACE_ROOT points at a directory the MCP server can read:
Submit Failures¶
Validate the score and check the conductor:
If fresh is true, include confirm_fresh: true only after the composer has
confirmed that existing score state may be cleared.
Related Commands¶
mzt mcp: start the MCP server.mzt start: start the conductor through the CLI.mzt status: inspect conductor and submitted-score state.mzt logs <job_id>: inspect CLI log output for a submitted score.
See CLI Reference for command details.