MCP server

Let Claude and Cursor query your spreadsheet and the PDFs beside it.

Connect an Excel workbook or Airtable base, upload the invoices or contracts that go with it, and link them with a foreign key. Every DocQuery workspace comes with a hosted MCP server, so your AI client can list the tables, look up rows, and follow the relations — no local server to run.

What your agent can do

The server speaks MCP over Streamable HTTP at https://docquery.io/api/v1/mcp and is scoped to one workspace by its API key. The tools are read-only.

1

list_tables

Every table in the workspace with its columns.
2

list_relations

The foreign keys you defined, such as invoices.customer_id → customers.id.
3

query_table

Read rows from one table, with an optional exact-match filter on any columns and a row limit.
4

related_rows

Follow a relation from a row, for example from a customer to all of their invoices.

The server also exposes the workspace schema as a resource and three prompts: schema_overview, find_rows, and count_by.

Setup

Sign up, copy the API key from the API docs page, and replace YOUR_API_KEY below.

Cursor

Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project).

{
  "mcpServers": {
    "docquery": {
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      },
      "url": "https://docquery.io/api/v1/mcp"
    }
  }
}

Claude Code

Run this in your terminal.

claude mcp add --transport http docquery https://docquery.io/api/v1/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Claude Desktop

Add this to claude_desktop_config.json. It uses mcp-remote, which needs Node.js installed.

{
  "mcpServers": {
    "docquery": {
      "args": [
        "-y",
        "mcp-remote",
        "https://docquery.io/api/v1/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "command": "npx",
      "env": {
        "AUTH_HEADER": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Test it from your terminal

The official MCP Inspector CLI lists the tools without any client setup. This command uses the public, read-only demo key (example customers and invoices), so it works before you sign up. Swap in your own key later.

npx -y @modelcontextprotocol/inspector --cli https://docquery.io/api/v1/mcp \
  --transport http --header "Authorization: Bearer dq_demo_readonly" \
  --method tools/list

Try it in two minutes

  1. Create a free workspace (5 documents, 10,000 rows, no card).
  2. On the dashboard, click Load example data. You get a customers table and an invoices table already linked by customer_id.
  3. Paste one of the configs above with your key.
  4. Ask your agent: "Which customers have unpaid invoices, and how much do they owe?"