FactQL
Verified answers from your data, with the query and rows behind them, or a decline, never a guess.
Que pouvez-vous faire avec FactQL ?
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. Aneeds_clarificationresult means the question was too vague; ask the user and call again with the detail. Adeclinedresult means FactQL couldn't verify an answ...
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
factql-mcpclaude mcp add factql -e 'FACTQL_API_KEY=<your factql_api_key>' -e 'FACTQL_BASE_URL=https://api.factql.ai' -e 'FACTQL_WORKSPACE_ID=<FACTQL_WORKSPACE_ID>' -e 'FACTQL_END_USER_ID=<FACTQL_END_USER_ID>' -- uvx factql-mcp==0.1.2
{
"mcpServers": {
"factql": {
"command": "uvx",
"args": [
"factql-mcp==0.1.2"
],
"env": {
"FACTQL_API_KEY": "<your factql_api_key>",
"FACTQL_BASE_URL": "https://api.factql.ai",
"FACTQL_WORKSPACE_ID": "<FACTQL_WORKSPACE_ID>",
"FACTQL_END_USER_ID": "<FACTQL_END_USER_ID>"
}
}
}
}
Variables d'environnement
FACTQL_API_KEYobligatoire secret FactQL API key (an ask-only key is enough)FACTQL_BASE_URLFactQL API base URLFACTQL_WORKSPACE_IDDefault workspace, for tenants that use workspacesFACTQL_END_USER_IDWho is asking; defaults to mcp:<os user>
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
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. Aneeds_clarificationresult means the question was too vague; ask the user and call again with the detail. Adeclinedresult means FactQL couldn't verify an answer and gave none rather than guess; thereasonsays why.localeisen-GBoren-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
Questions fréquentes
Qu'est-ce que FactQL ?
Verified answers from your data, with the query and rows behind them, or a decline, never a guess.
Comment installer FactQL ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add factql -e 'FACTQL_API_KEY=<your factql_api_key>' -e 'FACTQL_BASE_URL=https://api.factql.ai' -e 'FACTQL_WORKSPACE_ID=<FACTQL_WORKSPACE_ID>' -e 'FACTQL_END_USER_ID=<FACTQL_END_USER_ID>' -- uvx factql-mcp==0.1.2. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour FactQL ?
Oui. Il attend FACTQL_API_KEY, à renseigner dans sa configuration.
FactQL est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient FactQL ?
Il est publié par factql. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.