Connect with MCP
Point Claude Desktop, Cursor, or any MCP client at your documents using the MCP server docAnalyzer publishes.
docAnalyzer publishes a ready-to-run MCP server. You don't need to write one. It exposes each REST API operation as an MCP tool and forwards tool calls to the API using your API key, so an MCP client can list your documents, upload new ones, and chat with them.
Two files are published next to the API reference:
| File | What it is |
|---|---|
mcp-server.mjs |
A runnable MCP server using the stdio transport. This is the file your client launches. |
mcp.json |
A manifest describing the tools and the auth shape. Useful for inspection or for generating your own client. |
mcp.json is a manifest, not a server address. Putting its URL in the url field of a client config won't work, because nothing at that address speaks MCP. docAnalyzer doesn't host a remote MCP endpoint today; the server runs on your machine as a local process and talks to the API over HTTPS.
Before you start
- A paid plan. API access isn't available on Community.
- An API key. See Create and manage API keys.
- Node.js 18 or newer.
Set up
-
1
Download the server into a directory of your choice:
curl -O https://docanalyzer.ai/docs/api-reference/mcp-server.mjs -
2
Install the MCP SDK in that same directory:
npm i @modelcontextprotocol/sdk -
3
Register the server with your MCP client. Most clients (Claude Desktop, Cursor, and others) use a config file with this shape:
{ "mcpServers": { "docanalyzer": { "command": "node", "args": ["/absolute/path/to/mcp-server.mjs"], "env": { "API_TOKEN": "your-api-key" } } } }Use an absolute path. Clients don't launch the server from the directory you downloaded it into.
-
4
Restart the client, then confirm the docAnalyzer tools appear in its tool list.
Environment variables
| Variable | Required | Purpose |
|---|---|---|
API_TOKEN |
Yes | Your API key. Sent as Authorization: Bearer <key> on every call. |
API_BASE_URL |
No | Overrides the API base. Defaults to https://api.docanalyzer.ai/api/v1. |
Keep the key in the client's env block or your operating system's keychain. Don't paste it into mcp-server.mjs.
Available tools
The tools are generated from the API reference, one per operation, so the list tracks the API:
| Tool | Does |
|---|---|
get_doc |
List all documents in a workspace |
post_doc |
Create a document from a URL |
post_doc_upload_options |
Upload documents |
get_doc_docid |
Get document information |
put_doc_docid |
Update a document |
delete_doc_docid |
Delete a document |
get_doc_docid_link |
Get a link to a document |
post_doc_docid_chat |
Chat with a document |
post_doc_docid_ocr |
Run OCR on a document |
get_label, post_label, get_label_labelid, put_label_labelid, delete_label_labelid |
Manage labels |
post_label_labelid_upload_options |
Upload documents into a label |
post_label_labelid_chat |
Chat with every document in a label |
get_models, get_models_options |
List available models |
get_credits |
Read credit usage for the key |
Chat tools start a new conversation thread on each call. To continue a conversation, capture the tid from the response and pass it back as tid. Only one chat can be in flight per tid; a concurrent call on the same tid returns 423.
The server covers the v1 API. Agentic Workflows (v2) aren't exposed as MCP tools; call that API directly.
Quotas and credits
Tool calls are ordinary API calls. They count against the same uploads, storage, interaction, and credit limits as the app, and chat tools spend credits the same way a chat in the app does. See Plans and credits.
Other agent files
The same directory publishes two plain-text descriptions of the API for agents that read documentation rather than call tools:
llms.txt: a compact index of the API.llms-full.txt: the full reference in one file.
What's next
- API reference: endpoints, parameters, and schemas.
- API guide: quick start and walkthroughs.
- Create and manage API keys: create, rotate, and revoke keys.