Fabric Ontology MCP Server

Fabric Ontology MCP Server

Enables full CRUD control of Ontology items in Microsoft Fabric, including entity types, relationships, data bindings, and workspace discovery through natural language.

Category
访问服务器

README

Fabric Ontology MCP Server

Production-ready MCP server for full CRUD control of Ontology items in Microsoft Fabric.

Prerequisites

  • Python ≥ 3.11
  • Azure CLI (az) installed and logged in (az login)
  • Access to a Microsoft Fabric workspace with Ontology items

Installation

cd "Ontology MCP Server"
pip install -e .

Usage

# Run via entry point
fabric-ontology-mcp

# Or directly
python -m src

VS Code / Copilot MCP config

{
  "servers": {
    "fabric-ontology": {
      "command": "python",
      "args": ["-m", "src"],
      "cwd": "/path/to/Ontology MCP Server"
    }
  }
}

Available Tools

Workspace Discovery

Tool Description
list_workspaces List all Fabric workspaces accessible to you
list_workspace_items List items in a workspace (filter by type: Eventhouse, Lakehouse, etc.)

Ontology CRUD

Tool Description
list_ontologies List ontologies in a workspace
get_ontology Get ontology metadata
create_ontology Create a new ontology
update_ontology Update display name / description
delete_ontology Delete an ontology (soft or hard)
get_ontology_definition Get full decoded definition (entities, relationships, bindings)
update_ontology_definition_raw Replace entire definition from JSON

Entity Types

Tool Description
list_entity_types List all entity types in an ontology
get_entity_type Get a single entity type with its bindings, documents, overviews, links
add_entity_type Create a new entity type with properties
update_entity_type Rename an entity type or change its display name property / ID parts
remove_entity_type Delete an entity type (and its relationships)

Properties

Tool Description
add_property Add a property to an entity type
update_property Rename a property or change its value type
remove_property Remove a property from an entity type

Relationship Types

Tool Description
list_relationship_types List relationships in an ontology
get_relationship_type Get a single relationship with its contextualizations
add_relationship_type Create a relationship between entity types (validates both exist)
update_relationship_type Rename a relationship type
remove_relationship_type Delete a relationship type

Data Bindings

Tool Description
list_data_bindings List bindings for an entity type
add_data_binding Bind an entity type to a Lakehouse or Eventhouse table
remove_data_binding Remove a data binding

Documents, Overviews & Resource Links

Tool Description
add_document Attach a document URL to an entity type
list_documents List all documents attached to an entity type
remove_document Remove a document by URL
get_overview Get the current overview configuration
set_overview Configure overview widgets for an entity type
get_resource_links Get the current resource links
set_resource_links Link Power BI reports to an entity type

Contextualizations

Tool Description
list_contextualizations List contextualizations for a relationship type
add_contextualization Define how a relationship is materialized from data
remove_contextualization Remove a contextualization

KQL / Eventhouse Discovery

Tool Description
get_kql_database_details Get cluster URI, database name, and parent Eventhouse
list_kql_tables List tables in a KQL database
get_kql_table_schema Get column names and types for a table

Lakehouse & Workspace Data Discovery

Tool Description
discover_lakehouse_tables List all tables in a Lakehouse (via OneLake Table API)
get_lakehouse_table_schema Get columns with types and Ontology valueType mapping
discover_workspace_data Full scan — discover all Lakehouses + Eventhouses, all tables and schemas

Ontology planning workflow: Call discover_workspace_data to scan a workspace, then use the returned schemas to design entity types, properties, relationships, and data bindings using the CRUD tools above.

Data Profiling

Tool Description
preview_kql_table Preview first N rows from an Eventhouse table
profile_kql_table Row count, distinct counts, null rates, sample values, min/max per column
preview_lakehouse_table Preview first N rows from a Lakehouse table (Spark SQL via Livy)
profile_lakehouse_table Row count, distinct counts, null rates, sample values, min/max per column

Note: First Lakehouse profiling call takes ~30-60s for Spark session startup. Subsequent queries reuse the session and are fast.

Project Structure

src/
├── __init__.py
├── __main__.py          # python -m src entry point
├── auth.py              # Azure CLI token acquisition (per-resource caching)
├── definition_utils.py  # Base64 encode/decode for ontology definition parts
├── fabric_client.py     # Async Fabric REST API client
├── kusto_client.py      # Async Kusto REST query client
└── server.py            # MCP server with all tools

Input Validation

All tools validate inputs before calling the Fabric API:

  • Names must match ^[a-zA-Z][a-zA-Z0-9_-]{0,127}$ (entity types, properties, relationships)
  • Value types must be one of: String, Boolean, DateTime, Object, BigInt, Double
  • JSON parameters return clear error messages on parse failure
  • Entity existence is checked when creating relationships (both source and target must exist)

Authentication

Uses Azure CLI tokens. Make sure you're logged in:

az login

Tokens are cached per resource (Fabric API and Kusto clusters are separate audiences) and automatically refreshed when near expiry.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选