Plugins and commands
One install per editor. All three run the same server, against the same API, with the same 25 tools and the same guidance. The only thing that differs is where the configuration lives.
Installation is this page. What each tool does is the MCP server page; why the shipped rules are the safety mechanism is agent guidance. The endpoints behind the tools are documented in parsing, extraction and knowledge bases and search.
Two things are needed in every case: the server, and an API key in the environment the editor launches it in. Most failed installs are the second one.
Claude Code
Two commands. The plugin brings the server, the guidance and the tools together — there is no separate download and no version to pin.
Code
Code
The plugin declares the server like this, and you do not need to write it yourself:
Code
Two things follow from that config. It runs on node, not bun — Claude Code
users already have node, and requiring bun would be a new install. And
DOCAI_API_KEY is read from the environment rather than stored in the plugin,
so the key never ends up in a config file:
Code
Put that in your shell profile, not just in one terminal. The server inherits the environment Claude Code was launched from, so a key exported in a different window does not reach it.
To register the two permanent-delete tools, which are hidden by default:
Code
Cursor
Add to .cursor/mcp.json in your project, or the global equivalent:
Code
${DOCAI_API_KEY} is expanded from your environment, so the file stays safe to
commit. Writing the literal key there instead makes the file organization-root
access — see security.
Cursor also reads project rules, and the server ships one. Copy the DocAI
guidance into .cursor/rules/docai.mdc:
Code
The body is the same four rules as everywhere else — see agent
guidance for the full text and the reasoning. alwaysApply: false
means Cursor loads it when the description matches the work, rather than
carrying it in every prompt.
Codex
Add to ~/.codex/config.toml:
Code
Codex takes the key literally in the table, so this file holds a real credential. Keep it out of any repository, and treat it as production access to the whole organization.
For the guidance, put the same four rules under a # DocAI heading in your
AGENTS.md.
On-prem
Every install above talks to https://api.providus.ai by default. Point it at
your own deployment with one more variable:
Code
Or in the editor's own config, alongside the key:
Code
Trailing slashes are stripped, so both forms of the URL work. Nothing else
differs: the tools, the guidance and the /v1 surface are identical.
Check it worked
Three checks, cheapest first.
Read the startup line. The server writes one diagnostic to stderr, which your editor shows in its MCP log:
Code
That single line answers three questions at once — the server started, which API it is pointed at, and whether the destructive gate is open. Twenty-one tools means the gate is closed, 23 means it is open.
Ask for the knowledge bases. Ask the agent to list them. It should call
docai_list_knowledge_bases and come back with names, not an apology.
Ask for an index. Ask it about a knowledge base by name. A correctly
configured agent goes to docai_kb_index rather than listing files and
fetching each one. If it crawls file by file, the guidance is not loaded — the
server is fine, but the rules are not reaching the model.
When it does not work
No DocAI tools at all, and the log says the key is required. The server exits at startup with:
Code
The key is missing from the environment the editor launched the server in,
which is not the same as your shell. Editors started from a Dock icon or a
Start menu shortcut do not read your shell profile. Either put the key in the
editor's own env block, or start the editor from a terminal that has it.
No DocAI tools and no error at all, on Windows. The Claude Code plugin
config uses commandWindows with the PowerShell expansion form
"$env:CLAUDE_PLUGIN_ROOT\server\index.js". If that string reaches something
other than PowerShell, the variable is not expanded, node is handed a literal
path that does not exist, and the server never starts. It fails quietly,
because a server that never connected has no tools to report as missing. Check
the MCP log for a node error about a path containing $env:.
Permanent deletes are missing. Expected, unless
DOCAI_MCP_ALLOW_DESTRUCTIVE is set to true, 1 or yes. The two tools are
skipped at registration, so they are absent from the list rather than present
and refusing. Set the flag in the same environment the server is launched in —
the editor's env block is the reliable place — and restart the editor. The
startup line changes from 20 tools to 22 once it has taken.
npx cannot fetch the server. The Cursor and Codex configs install from
GitHub at launch. On a machine with no route to github.com, npx fails and
nothing starts. Use the Claude Code plugin, which ships the bundle, or vendor
the built dist/index.js locally and point command/args at it.
Every tool call returns an authentication error, but the server started.
The key is present but not valid for that host. The usual cause is a cloud key
against an on-prem DOCAI_BASE_URL, or the reverse. Keys are per-deployment.
The agent asks to delete something you did not mention. Stop and check which key is configured. An API key is organization-root, so an agent working in one project can reach every knowledge base the organization has. See security.

