Documentation

MCP server & agentic apps

DataTap ships a Model Context Protocol (MCP) server so AI agents can operate the platform in natural language — connect Microsoft 365 sources, run collectors, search everything that has been collected or archived, restore items, and monitor jobs. It is a thin layer over the same DataTap API: every tool maps onto a documented endpoint, so an agent gets exactly the surface a normal integration has.

Preview. The MCP server is under active development. The tool catalogue and transports below are current but still evolving — treat tool names and signatures as subject to change until a tagged release.

Why build agents on DataTap

The hard parts of Microsoft 365 data — certificate-based app-only auth, per-tenant provisioning, the reactive collection pipeline, and a searchable index over collected content — are already solved and operated for you. The MCP server surfaces those capabilities as tools an LLM can call, so “collect the last quarter of the finance mailbox and show me the top senders” becomes a sequence of tool calls rather than a custom Graph integration. See the technical build-vs-buy case for the engineering argument.

Authentication

The MCP server authenticates with a tenant-scoped API key that carries the mcp feature scope. An admin mints one:

POST /api/authentication/generateApiKey
{ "scope": "Tenant", "tenantId": "<your-tenant-id>", "scopes": ["mcp"] }

On start-up the server calls GET /api/me and refuses to serve tools unless the key reports the mcp scope; that same response tells it which tenant it is bound to. The key travels as the X-API-KEY header on every call, exactly like any other integration — see Conventions → Authentication for how scopes work.

The tools

36 tools across six areas. Each maps to one or more DataTap endpoints; open the API reference for exact parameters and response shapes.

Search

Full-text + OData search over collected/archived email, files and Teams messages: search_content, search_content_advanced, count_content, get_item, list_searchable_fields, get_conversation_thread, get_channel_thread, find_related_items, search_attachments, and summarize_content (faceted aggregation — top senders, volume per year).

Collectors

Create, run, monitor and delete collection jobs: list_collectors, get_collector, create_email_collector, create_sharepoint_site_collector, create_files_collector, create_teams_collector, run_collector, stop_collector, get_collector_status, delete_collector, plus the one-call composites collect_email, collect_sharepoint_site and collect_files.

Connections

Manage sources and destinations: list_connections, connect_source (Exchange / OneDrive / SharePoint / Teams), connect_destination (Blob — uses the tenant's provisioned storage, no credentials), and disconnect_connection.

Discovery

Browse a source before collecting: discover_users, discover_groups, browse_source_items, and preview_item (EML or JSON).

Restore & monitoring

create_restore_job restores a collection back to Microsoft 365. list_running_collectors, get_running_collector_accounts, list_collector_reports and get_collector_report_accounts track running and completed work down to per-account detail.

Sample workflows

End-to-end examples showing how an AI agent composes MCP tools into complete workflows. Each uses the DataTap-hosted Enron corpus as concrete demonstration data.

Selective OneDrive folder backup

Discover drive owners, browse folder trees, create a scoped collector, run it, and inspect collected files — step by step using the Enron corpus.

Read the walkthrough →

Who talked to the outside world?

Use faceted aggregation and advanced search to find which mailboxes sent email to external addresses — no code beyond the agent's own filtering.

Read the walkthrough →

Top external recipient by email volume

Aggregate recipient arrays across all mailboxes to find the single external address that received the most email, then verify the winner with one compound index filter.

Read the walkthrough →

List files in a OneDrive folder

Browse the folder tree to resolve a folder name to its index ID, then query the index by that ID — optionally filtered to a specific file type by MIME type.

Read the walkthrough →

Top conversation pairs

Find which users exchanged the most email with each other across all collected mailboxes, then pull and summarize each conversation — no custom code needed.

Read the walkthrough →

Quarterly capacity review

Report total bytes collected per connector, rank accounts by size, and cross-check the dashboard against the search index.

Read the walkthrough →

Audit the collection estate

Enumerate every collector, inspect how each is scoped, and check what is running right now — without mutating anything.

Read the walkthrough →

Export a message for legal hold

Find a message in the search index, resolve it to its archived copy, and export it as JSON or RFC822 (.eml) for a legal matter.

Read the walkthrough →

Onboard a custodian to legal hold

Scope a collector to one custodian's mailbox, run it, and file the per-account completion report as evidence.

Read the walkthrough →

Connect a client

The server offers two transports. Use stdio for a local client (Claude Desktop, Cursor) and the hosted HTTP endpoint for remote/shared access.

Local (stdio)

Build DataTapMcp.Stdio and point your client at it. The API key is supplied once via DATATAP_API_KEY. Example Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "datatap": {
      "command": "dotnet",
      "args": ["/abs/path/DataTapMcp.Stdio/bin/Release/net10.0/DataTapMcp.Stdio.dll"],
      "env": {
        "DATATAP_API_KEY": "<your-mcp-scoped-key>",
        "DATATAP_API_URL": "https://datatap-api.azurewebsites.net"
      }
    }
  }
}

Cursor (.cursor/mcp.json) uses the same command / args / env shape.

Hosted (HTTP)

A managed Streamable-HTTP endpoint is available. Point an HTTP-capable MCP client at the production endpoint and send your mcp-scoped key as the X-API-KEY header; GET /health reports readiness.

  • https://datatap-mcp.azurewebsites.net

Open the API reference → · Back to docs →