Minimal MCP server for hackathon use-cases that lets LLM agents discover data assets, inspect table metadata, and traverse lineage in OpenMetadata.
search_data_assets: Search table/data assets by natural language or keyword.get_table_details: Fetch table metadata including schema, tags, and owner.get_table_lineage: Fetch upstream/downstream dependencies for a table.analyze_table_for_pii: Provide governance-focused schema context for LLM PII audit reasoning.apply_pii_tag_to_column: Apply a governance tag to a table column for automated remediation.update_column_description: Add or update undocumented column descriptions inferred by the LLM.
- Step 1: Search & Discover (
search_data_assets,get_table_details) - Step 2: Audit & Reason (
analyze_table_for_pii) - Step 2.5: Verify Rules (
get_available_governance_tags) - Step 3: Document (
update_column_description) - Step 4: Act & Remediate (
apply_pii_tag_to_column)
Audit, Document & Remediate: Automatically suggest descriptions for undocumented columns and apply governance tags.
- Python
3.11+ - Access to an OpenMetadata instance (default expected:
http://localhost:8585) - OpenMetadata JWT token with read permissions for search, table metadata, and lineage
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
cp .env.example .env
-
Edit
.env:OPENMETADATA_HOST=http://localhost:8585 OPENMETADATA_JWT_TOKEN=your-token-here
To use this MCP server from Claude Desktop, add this MCP server entry to your claude_desktop_config.json.
Config file locations:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use the following configuration:
{
"mcpServers": {
"openmetadata": {
"command": "uv",
"args": [
"run",
"mcp",
"run",
"/ABSOLUTE/PATH/TO/YOUR/openmetadata-mcp-server/server.py"
],
"env": {
"OPENMETADATA_HOST": "http://localhost:8585",
"OPENMETADATA_JWT_TOKEN": "your-token-here"
}
}
}
}Template content reference (copy/paste this block into your claude_desktop_config.json as-is, then edit values):
{
"mcpServers": {
"openmetadata": {
"command": "uv",
"args": [
"run",
"mcp",
"run",
"/ABSOLUTE/PATH/TO/YOUR/openmetadata-mcp-server/server.py"
],
"env": {
"OPENMETADATA_HOST": "http://localhost:8585",
"OPENMETADATA_JWT_TOKEN": "your-token-here"
}
}
}
}Only replace these values in your own Claude Desktop config:
OPENMETADATA_JWT_TOKEN- the
argsserver path if your project location is different
- Basic Discovery: "Search for tables related to 'users' or 'customers' in OpenMetadata. Please analyze their columns and let me know if there is any Personally Identifiable Information (PII) that is currently missing a governance tag."
- Autonomous Governance Workflow: "Please audit the tables in ecommerce_db (or any target database). I need you to do two things automatically: 1) Infer and update the descriptions for any columns that are undocumented. 2) Identify any untagged PII columns, check the available governance tags in the system, and apply the correct tags to them."
mcp run server.pysearch_data_assets(query, limit=10)- Example intent: "Find customer or user profile tables."
get_table_details(identifier)- Example intent: "Show schema and owner for
service.db.schema.table."
- Example intent: "Show schema and owner for
get_table_lineage(identifier)- Example intent: "Show what feeds and depends on this table."
The server returns structured error payloads (ok: false) with:
- an
errormessage - a
hintto help the LLM self-correct (invalid token, bad identifier, connectivity issue) - optional
status_codewhen available
Common remediation:
401: refresh/checkOPENMETADATA_JWT_TOKEN404: verify table FQN or UUID- connection errors: verify
OPENMETADATA_HOSTand that OpenMetadata is running