AI SDK
The AI SDK gives you programmatic access to OpenMetadata’s MCP tools — use them to build custom AI applications with any LLM by connecting to your metadata catalog. Available across Python, TypeScript, and Java.Available SDKs
| SDK | Package | Install |
|---|---|---|
| Python | data-ai-sdk | pip install data-ai-sdk |
| TypeScript | @openmetadata/ai-sdk | npm install @openmetadata/ai-sdk |
| Java | org.open-metadata:ai-sdk | Maven / Gradle |
Prerequisites
You need:- An OpenMetadata instance (self-hosted or Collate)
- A Bot JWT token for API authentication
Configuration
Set the following environment variables:| Variable | Required | Default | Description |
|---|---|---|---|
AI_SDK_HOST | Yes | - | Your OpenMetadata server URL |
AI_SDK_TOKEN | Yes | - | Bot JWT token |
AI_SDK_TIMEOUT | No | 120 | Request timeout in seconds |
AI_SDK_VERIFY_SSL | No | true | Verify SSL certificates |
AI_SDK_MAX_RETRIES | No | 3 | Number of retry attempts |
AI_SDK_RETRY_DELAY | No | 1.0 | Base delay between retries (seconds) |
Client Initialization
MCP Tools
OpenMetadata exposes an MCP server that turns your metadata into a set of tools any LLM can use. Unlike generic MCP connectors that only read raw database schemas, OpenMetadata’s MCP tools give your AI access to the full context of your data platform — descriptions, owners, lineage, glossary terms, tags, and data quality results. The MCP endpoint is available atPOST /mcp using the JSON-RPC 2.0 protocol.
Available Tools
| Tool | Description |
|---|---|
search_metadata | Search across all metadata in OpenMetadata (tables, dashboards, pipelines, topics, etc.) |
semantic_search | AI-powered semantic search that understands meaning and context beyond keyword matching |
get_entity_details | Get detailed information about a specific entity by ID or fully qualified name |
get_entity_lineage | Get upstream and downstream lineage for an entity |
create_glossary | Create a new glossary in OpenMetadata |
create_glossary_term | Create a new term within an existing glossary |
create_lineage | Create a lineage edge between two entities |
patch_entity | Update an entity’s metadata (description, tags, owners, etc.) |
get_test_definitions | List available data quality test definitions |
create_test_case | Create a data quality test case for an entity |
root_cause_analysis | Analyze root causes of data quality failures |