Skip to main content

Model Context Protocol server for Microsoft Purview

Project description

Purview MCP Server

FastMCP-based server that exposes Microsoft Purview data governance operations through the Model Context Protocol.

Full documentation: docs/purview-mcp-server.md


Quick Start

# stdio (default) — from repo root, venv active
$env:PURVIEW_ACCOUNT_NAME = "your-account"
python tools/PurviewMCPServer/server.py
# Streamable-HTTP
$env:PURVIEW_MCP_TRANSPORT = "streamable-http"
$env:PURVIEW_MCP_PORT      = "8000"
python tools/PurviewMCPServer/server.py
# endpoint: http://127.0.0.1:8000/mcp
# Azure Functions (func host)
cd tools/hosting/app && func start --port 7073
# endpoint: http://localhost:7073/api/mcp

Transport Protocols

Transport Env value VS Code mcp.json type Endpoint
stdio (default) stdio "command" process stdin/stdout
Streamable-HTTP streamable-http or http "http" /mcp (standalone) or /api/mcp (Azure Functions)
SSE (legacy) sse "sse" /sse (standalone only — not compatible with Azure Functions)

VS Code mcp.json

{
  "servers": {
    "purview-mcp-server-stdio": {
      "command": "./.venv/Scripts/python",
      "args": ["tools/PurviewMCPServer/server.py"],
      "env": { "PURVIEW_ACCOUNT_NAME": "your-account" }
    },
    "purview-mcp-server-http": {
      "type": "http",
      "url": "http://localhost:7073/api/mcp"
    }
  }
}

Environment Variables

Variable Required Default Description
PURVIEW_ACCOUNT_NAME Yes Purview account name (no suffix)
AZURE_TENANT_ID No Azure tenant GUID
AZURE_CLIENT_ID No Service principal client ID
AZURE_CLIENT_SECRET No Service principal secret
AZURE_REGION No public Sovereign cloud: usgov, china
PURVIEW_MAX_RETRIES No 3 API retry count
PURVIEW_TIMEOUT No 30 Request timeout (seconds)
PURVIEW_BATCH_SIZE No 100 Bulk operation batch size
PURVIEW_MCP_TRANSPORT No stdio Transport protocol
PURVIEW_MCP_HOST No 127.0.0.1 Bind host (HTTP/SSE modes)
PURVIEW_MCP_PORT No 8000 Bind port (HTTP/SSE modes)

Copy .env.example to .env and fill in your values. Never commit .env.


Available Tools (37 + registry)

Category Tools
Entity (8) get_entity, create_entity, update_entity, delete_entity, search_entities, batch_create_entities, batch_update_entities, import_entities_from_csv
Glossary (3) get_glossary_terms, create_glossary_term, assign_term_to_entities
Unified Catalog (11) uc_list_domains, uc_get_domain, uc_create_domain, uc_list_terms, uc_get_term, uc_create_term, uc_search_terms, uc_list_custom_metadata_defs, uc_cleanup_metadata_definition, uc_delete_metadata_definition, uc_delete_metadata_from_asset
Collections (5) list_collections, get_collection, create_collection, delete_collection, get_collection_path
Lineage (2) get_lineage, create_lineage
Search (2) search_suggest, search_browse
Type Defs (2) get_typedef, list_typedefs
Relationships (3) create_relationship, get_relationship, delete_relationship
Account + Registry (3) get_account_properties, list_available_operations, invoke_operation

Recommended First Commands

1) list_available_operations()
2) get_account_properties()
3) search_entities(query="customer", limit=5)
4) uc_list_domains()

Files

File Purpose
server.py FastMCP server — all 37 tool definitions
config.py PurviewMCPConfig frozen dataclass — env var parsing and validation
__version__.py Package version
.env.example Environment variable template
PROMPT_INSTRUCTIONS.md Detailed prompt guidance for AI assistants
pyproject.toml Package metadata (purview-mcp-server)
Dockerfile Container image for standalone deployment
docker-compose.yml Local container stack

For Azure Functions hosting files, see tools/hosting/.


See docs/purview-mcp-server.md for the full reference including client setup for Claude Code and Cursor, Azure Functions deployment, all prompt examples, workflows, and troubleshooting.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

purview_mcp_server-1.13.2.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

purview_mcp_server-1.13.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file purview_mcp_server-1.13.2.tar.gz.

File metadata

  • Download URL: purview_mcp_server-1.13.2.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for purview_mcp_server-1.13.2.tar.gz
Algorithm Hash digest
SHA256 2470431e15ce5517b9d4c2674ef9a508755003b1f393d450ab18c187ec5f33f5
MD5 49a649a743112b87a17daa26065e2564
BLAKE2b-256 d8cf3c0fe4390b1184591e7fb99f0321c2878a968f3853ff4437204c9922344e

See more details on using hashes here.

Provenance

The following attestation bundles were made for purview_mcp_server-1.13.2.tar.gz:

Publisher: publish-to-pypi.yml on Keayoub/pvw-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file purview_mcp_server-1.13.2-py3-none-any.whl.

File metadata

File hashes

Hashes for purview_mcp_server-1.13.2-py3-none-any.whl
Algorithm Hash digest
SHA256 acbc67be36957e83832929f39ce8cbff8e7806f2cbd197d62ff1e3f24e24de93
MD5 82a3fd184c2ffc172ce1858e86c9e4a4
BLAKE2b-256 95b7f4f68b04218770ae9a8bb52e78ab857bc660b4a1f1a277ce87e60f40c47c

See more details on using hashes here.

Provenance

The following attestation bundles were made for purview_mcp_server-1.13.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Keayoub/pvw-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page