# FactQL

> FactQL is a freemium MCP server for analytics and data. Ask questions of your databases and files and get SQL-verified answers or a decline. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, CLI, Web
- **Website:** https://factql.ai
- **Repository:** https://github.com/factql/factql-mcp
- **MCP Registry name:** io.github.factql/factql-mcp
- **Categories:** analytics and data, databases
- **Listing updated:** 2026-11-14

## About

The idea behind FactQL is that a model writes a plausible query and the surrounding harness has to make it true. For each question it plans, explores the schema, drafts SQL, executes it to verify, self-corrects if needed and writes a summary limited to the result set. If it cannot verify an answer it fails closed and says so instead of guessing.

Every answer includes the SQL that ran, up to 50 rows and the lineage of tables and measures behind them. Sources named are Postgres, MySQL, a DuckDB gateway, uploaded CSV or XLSX files and PDFs with cited answers. Only `SELECT` queries run, under a statement timeout and only against tables an admin has enabled. The site suggests starting from an uploaded file rather than production credentials.

Through MCP, the `ask` tool returns one of three outcomes: an answer, a `needs_clarification` request, or a `declined` result with a reason. Each call is stateless, so follow-ups must restate what they refer to. Use the hosted server at `https://api.factql.ai/mcp` with a sign-in, or run `uvx factql-mcp` with an API key; an ask-only key is enough. The MCP package is MIT licensed.

## Features

- **Execution-verified answers:** Runs the query and checks the result before showing a number.
- **Decline instead of guess:** Returns a declined result with a reason when it cannot verify.
- **SQL and rows included:** Each answer ships its query, rows and lineage.
- **Multiple sources:** Works with Postgres, MySQL, DuckDB, CSV, XLSX and PDFs.
- **Read-only queries:** Only SELECT statements run, under a timeout.
- **Spend ceiling:** The site says a budget alert is followed by a hard 402 rather than an invoice for overage.

## Good for

- Ask a business question of a warehouse from Claude or Cursor
- Audit any answer by checking the SQL behind it
- Analyse an uploaded spreadsheet without database credentials
- Build an internal tool that must not show invented figures
- Give each end user in an app private conversations

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http factql-mcp https://api.factql.ai/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://api.factql.ai/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "factql-mcp": {
      "url": "https://api.factql.ai/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "factql-mcp": {
      "type": "http",
      "url": "https://api.factql.ai/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "factql-mcp": {
      "serverUrl": "https://api.factql.ai/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "factql-mcp": {
      "type": "http",
      "url": "https://api.factql.ai/mcp"
    }
  }
}
```

## Tools

- `whoami`: Shows the tenant, plan and workspaces the key can query.
- `ask`: Answers a question with the SQL that ran and up to 50 rows, or asks for clarification, or declines.

## FAQ

### What happens if it cannot verify an answer?

It returns a declined result with a reason instead of a guess.

### Which queries can it run?

Only SELECT queries, against tables your admin has enabled.

### Do I need an API key?

Yes for the local package; an ask-only key is enough. The hosted server uses a FactQL sign-in.

### Is it stateful?

No. Each ask is stateless and the MCP client carries the conversation.

### Is FactQL free?

FactQL has a free plan, with paid plans for more usage or features.

### How do I add FactQL to Claude Code?

Run this command in your terminal: claude mcp add --transport http factql-mcp https://api.factql.ai/mcp

### What are the best alternatives to FactQL?

The closest alternatives to FactQL are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP, Midplane and World Monitor.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.
- [ChartAnt](https://ai-powered.com/mcp/chartant): ChartAnt is a freemium MCP server for design and media.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/factql
