Claix MCP
Security layer and controlled access to databases for AI agents. Connects SQL databases in read-only mode, defines recovery paths with custom rules.
Documentation
Claix as an MCP server
Endpoint
MCP https://claix.dev/mcp
Claix exposes a Model Context Protocol (MCP) server (version 1.13.0, 32 tools) so AI assistants and automation tools can run Retrieve first (routes, agents, live database ask), plus extraction, Agent mode, Markdown, and multi-document Q&A without hand-written REST integrations.
The public server URL is https://claix.dev/mcp. Auth uses your Claix API key in the x-api-key header (or the optional api_key tool argument if the client cannot send custom headers).
Tools use dot notation (claix.schemas.list, claix.extract.pdf, …) and return structuredContent with success, data, and error.
1. Compatible clients
Any MCP-capable program can connect to Claix. Common production and development clients:
- Cursor
- Claude Desktop
- Claude Code
- Windsurf
- Cline
- Continue
- Zed
- Smithery
- Lovable
- Replit Agent
- ChatGPT (with MCP connectors)
- n8n
- Make
- Zapier (via HTTP/MCP)
- LangGraph / LangChain
- Any MCP client with Streamable HTTP or SSE
IDEs and coding agents (Cursor, Windsurf, Cline…) usually take JSON config with the server URL and headers. Smithery and Streamable HTTP clients send JSON-RPC directly to POST /mcp. Claude Desktop often uses SSE via mcp-remote (GET /mcp + POST /mcp/message).
2. Authentication
Recommended — HTTP header on every request:
x-api-key: <YOUR_API_KEY>
In Smithery, configure the header with x-from: { "header": "x-api-key" } so the user pastes their key when connecting. The API key is optional in the config schema if the client already sends x-api-key.
Per-tool fallback: many tools accept api_key in arguments if the MCP client cannot send custom headers.
3. Transport modes
| Mode | Typical use | How to connect |
|---|---|---|
| Streamable HTTP | Smithery, Cursor, modern clients | POST /mcp with JSON-RPC (initialize, tools/list, tools/call). Header Accept: application/json, text/event-stream |
| SSE legacy | Claude Desktop, mcp-remote | GET /mcp (SSE stream) + POST /mcp/message?sessionId=… for messages |
Both modes are active on the same base URL. The server detects the request type automatically.
Static metadata for scanners (Smithery, clients): https://claix.dev/.well-known/mcp/server-card.json
5. Markdown, multi-document, and Retrieve
| Area | Tools | Notes |
|---|---|---|
| Markdown | claix.markdown.* | No schema_id; optional save → row_id |
| Multi-document | claix.multi_document.ask | Multipart field "file" (up to 10) + questions JSON |
| Retrieve | claix.retrieve.ask, claix.routes.*, claix.agents.* | POST /retrieve/{agent_name} |
6. Available tools
After connecting, call tools/list for all 32 tools with inputSchema, outputSchema, and annotations:
| Tool | Description |
|---|---|
| claix.schemas.list | Lists account schemas (id, name, type, is_agent_mode, agent_definition). Call first to discover schema_id. |
| claix.schemas.get | Gets one schema by schema_id (GET /api/get-schema/{schema_id}) with its full definition, including Guardar Datos (window_context). Free call. |
| claix.schemas.create | Creates a schema (POST /api/create-schema): name, type, schema_definition; optional Agent mode, window_context (Save Data → insert mapped row; default false), and source verification. |
| claix.schemas.update | Updates a schema (PUT /api/update-schema/{schema_id}): same body as create; window_context = Save Data. Free call. |
| claix.schemas.delete | Deletes an account schema (POST /api/delete-schema) by schema_id. |
| claix.extract.excel | Excel/CSV → typed JSON (POST /api/excel-json). First sheet. file + schema_id (no space_id). If Guardar Datos (window_context), may return row_id. Returns log_id. |
| claix.extract.pdf | PDF → typed JSON (POST /api/pdf-json). Text or scanned, max 15 MB. file + schema_id (no space_id). If Guardar Datos, may return row_id. Returns log_id. |
| claix.extract.doc | Document (.docx,.txt,.md,.rtf) → JSON (POST /api/doc-json). file + schema_id (no space_id). If Guardar Datos, may return row_id. Returns log_id. |
| claix.extract.image | Image (JPEG, PNG, WebP, HEIC) → JSON (POST /api/img-json). file + schema_id (no space_id). If Guardar Datos, may return row_id. Returns log_id. |
| claix.extract.text | Text/HTML/XML → JSON (POST /api/txt-json). content field, no file. schema_id (no space_id). If Guardar Datos, may return row_id. Returns log_id. |
| claix.extract.audio | Audio (MP3, WAV, M4A, OGG) → JSON (POST /api/audio-json). file + schema_id (no space_id). If Guardar Datos, may return row_id. Returns log_id. |
| claix.convert.json_to_excel | JSON → Excel.xlsx (POST /api/json-excel). Returns file_base64. |
| claix.agent.excel | Excel/CSV + Agent mode → data[], agent_data, and log_id (POST /agent/excel-json). file + schema_id (no space_id). If Guardar Datos, may return row_id. |
| claix.agent.pdf | PDF + Agent mode → data[], agent_data, and log_id (POST /agent/pdf-json). file + schema_id (no space_id). If Guardar Datos, may return row_id. |
| claix.agent.doc | Document + Agent mode (POST /agent/doc-json). data[], agent_data, and log_id. file + schema_id (no space_id). If Guardar Datos, may return row_id. |
| claix.agent.image | Image + Agent mode (POST /agent/img-json). data[], agent_data, and log_id. file + schema_id (no space_id). If Guardar Datos, may return row_id. |
| claix.agent.text | Text/HTML/XML + Agent mode (POST /agent/txt-json). content + schema_id (no space_id). If Guardar Datos, may return row_id. |
| claix.agent.audio | Audio + Agent mode (POST /agent/audio-json). data[], agent_data, and log_id. file + schema_id (no space_id). If Guardar Datos, may return row_id. |
| claix.markdown.excel | Excel/CSV → Markdown (POST /api/excel-markdown). No schema_id. save=true inserts with Markdown rules and may return row_id. |
| claix.markdown.pdf | PDF → Markdown (POST /api/pdf-markdown). No schema_id. Optional save → row_id. |
| claix.markdown.doc | Document → Markdown (POST /api/doc-markdown). No schema_id. Optional save → row_id. |
| claix.markdown.image | Image → Markdown (POST /api/img-markdown). No schema_id. Optional save → row_id. |
| claix.markdown.text | Text/HTML/XML → Markdown (POST /api/txt-markdown). content field. Optional save → row_id. |
| claix.markdown.audio | Audio → Markdown (POST /api/audio-markdown). No schema_id. Optional save → row_id. |
| claix.multi_document.ask | Typed questions across up to 10 files (POST /multi-document). Multipart: repeatable file field + questions JSON. Optional window_context/window_time/space_id (OpenAPI). |
| claix.retrieve.ask | Ask a Retrieve agent (POST /retrieve/{agent_name}). Body { questions[{ question, format? }] }; format required only for razonada mode. |
| claix.routes.create | Create a Retrieve route (POST /routes): name, description, rules, tables[{ name, columns }]. |
| claix.routes.edit | Edit a Retrieve route (PUT /routes/edit/{route_id}). Same body as create + route_id. |
| claix.routes.delete | Delete a Retrieve route (POST /routes/delete/{route_id}). |
| claix.agents.create | Create a Retrieve agent (POST /agents): name, slug, description, prompt, routes[], response_mode bruto|razonada. |
| claix.agents.edit | Edit a Retrieve agent (PUT /agents/edit/{agent_id}). Same body as create + agent_id. |
| claix.agents.pause | Pause or activate an agent (POST /agents/pause/{agent_id}). Body { status: paused|active }. |
7. Workflow prompts
The server exposes reusable prompts via prompts/list:
| Prompt | Description |
|---|---|
| workflow.discover-and-extract | Discover schemas via claix.schemas.list and extract JSON with claix.extract.*. |
| workflow.agent-document-analysis | Run claix.agent.* when the schema has is_agent_mode enabled. |
| workflow.invoice-pdf | Invoice PDF workflow using claix.extract.pdf. |
| workflow.markdown-save | Convert to Markdown with claix.markdown.* and optionally persist with save=true (row_id). |
| workflow.multi-document-ask | Ask typed questions across several files with claix.multi_document.ask (no knowledge spaces). |
| workflow.retrieve-ask | Query a Retrieve agent with claix.retrieve.ask after configuring routes and agents. |
8. Resources
Documentation resources available with resources/list:
| URI | Description |
|---|---|
| claix://docs/mcp | MCP connection guide and tool catalog. |
| claix://docs/openapi | Claix OpenAPI specification URL. |
| claix://docs/tools | JSON catalog of all MCP tools. |
9. Smithery example
One-click install:
npx -y @smithery/cli run info-f4xz/claix
Manual config:
{
"mcpUrl": "https://claix.dev/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
Directory: smithery.ai/server/info-f4xz/claix
10. Cursor example
Add to Cursor MCP settings (Settings → MCP):
{
"mcpServers": {
"claix": {
"url": "https://claix.dev/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}
11. Claude Desktop example
{
"mcpServers": {
"claix": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://claix.dev/mcp",
"--header",
"x-api-key:YOUR_API_KEY"
]
}
}
}
12. n8n and automation
In n8n use an HTTP Request node with POST https://claix.dev/mcp, JSON-RPC headers, and body {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"claix.extract.pdf","arguments":{"schema_id":"…","file_base64":"…"}}}. Also try claix.markdown.pdf, claix.multi_document.ask, or claix.retrieve.ask. Community MCP nodes work too: point the base URL at Claix and pass x-api-key.