mml-mcp

v0.1.2
@jaynightmare/mml-mcp Checked 4 days ago Published 1 month ago

MCP server for Contract Tester: define contracts for your own agents, let your assistant run adversarial hand-off tests, and see results in the studio

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mml_login Sign in to Contract Tester

Starts sign-in with GitHub. Returns a URL and a code for the user to approve in their browser, then call mml_login_status to finish.

ParameterTypeDescription
clientNamestringName shown on the approval page

mml_login_status Finish sign-in

Waits for the user to approve the sign-in started by mml_login and stores the token in ~/.mml.

ParameterTypeDescription
waitSecondsintegerHow long to keep polling

mml_logout Sign out

Revokes this machine's token on the gateway and removes it from ~/.mml.

mml_whoami Who am I

Shows which GitHub account this machine is signed in as.

mml_list_projects List projects

Lists your Contract Tester projects, plus the built-in demo project.

mml_init Set up this workspace

Creates a Contract Tester project and a .mml/ folder in the workspace (config, README, .gitignore). Safe to commit: it never holds credentials.

ParameterTypeDescription
forcebooleanCreate a new project even if the workspace already has one
namestringProject name, defaults to the folder name
workspacePathstringAbsolute path of the workspace folder. Defaults to the server's working directory.

mml_infer_schema Draft a contract from samples

Drafts a strict JSON Schema from example payloads (types observed, keys present in every sample required, extra keys forbidden). Review and tighten it before using it as a contract.

ParameterTypeDescription
samples *arrayExample payloads sent from one agent to another

mml_set_workflow Define agents, hand-offs and contracts

Defines the workflow under test: agents, the edges between them, each edge's JSON Schema contract and a valid baseline payload. Validated by the gateway, then saved to .mml/workflow.json. Replaces any earlier workflow.

ParameterTypeDescription
agents *array
edges *array
workspacePathstringAbsolute path of the workspace folder. Defaults to the server's working directory.

mml_status Workspace status

Shows the project this workspace belongs to, its edges and the latest run summary, if any.

ParameterTypeDescription
workspacePathstringAbsolute path of the workspace folder. Defaults to the server's working directory.

mml_start_run Start a test run

Starts an adversarial run over the project's edges and returns the first case. For each case you send a (possibly corrupted) payload to the user's real agent and report whether it handled it with mml_report_result.

ParameterTypeDescription
edgeIdsarrayLimit the run to these edges
fuzzerModestringheuristic: deterministic mutations. semantic: model-driven rewrites.
seedstringReuse an earlier run's seed to reproduce its mutations
workspacePathstringAbsolute path of the workspace folder. Defaults to the server's working directory.

mml_report_result Report the outcome of a case

Reports how the user's agent handled a case and returns the next case, or the final summary when the run is complete.

ParameterTypeDescription
caseId *string
handled *booleantrue if the agent returned normally, false if it threw or failed
runId *string
durationMsnumberHow long the agent took
errorstringError message or stack summary when handled is false
workspacePathstringAbsolute path of the workspace folder. Defaults to the server's working directory.

mml_run_summary Summarise a run

Fetches the stored summary of a finished run (the latest by default) and saves it under .mml/.

ParameterTypeDescription
runIdstring
workspacePathstringAbsolute path of the workspace folder. Defaults to the server's working directory.

mml_dashboard_url Open the dashboard

Returns the studio link for this workspace's project.

ParameterTypeDescription
workspacePathstringAbsolute path of the workspace folder. Defaults to the server's working directory.