Skip to main content

factql-mcp

FactQL is the harness around the model.

Ask a question about your data. FactQL runs the query, checks the result before you see an answer, and declines instead of guessing when it can't verify.

Every answer ships with the query that ran, the rows it returned and the lineage behind it. One API call. Works with Postgres, MySQL, DuckDB, uploaded CSV and XLSX files, and PDFs with cited answers.

Built for developers putting AI near real data: AI apps, agents and internal tools that can't afford a confident wrong number.

This package is FactQL's MCP server: it brings those answers into Claude Desktop, Claude Code, Cursor, or any MCP client. Learn more at factql.ai.

Get a key

Sign up free at factql.ai/signup, connect your data, and create an API key. An ask-only key is enough for this server.

Install

uvx factql-mcp

or pip install factql-mcp.

Configure

Variable Required Default
FACTQL_API_KEY yes — your FactQL API key (an ask-only key is enough)
FACTQL_BASE_URL no https://api.factql.ai
FACTQL_WORKSPACE_ID no default workspace, for tenants that use workspaces
FACTQL_END_USER_ID no mcp:<os user>

Claude Desktop / Cursor (mcpServers)

{
  "mcpServers": {
    "factql": {
      "command": "uvx",
      "args": ["factql-mcp"],
      "env": { "FACTQL_API_KEY": "fl_live_..." }
    }
  }
}

Claude Code

claude mcp add factql -e FACTQL_API_KEY=fl_live_... -- uvx factql-mcp

Tools

  • whoami() — the tenant, plan, and workspaces this key can query.
  • ask(question, workspace_id?, locale?) — the answer, the SQL that ran, and up to 50 rows. A needs_clarification result means the question was too vague; ask the user and call again with the detail. A declined result means FactQL couldn't verify an answer and gave none rather than guess; the reason says why. locale is en-GB or en-US.

Each ask is stateless: the MCP client carries the conversation, so a follow-up should restate what it refers to.

Safety

FactQL only runs SELECT queries, under a statement timeout, and only against the tables your admin has enabled. The key's permissions decide what it can see; this server adds nothing on top.

Development

uv run --with pytest pytest -q

License

MIT

Metadata

Release files for factql-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for factql-mcp 0.1.2
File Size Uploaded Provenance Actions
factql_mcp-0.1.2.tar.gz 5.5 kB Without provenance Details for factql_mcp-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for factql-mcp 0.1.2
File Interpreter ABI Platform Actions
factql_mcp-0.1.2-py3-none-any.whl Python 3 none any Details for factql_mcp-0.1.2-py3-none-any.whl

Total release size: 11.4 kB

Release files / factql_mcp-0.1.2.tar.gz

Download URL factql_mcp-0.1.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
30eaa961255e102aafd65b9f49d8989c1489ef47221389f998b51369d5dbcb37
BLAKE2b-256 checksum
How to use checksums
6f457dca6b63a3498477d06e2c1c1428cc47b84a0236c5d6f89dc4435444232a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / factql_mcp-0.1.2-py3-none-any.whl

Download URL factql_mcp-0.1.2-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
193b6e0f0df1f6aa2018d5377f3a4b06d5462ca9e2059e372450235df964f667
BLAKE2b-256 checksum
How to use checksums
90e836679d05f1996bcf32983e5957fc2986590439a9ef0d46d455e2b3f70ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for factql-mcp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page