MCP Protocol in Athento
The MCP (Model Context Protocol) integration in Athento allows ChatGPT to interact directly with an Athento instance through tools exposed as structured APIs.
With this connection, ChatGPT can:
- Search documents
- Get document information
- Create documents
- Read the text of documents
- Update fields and change the lifecycle state
- Query queues and knowledge bases
Create OAuth application
To configure Athento OAuth authentication for ChatGPT, you must first create an OAuth application in Django OAuth Toolkit. To do so, access the Django administration and go to Django OAuth Toolkit → Applications. Once inside, click Add Application to create a new OAuth application.
Configure the following parameters:
- Name:
ChatGPT Athento - Client type:
Confidential - Authorization grant type:
Authorization code - Redirect URIs: callback generated by ChatGPT
- Skip authorization: disabled
The OAuth callback is obtained from ChatGPT when creating the application. ChatGPT generates a unique callback for each connector created. For example:
https://chatgpt.com/connector/oauth/NZob0tDhtvg_
That value must be copied exactly into the Redirect URIs field in Django OAuth Toolkit.
Once you save the application, Django OAuth Toolkit will automatically generate:
Client IDClient Secret
Save both values because they will be needed later in the ChatGPT configuration.
Your Athento instance must expose the standard OAuth endpoints of Django OAuth Toolkit.
Authorization URL:
https://TU_DOMINIO/o/authorize/
Token URL:
https://TU_DOMINIO/o/token/
Create app in ChatGPT
Once the OAuth application has been created in Django OAuth Toolkit, go into ChatGPT and access:
Configuration → Applications
Click Create application.
During the creation of the application, ChatGPT will automatically generate the OAuth callback that you must later register in Django OAuth Toolkit.
Then select authentication via OAuth2 and configure the following parameters:
- Authorization URL:
https://TU_DOMINIO/o/authorize/ - Token URL:
https://TU_DOMINIO/o/token/ - Client ID: generated by Django OAuth Toolkit
- Client Secret: generated by Django OAuth Toolkit
In addition, you must configure the URL of the Athento MCP server:
- MCP Server URL:
https://TU_DOMINIO/mcp
Example:
https://TU_DOMINIO/mcp
Once the configuration is saved, click Connect. ChatGPT will automatically redirect to the Athento login using the configured OAuth flow. After authenticating and accepting permissions, ChatGPT will store the OAuth token and begin using the available MCP tools.
Functions available in ChatGPT
Once the Athento app is connected in ChatGPT, you can ask it in natural language to query, create, and update information in Athento. ChatGPT uses your user, so it can only see and modify what you can see and modify.
Available tools:
query_atql: search documents by name, space, form, author, date, or fields.get_document: view the record and fields of a document.get_document_content: read the text of a document.list_queue_documents: view the documents in a queue.search_knowledge_base: ask a knowledge base.get_lifecycle_states: check the current state of a document and which states it can move to.create_document: create a document with its fields.update_document: update a document’s fields.upload_html: save HTML content in a document.set_lifecycle_state: change the lifecycle state of a document.
See the details of each tool, its limits, and examples in the article Tools available in the Athento MCP.
Examples of use from ChatGPT:
Search for invoices in the Invoices space created this month
Give me information about document F-2025-035
Summarize the Acme contract and tell me when it expires
Move invoice F-2025-035 to Paid
What do I have pending in the Invoices to approve queue?