Model Context Protocol server for the DocAuto document-generation API.
Project description
DocAuto MCP server
A Model Context Protocol server that exposes
the DocAuto document-generation workflow to AI assistants. It is a thin client
over the public /api/v1 surface — it holds no secrets and enforces no
business logic; multi-tenancy and validation live in the backend.
- Transport: stdio (local) and a hosted Streamable-HTTP server at
https://mcp.docauto.com.br/mcp(add it as a remote connector — no install). - Auth (local): OAuth 2.0 Device Authorization Grant against the Keycloak
docauto-clipublic client. You sign in once in your browser; tokens are cached at~/.docauto/mcp-tokens.json(0600) and refreshed automatically.
Install
The server is a standalone Python package (it is not part of the backend). Requires Python ≥ 3.11.
# run on demand, no install:
uvx docauto-mcp
# or install it:
pipx install docauto-mcp
From a checkout (dev): pip install ./mcp.
Configure your MCP client
Claude Desktop — automatic
The package ships a setup helper that writes claude_desktop_config.json for
you (handling the Windows Store/MSIX config-path quirk):
docauto-mcp-install # register the installed `docauto-mcp` command
docauto-mcp-install --command uvx # zero-install: run via `uvx docauto-mcp`
docauto-mcp-install --print # print the JSON block instead of writing it
Claude Desktop — manual
{
"mcpServers": {
"docauto": {
"command": "docauto-mcp"
}
}
}
If docauto-mcp is not on your PATH, use the uvx form
("command": "uvx", "args": ["docauto-mcp"]) or point command at the script
inside your virtualenv.
Claude Code (CLI)
claude mcp add docauto -- uvx docauto-mcp
Cursor / VS Code / other clients
These accept a remote MCP server by URL — see the hosted server below
(https://mcp.docauto.com.br/mcp), which needs no local install.
Environment overrides (optional)
Defaults target production; override only for local dev:
| Variable | Default |
|---|---|
DOCAUTO_MCP_ISSUER |
https://auth.docauto.com.br/realms/docauto |
DOCAUTO_MCP_API_BASE |
https://api.docauto.com.br (server-to-server; set to the internal service in-cluster) |
DOCAUTO_MCP_PUBLIC_API_BASE |
https://api.docauto.com.br (public base for user-facing links, e.g. signed download URLs) |
DOCAUTO_MCP_PUBLIC_APP_BASE |
https://docauto.com.br (public frontend base for the upload page link) |
DOCAUTO_MCP_CLIENT_ID |
docauto-cli |
DOCAUTO_MCP_HOME |
~/.docauto (token cache location) |
Logging in
You sign in with your normal DocAuto account (the MCP server does not create a different kind of account):
- Call
login_start— it returns a verification URL and a short code. - Open the URL, sign in (email/password or Google), and approve.
- Call
login_finish— it completes the login and caches your tokens.
After that the assistant can use the tools below; tokens refresh silently until the session expires.
Prompts
generate_documents(argument:output_format=pdf|docx) — a guided template that drives the whole batch-generation flow. Available in any client that surfaces MCP prompts, over both transports.
Tools
- Session:
login_start,login_finish,logout,whoami,doctor,workflow_guide—doctorreports the version, the configured endpoints, API reachability, and sign-in state (no secrets) - Templates:
list_templates,get_template,upload_template,delete_template - Datasets:
list_datasets,get_dataset,preview_dataset,upload_dataset,delete_dataset - Generation:
validate_mapping,create_generation_job,get_job,list_jobs,cancel_job,delete_job,list_job_documents - Downloads:
download_document,download_job_zip— over stdio these save to the user's local Downloads folder; over the hosted HTTP transportdownload_job_zipreturns a short-lived signed URL the user opens in a browser (the ZIP is never streamed through the model, so there is no size cap) - Uploads (hosted HTTP only): over stdio
upload_template/upload_datasetread a local path; over the hosted transport they take only afilenameand return anupload_urlthe user opens to send the file (the bytes never pass through the model), plus anupload_refto poll withcheck_uploaduntil the result isready
Typical flow
login_start → login_finish → whoami → upload_template(path) →
upload_dataset(path) → validate_mapping(...) →
create_generation_job(...) → poll get_job(job_id) →
download_job_zip(job_id, dest).
The field_mapping maps each template variable to a dataset column, e.g.
{"nome_cliente": "nome_cliente", "cpf": "cpf"}. output_format is pdf
(default) or docx.
Development
# unit tests (no MCP SDK needed — auth/client/tools are isolated)
python -m pytest tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docauto_mcp-0.2.0.tar.gz.
File metadata
- Download URL: docauto_mcp-0.2.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ebd351dcd9bf270a188334535645e9a85b9c4d6c43b98157c689e695cdf3e96
|
|
| MD5 |
f3af7630ac15c1c38e702961976a7162
|
|
| BLAKE2b-256 |
690098b0acab868640abfb8fd0806ff90564c69809d333928aa2167a7033974e
|
Provenance
The following attestation bundles were made for docauto_mcp-0.2.0.tar.gz:
Publisher:
publish-mcp.yml on gzucob/docauto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docauto_mcp-0.2.0.tar.gz -
Subject digest:
3ebd351dcd9bf270a188334535645e9a85b9c4d6c43b98157c689e695cdf3e96 - Sigstore transparency entry: 1740587790
- Sigstore integration time:
-
Permalink:
gzucob/docauto@257e429686585413979d9a839b505ccbbf50c28d -
Branch / Tag:
refs/tags/mcp-v0.2.0 - Owner: https://github.com/gzucob
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@257e429686585413979d9a839b505ccbbf50c28d -
Trigger Event:
push
-
Statement type:
File details
Details for the file docauto_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: docauto_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f27a900d4f1b72728beb856316367a994286361b2158dbe6bee4783b8af5331
|
|
| MD5 |
45bb1c2c131f42ee1df24c6fdc57bc60
|
|
| BLAKE2b-256 |
778b5fcc28cb9ce71c105b20725c603e5c28e757474fe39645f12da980605f8e
|
Provenance
The following attestation bundles were made for docauto_mcp-0.2.0-py3-none-any.whl:
Publisher:
publish-mcp.yml on gzucob/docauto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docauto_mcp-0.2.0-py3-none-any.whl -
Subject digest:
9f27a900d4f1b72728beb856316367a994286361b2158dbe6bee4783b8af5331 - Sigstore transparency entry: 1740587806
- Sigstore integration time:
-
Permalink:
gzucob/docauto@257e429686585413979d9a839b505ccbbf50c28d -
Branch / Tag:
refs/tags/mcp-v0.2.0 - Owner: https://github.com/gzucob
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@257e429686585413979d9a839b505ccbbf50c28d -
Trigger Event:
push
-
Statement type: