MCP Server
Claix as an MCP server
Endpoint
https://claix.dev/mcpClaix exposes a Model Context Protocol (MCP) server (version 1.11.0, 23 tools) so AI assistants and automation tools can run extraction, Agent mode, context window, knowledge spaces, and persisted document management without hand-written REST integrations.
The public server URL is https://claix.dev/mcp. Authentication uses your Claix API key in the x-api-key header (or the optional api_key argument per tool when headers are not supported).
Tools use dot notation naming (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 options in production and development:
- 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…) typically use JSON config with the server URL and headers. Smithery and Streamable HTTP clients send JSON-RPC directly to POST /mcp. Claude Desktop usually 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 users enter their key when connecting. The API key is optional in the config schema when the client already sends x-api-key.
Per-tool fallback: many tools accept api_key in arguments when 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 |
| Legacy SSE | 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 auto-detects the request type.
Static metadata for scanning (Smithery, clients): https://claix.dev/.well-known/mcp/server-card.json
4. Recommended workflow
- Call
claix.schemas.listto getschema_id, type, and whether Agent mode is enabled. - Use
claix.extract.*for structured extraction orclaix.agent.*whenis_agent_mode=true. - Send the file as
file_base64(Base64 or data URL). The server rebuilds multipart requests to the Claix REST API. - Read the response in
structuredContent.data(typed JSON) or the text incontent. - If the schema has context window enabled and extraction returns a
document_id, keep that UUID — it references the document persisted in Claix memory. - With
document_id, useclaix.window_context.getto read raw content,claix.window_context.askfor natural-language questions, orclaix.document.deleteto remove the document when you no longer need it.
5. Context window and documents
When a schema has context window enabled, Claix persists the processed document and returns a document_id in the extraction response. The three tools below are direct proxies to the context window and delete REST APIs; they do not consume extraction credits.
| Tool | REST API | Arguments | Response |
|---|---|---|---|
| claix.window_context.get | GET /get-document/{document_id} | document_id (UUID) | document_id, file_name, schema_id, processed_at, content |
| claix.window_context.ask | POST /document-context/{document_id} | document_id, questions[{ question, format }] (max 5; format: string|int|boolean|timestamp|array) | user_ask, typed ia_response, log_id (with source verification: {value, source}) |
| claix.document.delete | DELETE /delete-document/{document_id} | document_id (UUID) | { document_id } — irreversible, destructiveHint |
Common errors in structuredContent.error: 401 (invalid API key), 404 (document not found or not owned by your account), 400 (invalid parameters). Delete accepts only DELETE with no body.
Related workflow prompt: workflow.window-context-ask (via prompts/get).
6. Available tools
After connecting, call tools/list for all 23 tools with inputSchema, outputSchema, and annotations (including destructiveHint on claix.document.delete):
| Tool | Description |
|---|---|
| claix.schemas.list | Lists account schemas (id, name, type, is_agent_mode, agent_definition). Call first to discover schema_id. |
| claix.schemas.create | Creates a schema (POST /api/create-schema): name, type, schema_definition; optional Agent mode, window_context, and source verification. |
| 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 only. Accepts optional space_id. Returns log_id. If source verification is enabled on the schema, each field is {value, source}. |
| claix.extract.pdf | PDF → typed JSON (POST /api/pdf-json). Text or scanned, max 15 MB. Accepts optional space_id. Returns log_id. If source verification is enabled on the schema, each field is {value, source}. |
| claix.extract.doc | Document (.docx, .txt, .md, .rtf) → JSON (POST /api/doc-json). Accepts optional space_id. Returns log_id. If source verification is enabled on the schema, each field is {value, source}. |
| claix.extract.image | Image (JPEG, PNG, WebP, HEIC) → JSON (POST /api/img-json). Accepts optional space_id. Returns log_id. If source verification is enabled on the schema, each field is {value, source}. |
| claix.extract.text | Text/HTML/XML → JSON (POST /api/txt-json). content field, no file upload. Accepts optional space_id. Returns log_id. If source verification is enabled on the schema, each field is {value, source}. |
| claix.extract.audio | Audio (MP3, WAV, M4A, OGG; max 12 MB / 10 min) → JSON (POST /api/audio-json). Accepts optional space_id. Returns log_id. If source verification is enabled, each field is {value, source} and source cites the second or second range. |
| 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). Accepts optional space_id. If source verification is enabled on the schema, fields are {value, source}. |
| claix.agent.pdf | PDF + Agent mode → data[], agent_data, and log_id (POST /agent/pdf-json). Accepts optional space_id. If source verification is enabled on the schema, fields are {value, source}. |
| claix.agent.doc | Document + Agent mode (POST /agent/doc-json). Accepts optional space_id. Returns data[], agent_data, and log_id. If source verification is enabled on the schema, fields are {value, source}. |
| claix.agent.image | Image + Agent mode (POST /agent/img-json). Accepts optional space_id. Returns data[], agent_data, and log_id. If source verification is enabled on the schema, fields are {value, source}. |
| claix.agent.text | Text/HTML/XML + Agent mode (POST /agent/txt-json). Accepts optional space_id. Returns data[], agent_data, and log_id. If source verification is enabled on the schema, fields are {value, source}. |
| claix.agent.audio | Audio + Agent mode (POST /agent/audio-json). Accepts optional space_id. Returns data[], agent_data, and log_id. If source verification is enabled, fields are {value, source} and source cites the second or second range. |
| claix.window_context.get | Raw content and metadata from a persisted document. Proxies GET /get-document/{document_id}. Args: document_id (UUID). Returns success, document_id, file_name, schema_id, processed_at, and content. Free call. |
| claix.window_context.ask | Ask typed questions about a persisted document. Proxies POST /document-context/{document_id}. Args: document_id and questions (array of { question, format }, max 5; format: string|int|boolean|timestamp|array; question ≤400 chars). Returns user_ask, typed ia_response, and log_id. If source verification is enabled on document queries, each ia_response item is {value, source}. |
| claix.spaces.create | Create a knowledge space to group documents. Proxies POST /create-space. Only argument: name (max 200 chars). Returns space_id, name, and created_at. Free call. |
| claix.spaces.add_document | Assign a space_id to a document that has none yet. Proxies POST /add-space. Args: document_id and space_id. Fails if the document already has a space. Free call. |
| claix.spaces.remove_document | Clear a document's space_id. Proxies DELETE /remove-document-from-space/{document_id}. Args: document_id. Free call. |
| claix.spaces.delete | Delete a knowledge space. Proxies DELETE /delete-space/{space_id}. No body. Args: space_id. Response { space_id }. Irreversible. destructiveHint. Free call. |
| claix.space_context.ask | Ask typed questions across every document in a knowledge space. Proxies POST /space-context/{space_id}. Args: space_id and questions (array of { question, format }, max 5; format: string|int|boolean|timestamp|array). Same typed input and output as claix.window_context.ask: user_ask, ia_response, and log_id. If source verification is enabled on knowledge space queries, each ia_response item is {value, source}. |
| claix.document.delete | Delete a persisted document. Proxies DELETE /delete-document/{document_id}. No body. Args: document_id. Response { document_id }. Irreversible. destructiveHint. Free call. |
| claix.document.replace | Replace a document's content with another's and delete the source. Proxies POST /replace-document. Args: document_id and new_content_document_id. Returns swap_id, version, and swaps_count. Free call. |
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.window-context-ask | Ask a persisted document_id with claix.window_context.ask (you can also read with claix.window_context.get or delete with claix.document.delete). |
| workflow.space-context-ask | Create the space with claix.spaces.create, group documents on extraction, and ask them all with claix.space_context.ask to cross-reference, compare, or add up data spread over several documents. |
8. Resources
Documentation resources available via 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 configuration:
{
"mcpUrl": "https://claix.dev/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}Directory listing: 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":"…"}}}. For context window, set name to claix.window_context.get, claix.window_context.ask, or claix.document.delete with document_id in arguments. Community MCP nodes also work — point the base URL to Claix and pass x-api-key.