MCP Server

Model Context Protocol

Connect Claix from Cursor, Claude, Smithery, n8n, Lovable and other MCP clients.

MCP Server

Claix as an MCP server

Endpoint

MCPhttps://claix.dev/mcp

Claix 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

ModeTypical useHow to connect
Streamable HTTPSmithery, Cursor, modern clientsPOST /mcp with JSON-RPC (initialize, tools/list, tools/call). Header Accept: application/json, text/event-stream
Legacy SSEClaude Desktop, mcp-remoteGET /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

  1. Call claix.schemas.list to get schema_id, type, and whether Agent mode is enabled.
  2. Use claix.extract.* for structured extraction or claix.agent.* when is_agent_mode=true.
  3. Send the file as file_base64 (Base64 or data URL). The server rebuilds multipart requests to the Claix REST API.
  4. Read the response in structuredContent.data (typed JSON) or the text in content.
  5. If the schema has context window enabled and extraction returns a document_id, keep that UUID — it references the document persisted in Claix memory.
  6. With document_id, use claix.window_context.get to read raw content, claix.window_context.ask for natural-language questions, or claix.document.delete to 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.

ToolREST APIArgumentsResponse
claix.window_context.getGET /get-document/{document_id}document_id (UUID)document_id, file_name, schema_id, processed_at, content
claix.window_context.askPOST /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.deleteDELETE /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):

ToolDescription
claix.schemas.listLists account schemas (id, name, type, is_agent_mode, agent_definition). Call first to discover schema_id.
claix.schemas.createCreates a schema (POST /api/create-schema): name, type, schema_definition; optional Agent mode, window_context, and source verification.
claix.schemas.deleteDeletes an account schema (POST /api/delete-schema) by schema_id.
claix.extract.excelExcel/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.pdfPDF → 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.docDocument (.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.imageImage (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.textText/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.audioAudio (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_excelJSON → Excel .xlsx (POST /api/json-excel). Returns file_base64.
claix.agent.excelExcel/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.pdfPDF + 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.docDocument + 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.imageImage + 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.textText/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.audioAudio + 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.getRaw 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.askAsk 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.createCreate 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_documentAssign 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_documentClear a document's space_id. Proxies DELETE /remove-document-from-space/{document_id}. Args: document_id. Free call.
claix.spaces.deleteDelete a knowledge space. Proxies DELETE /delete-space/{space_id}. No body. Args: space_id. Response { space_id }. Irreversible. destructiveHint. Free call.
claix.space_context.askAsk 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.deleteDelete a persisted document. Proxies DELETE /delete-document/{document_id}. No body. Args: document_id. Response { document_id }. Irreversible. destructiveHint. Free call.
claix.document.replaceReplace 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:

PromptDescription
workflow.discover-and-extractDiscover schemas via claix.schemas.list and extract JSON with claix.extract.*.
workflow.agent-document-analysisRun claix.agent.* when the schema has is_agent_mode enabled.
workflow.invoice-pdfInvoice PDF workflow using claix.extract.pdf.
workflow.window-context-askAsk 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-askCreate 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:

URIDescription
claix://docs/mcpMCP connection guide and tool catalog.
claix://docs/openapiClaix OpenAPI specification URL.
claix://docs/toolsJSON 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.

Request examples

# Instalar vía Smithery
npx -y @smithery/cli run info-f4xz/claix

# Inicializar sesión MCP (Streamable HTTP)
curl -X POST "https://claix.dev/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"client","version":"1.0"}}}'

# Listar tools (nombres claix.* con outputSchema y annotations)
curl -X POST "https://claix.dev/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

# Llamar claix.schemas.list
curl -X POST "https://claix.dev/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"claix.schemas.list","arguments":{}}}'