AI assistants (MCP)
Kagaz has a built-in Model Context Protocol server. Connect Claude, or any app that supports MCP, and ask about your documents in plain language.
- "Which of our documents expire in the next three months?"
- "Is Meera's driving licence still valid?"
- "Save the electricity bill attached to this email under the MG Road home, for November."
- "Show me Dad's Aadhaar so I can check the address."
Connect an assistant
- In Kagaz, open Settings › Account › AI assistants and press Connect an assistant.
- Name the key (for example "Claude on my laptop") and choose what it may do:
- Read only: search, details, expiry dates and files.
- Read and add documents: also create documents and upload new copies. Only editors and admins can make these keys. No key can delete anything.
- Copy the setup for your app. The key is shown once.
Claude Code
claude mcp add --transport http kagaz https://your-kagaz/api/mcp \
--header "Authorization: Bearer kgz_..."
Claude Desktop, Cursor and other apps
Apps that read an MCP settings file (such as mcp.json) take a remote server like this:
{
"mcpServers": {
"kagaz": {
"type": "http",
"url": "https://your-kagaz/api/mcp",
"headers": { "Authorization": "Bearer kgz_..." }
}
}
}
If your app only supports local (stdio) servers, bridge it with mcp-remote:
{
"mcpServers": {
"kagaz": {
"command": "npx",
"args": ["mcp-remote", "https://your-kagaz/api/mcp", "--header", "Authorization:Bearer kgz_..."]
}
}
}
Apps that only ask for a URL
Some apps, such as custom connectors on claude.ai, only accept a server address. Use the connector URL from the dialog, which has the key built in:
https://your-kagaz/api/mcp/k/kgz_...
Anyone with this URL can use the key, and URLs can end up in logs and browser history. Prefer the header setup where your app supports it, use a read-only key, and revoke it if the URL is ever shared.
Your Kagaz must be reachable from the internet for hosted apps like claude.ai. Apps running on your own computer, like Claude Code or Claude Desktop, can reach a Kagaz on your home network or Tailscale.
What assistants can do
| Tool | Key | What it does |
|---|---|---|
search_documents | Read | Finds documents by words in the title, person or category, with the current copy, expiry status and a link to open or print it. |
get_document | Read | All versions of a document, with dates, notes and files. The number is masked unless the assistant asks for it. |
expiring_documents | Read | Documents expired or expiring within a number of days (90 by default). |
list_people | Read | Family members and categories, with document counts. |
get_file | Read | A scan as an image, or a PDF, so the assistant can read it. |
create_document | Read and add | Creates a document for a person and category. |
add_version | Read and add | Uploads a new copy (JPEG, PNG or PDF), with dates or the bill month. It becomes the current copy and older ones stay in history. |
Printing stays in Kagaz: assistants give you the document's link, and you press Print there.
Privacy and safety
- Per-person keys. A key acts as the person who made it, with their current role. If an admin downgrades or disables someone, their keys follow immediately.
- Only a fingerprint is stored. Kagaz keeps a SHA-256 hash of each key, never the key itself.
- Masked numbers. Document numbers are masked unless the assistant explicitly asks for one, and each full-number request is logged.
- PDF passwords stay private. Remembered passwords are never sent over MCP. Locked PDFs are returned locked.
- No deleting. No tool can delete or overwrite documents, people or files.
- Everything is logged. Every tool call appears in Settings › Activity with the key's name.
- Revoke any time. Revoking a key in Settings › Account cuts access on the next request.
What you send to an AI assistant is handled by that assistant's provider under its own terms. Reading a document with get_file sends the scan to the model, so only connect assistants you are comfortable sharing those documents with.
Technical details
- Endpoint:
/api/mcpon your Kagaz address, using the Streamable HTTP transport in stateless mode (JSON responses, no server-sent events). - Protocol versions:
2025-11-25,2025-06-18,2025-03-26and2024-11-05. - Auth:
Authorization: Bearer kgz_..., or the key in the path (/api/mcp/k/kgz_...). Failed attempts are rate limited per IP address. Requests from browsers on other origins are rejected. - Files over 8 MB are not sent to assistants. On Cloudflare's free plan, keep uploads through
add_versionto a few MB each.