The STP.Documents MCP server makes document-related functionality available as tools to AI agents. It is available at https://common.stp-cloud.de/documents3/bot/mcp and supports stateless Streamable HTTP.
Authorization
The STP.Documents MCP server is an STP.Identity protected resource. Unfortunately STP.Identity does not support Client ID Metadata Documents or Dynamic Client Registration, so every MCP host using the STP.Documents MCP server needs an STP.Identity client registration (just like for the Universal API).
The Documents MCP server requires the license lexdmsmcp,
license module documents3-mcp, permission
documents3-mcp, scope doc3.mcp3 or role
Documents3.McpUser. There is no default group for this role
available, so it has to be created manually.
The doc3.mcp3 scope is intended to be used with spec
compliant OAuth authorization, which requires the use of the MCP
server’s resource indicator during token acquisition. That limits the
token’s scopes to only scopes dedicated to the STP.Documents MCP server.
When the STP.Documents MCP Server receives this sole scope, it uses
token exhange internally to get another accesstoken to invoke downstream
STP.Documents APIs on behalf of the user.
Example code can be found at STP.Documents.Example.
Tools
It provides the following tools:
stp_doc_get_current_user
Get information about the current user.
stp_doc_search_contexts
Find matters or other contexts. Loading happens via the Universal API.
stp_doc_list_documents
List documents of a matter (Akte) or other context. Loading happens via the Universal API.
stp_doc_search_documents
Find documents whose contents is semantically similar to the query string. This requires all findable documents to have been indexed. Loading happens via the Universal API.
stp_doc_get_document_metadata
Get document metadata like contexts, matters, or named values. This includes the same metadata available via the Universal API.
stp_doc_read_document
Get the textual content of the document. The fulltext rendition
(stp.doc.fulltext.txt) is ready by default. If there is no
fulltext rendition but the document ContentType is either
text/plain, text/markdown,
text/xml, application/xml, or
application/json, the original rendition is read. If the
original rendition is application/pdf, it extracts the text
layer on-demand. If the original is any other type, it loads the preview
rendition (which is always PDF) and extracts the text layer
on-demand.
Loading happens via the Universal API.
stp_doc_create_document
Create a new document with text content (extension
.txt). Access happens via the Universal
API.
stp_doconprem_list_tasks
List all my open tasks (on-premise). Loading happens via unencrypted requests through Channel.OnPremise.
stp_doconprem_complete_task
Complete a single task or task list step (on-premise). Access happens via unencrypted requests through Channel.OnPremise.
stp_doconprem_search_containers
Find on-premises stored matters (Akten) or other containers. Loading happens via unencrypted requests through Channel.OnPremise.
stp_doconprem_list_documents
List on-premises stored documents of a matter (Akte) or other on-premise container. Loading happens via the Channel.OnPremise. Loading happens via unencrypted requests through Channel.OnPremise.
stp_doconprem_read_document
Get the textual content of the on-premises stored document. It always loads in PDF format and extracts the text layer on-demand. Loading happens via the Channel.OnPremise. Loading happens via unencrypted requests through Channel.OnPremise.
Resources
It provides the following resources:
stpdocuments://contexts/{contextReference}
Get the documents list of the context reference.
stpdocuments://documents/{documentId}/fulltext
Get the fulltext rendition of the document.
stpdocuments://documents/{documentId}/preview
Get the preview rendition of the document.
stpdocuments://documents/{documentId}/original
Get the original rendition of the document.
Related to