MCP Server cho Microsoft Fabric Cloud - Chạy Native trên macOS
📋 Mô tả
Fabric AI Gateway là một MCP (Model Context Protocol) Server cho phép AI CLI (Gemini, Codex) tương tác trực tiếp với Microsoft Fabric Cloud mà không cần Windows VM hoặc Power BI Desktop.
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
brew install msodbcsql18
🛠️ Cài đặt
# Clone repository
git clone <repo-url>
cd MCP_Cloud_Fabric
# Tạo virtual environment
python3 -m venv venv
source venv/bin/activate
# Cài đặt dependencies
pip install -r requirements.txt
# Copy và cấu hình config
cp config.yaml.template config.yaml
# Sửa config.yaml với Client ID và Tenant ID của bạn
1. Authenticate (Browser login)
│
▼
2. Select Workspace
│
▼
3. Select Mode ─────────────────────────┐
│ │
▼ ▼
[Semantic Model] [Data Warehouse]
│ │
│ ▼
│ Enter SQL Endpoint
│ Enter Warehouse Name
│ │
└──────────────┬───────────────┘
│
▼
4. Select Interface ────────────────────┐
│ │ │
▼ ▼ ▼
[Gemini CLI] [Codex CLI] [Standalone]
│ │ │
▼ ▼ ▼
Chat với AI Chat với AI Gõ lệnh thủ công
về data về data (dax, sql, etc.)
🔧 MCP Tools Reference
Semantic Model Mode (14 Tools)
Tool
Mô tả
Premium?
XMLA Write?
list_workspaces
Liệt kê tất cả workspaces
❌
-
list_datasets
Liệt kê semantic models trong workspace
❌
-
connect_dataset
Kết nối tới một model
❌
-
get_tables
Lấy danh sách tables + số columns
❌
-
get_columns
Lấy chi tiết columns (có filter)
❌
-
get_measures
Lấy tất cả measures
✅
-
get_relationships
Lấy tất cả relationships
✅
-
execute_dax
Chạy DAX query
❌
-
get_dataset_info
Lấy metadata dataset
❌
-
refresh_dataset
Trigger refresh
❌
-
create_measure
Tạo measure mới
✅
✅ Middleware
delete_measure
Xóa measure
✅
✅ Middleware
create_relationship
Tạo relationship
✅
✅ Middleware
delete_relationship
Xóa relationship
✅
✅ Middleware
✅ macOS Support: Các tool write sử dụng .NET Middleware (FabricClient) với TOM API để thực thi trực tiếp qua XMLA endpoint. Nếu middleware không khả dụng, tool sẽ trả về TMSL script để chạy thủ công trong SSMS hoặc Tabular Editor.
Data Warehouse Mode (3 Tools)
Tool
Mô tả
get_warehouse_tables
Liệt kê all tables (có filter schema)
execute_sql
Chạy SQL SELECT query
describe_table
Lấy schema của bảng
🔒 Bảo mật
✅ Token cache mã hóa tại ~/.fabric-gateway/token_cache.bin
✅ Kết nối SQL được mã hóa (Encrypt=yes)
✅ Không sử dụng TrustServerCertificate=yes
✅ SQL queries được validate để chặn lệnh nguy hiểm