> For the complete documentation index, see [llms.txt](https://docs.quadratichq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quadratichq.com/connect-via-mcp.md).

# Connect via MCP

## Connect via MCP

Quadratic provides a hosted Model Context Protocol (MCP) server that lets AI assistants read and write your Quadratic spreadsheets. Connect it to any MCP-compatible client to create files, import data, run code, and build analyses from outside the app.

### Connect

Add the Quadratic MCP server to your AI tool of choice:

```
https://mcp.quadratichq.com/
```

For example, in Cursor or Claude, add a remote MCP server with the URL above. The first time you use it, you'll be prompted to sign in to your Quadratic account through a browser-based flow.

### What it can do

The MCP server exposes tools for working with your files:

* **auth** — sign in and out of your Quadratic account
* **files\_read** — list your files and get file metadata
* **files\_write** — create, open, and close files
* **read\_data** — read cell data, code cell contents, table outlines, database schemas, dependencies, and search text
* **write\_data** — set cell values, write Python/JavaScript/SQL/Formula code cells, import CSV/Excel/Parquet files, create data tables, and more

Read and write tools support batching, so AI clients can perform many operations efficiently in a single call.

### Example prompts

Once connected, try prompts like:

* "Create a new Quadratic file and import this CSV."
* "Read the table in my Sales file and summarize revenue by region."
* "Add a Python chart to my Q3 report file."

### Security

The MCP server acts on your behalf using your Quadratic account. It has access to the same files and connections you do. Sessions are authenticated via OAuth and can be revoked by logging out.

{% hint style="info" %}
Prefer calling Quadratic from your own code instead of an AI agent? Use the Developer API.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.quadratichq.com/connect-via-mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
