> ## Documentation Index
> Fetch the complete documentation index at: https://docs.harmonic.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP & CLI

> Connect Aristotle's MCP server to your AI assistant, or install the CLI and verify code from a terminal.

Connect Aristotle to the AI assistant you already use, such as Claude, ChatGPT, Codex, or Cursor, and ask it in plain words to verify your code. Your assistant sends your project to Aristotle, starts the run, checks on it, and tells you what Aristotle proved and what it found. Any assistant that supports MCP servers works.

To use Aristotle from a terminal or in scripts instead, see [Use the CLI](#use-the-cli).

## What to ask

Once Aristotle is connected, ask things like:

* "Verify that the parser in ./src handles every input without crashing."
* "Write a C function that merges two sorted arrays, and verify that it never reads out of bounds."
* "How is my Aristotle run going?"
* "What did Aristotle prove in my last project?"
* "Continue last week's project with the files I changed."

To send a whole folder, use an assistant that runs commands on your machine, such as Claude Code, Codex, Cursor, or VS Code. In a chat app, attach a few files instead.

## Set up the MCP

<video controls playsInline preload="none" poster="/videos/aristotle-mcp-poster.jpg" width="1280" height="720" aria-label="Video, 21 seconds, with music and no speech: Aristotle is added to an AI assistant as a connector, the assistant is asked in plain words to check a parser, and it reports what Aristotle proved and the bugs it found.">
  <source src="https://mintcdn.com/harmonic-477a19b3/X5MgmnCbMYMUKD41/videos/aristotle-mcp.mp4?fit=max&auto=format&n=X5MgmnCbMYMUKD41&q=85&s=7783b5ec0b19b04d8e13e8bdc4c06204" type="video/mp4" />
</video>

Add Aristotle's MCP server to your assistant, then sign in with your Aristotle account when it asks. There's no key to copy.

```text wrap theme={null}
https://aristotle.harmonic.fun/mcp
```

> [!NOTE]
>
> **Private deployments**
>
> * Use the address of your deployment in place of `aristotle.harmonic.fun`, in the server URL and in each command below.
> * An administrator of the deployment must turn on MCP access for your account or organization.
> * An assistant that runs on your computer or in a cloud workspace, such as Claude Code, Codex, Cursor, or VS Code, connects from that machine. That machine needs Tailscale or the allowed network of the deployment.
> * An assistant that connects from the servers of its vendor, such as ChatGPT, claude.ai, or Claude Desktop, needs approved access to the address. It cannot reach a deployment that is open on Tailscale only.

### Claude Code

```shell wrap theme={null}
claude mcp add --transport http --scope user aristotle https://aristotle.harmonic.fun/mcp
```

Then run `/mcp` and choose **Authenticate**.

### Claude Desktop and claude.ai

Go to **Customize › Connectors**, add a custom connector with the server URL, and sign in. On Team and Enterprise plans, an Owner adds it under **Organization settings › Connectors** first.

### ChatGPT

Where your plan allows custom MCP servers, go to [chatgpt.com/plugins](https://chatgpt.com/plugins), add one with the server URL and OAuth, and sign in.

### Codex

```shell wrap theme={null}
codex mcp add aristotle --url https://aristotle.harmonic.fun/mcp
```

Then sign in when Codex asks.

### Cursor

[Add Aristotle to Cursor](https://cursor.com/install-mcp?name=aristotle\&config=eyJ1cmwiOiJodHRwczovL2FyaXN0b3RsZS5oYXJtb25pYy5mdW4vbWNwIn0=), then sign in when Cursor asks. Or add this to `~/.cursor/mcp.json` yourself:

```json wrap theme={null}
{
  "mcpServers": { "aristotle": { "url": "https://aristotle.harmonic.fun/mcp" } }
}
```

> [!NOTE]
>
> **Private deployments**
>
> The Add Aristotle to Cursor link adds the public server. Add this config with the address of your deployment instead.

### VS Code

[Add Aristotle to VS Code](https://vscode.dev/redirect/mcp/install?name=aristotle\&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Faristotle.harmonic.fun%2Fmcp%22%7D), then sign in when VS Code asks. Or run **MCP: Add Server**, choose **HTTP**, and enter the server URL.

> [!NOTE]
>
> **Private deployments**
>
> The Add Aristotle to VS Code link adds the public server. Run **MCP: Add Server** with the server URL of your deployment instead.

### On a remote machine

If your assistant runs over SSH or in a cloud workspace, sign-in ends on a page with a `curl` command. Run it on the machine your assistant runs on.

## Good to know

* **Billing:** your first run asks you to confirm which organization pays. Runs billed to it then start without asking for 90 days, except a new project that sends only a prompt, which asks each time. While that organization's credits are low, every run asks.
* **Long runs:** runs take minutes to days. Your assistant checks in for about 10 minutes, then stops. Ask again later, or follow the run in the web app.
* **Questions:** some runs ask you a question. Each question waits 15 minutes for your answer, then the run carries on without it.
* **Uploads:** up to 100 MB compressed. Credentials (`.env` files, keys, and `.ssh` folders), `.git` folders, Lean's build outputs, and symbolic links stay out, and Aristotle drops anything your `.gitignore` excludes. Outside a git checkout, or on Windows without git, those files are sent and dropped once they arrive; to keep a file from being sent at all, move it out of the folder. Your assistant tells you what it left out.
* **Verilog:** see [Verilog verification](https://docs.harmonic.fun/hardware/verilog.md) for giving your assistant a design's top module, defines, and black boxes.

> [!NOTE]
>
> **Private deployments**
>
> The settings of your deployment decide access and credits. If your organization needs either, ask the administrator of the deployment.

## Tools

Your assistant picks these itself. They're listed here for reference.

* `get_credit_balance`: check your organization's credit balance
* `create_upload` and `start_run`: send a project and start a run
* `get_run` and `wait_for_run`: check on a run
* `answer_question`: answer a run's question
* `send_message`: tell a running run what to change
* `list_properties` and `get_property`: read the results
* `continue_run`: start a finished project's next run
* `list_projects` and `list_runs`: find projects and their earlier runs
* `create_download`: download a project's files
* `cancel_run`: stop a run, asking you first about one started elsewhere
* `rename_project`: rename a project
* `delete_project`: delete a project for good, always asking you first
* `send_feedback`: tell Harmonic what went wrong or what would help, with your email so we can follow up

## Use the CLI

Two commands, and Aristotle is verifying your code. The CLI needs Python 3.10 or later.

> [!NOTE]
>
> **Private deployments**
>
> Set `ARISTOTLE_WEB_URL` to the address of your deployment before you install, log in, or submit a project. On macOS or Linux:
>
> ```shell wrap theme={null}
> export ARISTOTLE_WEB_URL=https://your-deployment.example.com
> ```
>
> In Windows PowerShell:
>
> ```powershell wrap theme={null}
> $env:ARISTOTLE_WEB_URL = "https://your-deployment.example.com"
> ```
>
> Then use that address in place of `aristotle.harmonic.fun` in the install command. Keep the variable set in each shell and CI job that runs Aristotle. The machine that runs the CLI, also a CI runner, needs Tailscale or the allowed network of the deployment.

**1. Install the CLI**

On macOS or Linux, this installs uv if it is missing, installs the CLI, and logs you in:

```shell wrap theme={null}
curl -fsSL https://aristotle.harmonic.fun/install.sh | sh
```

Running it again upgrades. To install without logging in, give the variable to `sh`, not `curl`:

```shell wrap theme={null}
curl -fsSL https://aristotle.harmonic.fun/install.sh | ARISTOTLE_SKIP_LOGIN=1 sh
```

Or, on any system, Windows included:

```shell wrap theme={null}
uv tool install "aristotlelib>=3"
```

This installs `aristotle` globally, with no virtual environment to create or activate. It needs [uv](https://docs.astral.sh/uv/getting-started/installation/), a fast, reliable Python package manager.

**2. Verify your code**

```shell wrap theme={null}
aristotle submit "Hunt for real bugs with provable resolution" --project-dir ./my-project
```

If you are not logged in yet, the first run at a terminal offers to log you in: it shows a code to approve in your browser, and keeps the key for this machine. There is nothing to export. Aristotle works out the language from the files you upload, so there is nothing to declare either. It verifies C, Rust, and Verilog. Upload your code as it is, and Aristotle writes the proofs. Projects with only Lean files aren't supported.

The command prints a link to the project. Follow the run there, or pass `--wait` to stay in the terminal until it finishes. See [Tracking properties](https://docs.harmonic.fun/properties.md) for reading the result.

## Other ways to install

Run Aristotle without installing it:

```shell wrap theme={null}
uvx --from "aristotlelib>=3" aristotle --help
```

Install into an existing virtual environment, which is also how you get the library:

```shell wrap theme={null}
pip install "aristotlelib>=3"
```

Upgrade regularly. New project management commands, clearer progress output, and safer upload behavior land often.

With uv:

```shell wrap theme={null}
uv tool upgrade aristotlelib
```

With pip:

```shell wrap theme={null}
pip install --upgrade aristotlelib
```

## Logging in and out

`aristotle login` does on its own what the first `submit` offers to do. It prints the address of the [approval page](https://aristotle.harmonic.fun/device) and a code, and opens the page when a browser is available. Sign in there, type the code, check that the page names your machine, and approve. If you belong to more than one organization, the page also asks which one the key is for, starting with your company's. Runs started with the key are billed to that organization. Aristotle then makes a key named after the machine, and the CLI stores it in `~/.config/aristotle/credentials.json` (`$XDG_CONFIG_HOME/aristotle` when that is set, `%APPDATA%\aristotle` on Windows), readable only by you. The key is listed in [API keys](https://aristotle.harmonic.fun/keys), where you can revoke it.

`aristotle logout` removes the stored key. The key itself stays valid until you revoke it in [API keys](https://aristotle.harmonic.fun/keys).

> [!NOTE]
>
> **Private deployments**
>
> The approval page and API keys are on your deployment, at the address that `ARISTOTLE_WEB_URL` gives. The CLI stores the key of that deployment in a separate file in the same folder.

## Scripts and CI

To check properties in your CI pipeline with `aristotle ci`, see [Verify in CI](https://docs.harmonic.fun/ci.md).

A build job has nobody to approve a login, so give it a key from [API keys](https://aristotle.harmonic.fun/keys) directly. The environment variable overrides a stored key, so a logged-in machine still behaves like the build agent when one is set:

```shell wrap theme={null}
export ARISTOTLE_API_KEY=your-api-key-here
```

Or pass a key to a single command, before or after the subcommand:

```shell wrap theme={null}
aristotle submit "My prompt" --project-dir ./my-project --api-key your-api-key-here
```

> [!NOTE]
>
> **Private deployments**
>
> Create the key in API keys on your deployment. Set `ARISTOTLE_WEB_URL` in the job too, and run the job on a runner that reaches the deployment.

## Verify your setup

```shell wrap theme={null}
aristotle --version
```

It prints `aristotlelib 3.` followed by the rest of the version, confirming the CLI is set up.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.