Skip to content

MCP server

Every Clarent method as an MCP tool, for Claude Code, Cursor and other MCP clients. Optional: the core stays stdlib-only and only this server needs a dependency.

pip install 'clarent-methods[mcp]'      # adds mcp>=2,<3
clarent mcp                              # stdio server

Tools

  • list_methods — ids, status and summaries.
  • One tool per method (ach, aar, intent, rcf, redteam, spc, triz_matrix), each taking args (the command line after clarent <method>, as a list), cwd (where relative paths are resolved) and an optional lang (en or es). It returns exit_code, stdout and stderr of the real CLI. The tool description includes the method's --help.

Tools run the CLI in a subprocess. intent verify runs the verification commands written in the contract, so only point it at contracts you trust, as you would on the command line.

Claude Code

claude mcp add --scope project clarent -- clarent mcp

Tested on 2026-11-28 with Claude Code 2.1.332: the wheel installed with the mcp extra in a clean virtualenv, registered with the command above, and claude -p called ach with ["next", "flaky-test.json"] and got T1 priority=36.0 for=H5 against=H1, the same as the CLI.

Cursor and other clients

The same stdio command in the client's MCP configuration, for example .cursor/mcp.json:

{ "mcpServers": { "clarent": { "command": "clarent", "args": ["mcp"] } } }

Not tested in Cursor; the server speaks plain stdio MCP and is tested with the official Python client (tests/test_mcp.py).

Without the extra, clarent mcp exits 1 with: the MCP server needs the optional extra: pip install 'clarent-methods[mcp]'.