1. Once per project

Closure evaluates a project that has been initialized: a scan of the repository, an empty selection for you to fill with the requirements the product owes, and a binding that says how its tests prove them. Initializing uses the package, so install it once even if Claude Desktop is where you will work:

npm install --global ./closure-engine-0.2.3.tgz
closure init --repo /path/to/project

Review .closure/selection.yaml and choose what your product owes. Initialization deliberately leaves it empty: a scan can inventory implementation, not decide what the application should do. To try the loop first without your own repository, run closure demo --out closure-demo and use closure-demo/app as the project and closure-demo/catalog as the catalog below.

2. Claude Desktop

Open closure-engine-0.2.3.mcpb from the delivery email (double-click it, drop it on the Claude Desktop window, or use Settings, Extensions, Advanced settings, Install Extension). Claude Desktop shows the extension’s details and three settings:

  • Project: the folder you initialized above. One project per installed extension.
  • Allow running tests: off, Claude can read the plan, the next task and the verdict. On, it can also run your test suite and the declared negative controls, with your user permissions, and ask for a release verdict.
  • Catalog: leave empty for the catalogs that ship with Closure. Set it to closure-demo/catalog for the demo, or to your own catalog.

Claude Desktop runs the extension with the Node.js it ships, so nothing else is needed for inspection. Running your tests still needs your project’s own toolchain where a terminal would find it.

3. Cursor

From the project directory, write the entry into the file Cursor reads when it opens the project:

closure mcp-config --repo . --client cursor --write

That creates or updates .cursor/mcp.json, keeping any other servers in it. The command also prints a cursor:// install link if you prefer Cursor to ask. Add --allow-execution before --write to let the agent run your tests.

4. Claude Code

The command prints the registration command for this project; run what it prints:

closure mcp-config --repo . --client claude-code

It is claude mcp add-json closure … with this installed copy’s absolute paths, so it keeps working from any directory. The same entry can go in the project’s .mcp.json.

5. ChatGPT app

Closure lives in Codex, the coding side of the ChatGPT app, which launches local servers from the Codex configuration file. The chat side connects only to remote servers, and Closure does not run remotely: your repository and its tests stay on your machine.

closure mcp-config --repo . --client codex --write

That writes an [mcp_servers.closure] table into the project’s .codex/config.toml, which Codex reads for projects you have trusted. To make it global instead, paste the printed table into ~/.codex/config.toml. The Codex command line reads the same file.

6. Other MCP clients

Windsurf, Gemini CLI, Hermes and most other clients accept an mcpServers JSON fragment:

closure mcp-config --repo .

Merge the printed entry into the client’s MCP settings. Clients that take a command and arguments in a form instead can copy them from the fragment. The client must be able to launch a local process; a remote-only client cannot use it.

7. Check the connection

Ask the agent to list Closure’s tools and call closure_doctor. Inspection-only connections expose five tools; connections allowed to run tests expose eight. Then ask for closure_status: a blocked verdict is the normal first answer, and the field guide explains what it is asking for. The included docs/mcp.md describes every tool. Stuck? Support reads every message.