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

# MCP Server

> Connect Claude, ChatGPT, Cursor, or any MCP client to your Runchat canvas. Agents can read, build, connect, run, and debug workflows on your behalf.

Runchat hosts a remote [Model Context Protocol](https://modelcontextprotocol.io) server, so any MCP-compatible AI client can work with your canvas directly — listing and creating workflows, building and wiring nodes, editing code, and running executions.

The server lives at:

```
https://runchat.com/api/mcp
```

Instructions for connecting the MCP on different platforms are as follows:

## Add the connector

The first time you connect, your client walks you through a one-time sign-in (OAuth) and asks you to approve access to your Runchat account. After that it stays connected.

<Tabs>
  <Tab title="Claude (desktop & web)">
    1. From the Chat or Code tab, click **Customize** then click **Connectors** from the sidebar.
    2. Click **+** from the Connectors toolbar, then **Add custom connector**.
    3. Name it `Runchat` and paste `https://runchat.com/api/mcp` as the URL.
    4. Click **Add** and then wait for Claude to show the **Connect** button.
    5. Click **Connect** to open a browser and launch Runchat. Sign in and approve access when the Runchat consent screen appears.
  </Tab>

  <Tab title="Claude Code (CLI)">
    Run:

    ```bash theme={null}
    claude mcp add --transport http runchat https://runchat.com/api/mcp
    ```

    The next time you use a tool, Claude Code opens the browser sign-in and consent flow automatically.
  </Tab>

  <Tab title="Other MCP clients">
    Add a **remote / HTTP (Streamable HTTP)** server pointing at `https://runchat.com/api/mcp`. Clients that support OAuth will discover the sign-in flow automatically. For clients without OAuth, authenticate with an API key (see below).
  </Tab>
</Tabs>

### Authenticating with an API key

If your client doesn't support OAuth, or you're scripting server-to-server, you can authenticate with a Runchat API key instead of signing in:

1. Sign into Runchat, click your account button, then **Get Runchat API Key**.
2. Create a key and copy it.
3. Configure your MCP client to send it as a bearer token: `Authorization: Bearer <your_api_key>`.

## What the agent can do

Once connected, the agent has the same canvas abilities as the in-app assistant:

* **Find & create runchat workflows** — `list_runchats`, `create_runchat`
* **Read** the canvas and inspect node parameters — `get_canvas`, `read_nodes`
* **Build** prompt, code, input, image, note, and sub-workflow nodes — `create_prompt_node`, `create_code_node`, `create_input_node`, `create_image_node`, `create_note`, `place_tool`, `create_artifact_node`, `update_node`
* **Connect & organize** nodes into workflows — `connect_nodes`, `organize_nodes`, `delete_nodes`, `delete_edges`
* **Edit code** in code nodes with find-and-replace or full rewrites — `read_files`, `edit_file`, `create_files`, `delete_files`, `read_status`
* **Discover models** and their parameters — `list_models`, `get_model_params`
* **Find & run published tools** — search the tool library (and your own runchats), inspect how a tool is built, and run one directly without adding it to a canvas — `search_tools`, `inspect_tool`, `execute_tool`
* **Load skills** for specialized environments (Rhino, Blender, Revit, HTML) — `use_skill`
* **Drive Rhino, Grasshopper & Blender** whenever Runchat is open inside the CAD app on the same account — read/build the Grasshopper canvas, run Rhino commands, run Python in Blender, and capture the viewport — `grasshopper_api`, `run_rhino_command`, `run_blender_command`, `take_screenshot`
* **Run** nodes and read the results — `run_nodes`
* **Publish** Create reusable tools and apps from your workflows — `publish_runchat`

The agent can only read, edit, and run workflows you own or that are shared with your team — the same access you have in the app.
You can share a URL to a runchat workflow that you want the agent to edit or run, or use Copy ID from the runchat menu and share that instead.
The agent can also search your runchats if required.

## Using the MCP with Rhino and Grasshopper

The MCP reaches Rhino through your signed-in Runchat plugin session. The plugin just needs to be open — it doesn't matter which workflow (if any) it's showing:

1. Launch Runchat in Rhino and sign in with the same account the MCP is connected to
2. Ask the agent to run Rhino commands, build a Grasshopper definition, or capture the viewport

The agent still saves scripts and results to a workflow on the canvas. To have it work in a specific one, share that workflow's URL (or use Copy ID from the Runchat menu); otherwise it can create a new workflow itself.

## Example

```text theme={null}
You: Can you make a runchat that converts a hero image to a collection of marketing assets?

Agent: [creates a new runchat, searches for models, adds nodes to the canvas, runs nodes to test, shares a link]
```

<Note>
  Running nodes consumes credits. The agent will confirm before executing any
  `run_nodes` calls. Share the editor link it returns to watch progress or take
  over in the app.
</Note>

## Programmatic access

Prefer a terminal to an MCP client? The [`@runchat/cli`](/concepts/integrations/cli) command line is a port of this server — the same tools as scriptable `runchat …` commands. Or call the [Canvas API](/api-reference/canvas-tools) over plain HTTP.
