Connect an AI agent (MCP)
The dashboard also serves a Model Context Protocol endpoint at https://<webAppHostName>/mcp, so an agent (Claude, VS Code, Copilot Studio or any MCP client using Streamable HTTP) can query findings and documents.
What it offers
All tools are read-only. Values are redacted exactly as in the dashboard, and extracted document text is never returned.
| Tool | Returns |
|---|---|
overview | Totals: documents, open findings by severity and category, libraries, last scan |
search_findings | Findings, most severe first, filtered by status, category and severity (25 per page) |
get_finding | One finding with its redacted samples and triage history |
search_documents | Documents by file name, extraction status or AI sensitivity (25 per page) |
get_document | A document's metadata, AI summary and findings, and its SharePoint link |
scan_status | Each library's state and last scan's counts |
ask | A cited answer from the documents. Needs the Admin role and chat turned on |
Sign-in
The endpoint is behind the same Microsoft Entra sign-in as the dashboard. An agent sends an access token for your app registration, and the same roles apply as for people: anyone allowed to sign in can read, and ask needs Admin.
One-time setup on the app registration (see Set up the app registration):
- Expose an API. Set the Application ID URI to
api://<client id>, and add a scope nameduser_impersonation(who can consent: admins and users). - Under Authorized client applications, add the client you will get tokens with. For the Azure CLI, that is
04b07795-8ddb-461a-bbee-02f9e1bf7b46.
Then get a token as yourself and give it to the agent. For example, with the Azure CLI and Claude Code:
TOKEN=$(az account get-access-token --scope "api://<client id>/user_impersonation" --query accessToken -o tsv)
claude mcp add --transport http document-intelligence "https://<webAppHostName>/mcp" \
--header "Authorization: Bearer $TOKEN"
Tokens last about an hour, after which you fetch a new one. The endpoint doesn't yet support MCP's OAuth discovery, so clients that can only sign in through it, such as Claude's web connectors, can't connect yet.