Microsoft Fabric MCP Server

Microsoft Fabric MCP Server

A Python MCP server that lets you manage Microsoft Fabric through natural language in Claude Code or Claude Desktop, with 77+ tools covering workspaces, lakehouses, warehouses, SQL, DAX, semantic models, notebooks, pipelines, OneLake, and Microsoft Graph.

Category
访问服务器

README

Microsoft Fabric MCP Server

A Python MCP server that lets you manage Microsoft Fabric through natural language in Claude Code or Claude Desktop. 77+ tools covering workspaces, lakehouses, warehouses, SQL, DAX, semantic models, notebooks, pipelines, OneLake, and Microsoft Graph.

Inspired by: https://github.com/Augustab/microsoft_fabric_mcp/tree/main

Quick Start

git clone https://github.com/Jasuni69/ms-core-mcp.git
cd ms-core-mcp
az login
python setup.py

The setup script checks prerequisites, installs dependencies, and configures your Claude client. It safely merges into existing config files without affecting other MCP servers.

Then restart VS Code or Claude Desktop and ask: "List my Fabric workspaces"

Prerequisites

  • Python 3.12+ - Download
  • uv package manager - Install
  • Azure CLI - Install
  • ODBC Driver 18 (optional, for SQL tools) - Download
  • Access to a Microsoft Fabric workspace with Contributor or Admin role

How It Works

You (natural language) --> Claude --> MCP Server --> Fabric REST API --> Your Fabric Resources

Two transport modes:

  • STDIO (default) - fabric_mcp_stdio.py - used by Claude Code and Claude Desktop
  • HTTP - fabric_mcp.py --port 8081 - for custom integrations

Tools (77+)

Workspace & Resource Management (9 tools)

list_workspaces, create_workspace, set_workspace, list_lakehouses, create_lakehouse, set_lakehouse, list_warehouses, create_warehouse, set_warehouse

Delta Table Operations (10 tools)

list_tables, set_table, get_lakehouse_table_schema, get_all_lakehouse_schemas, table_preview, table_schema, describe_history, optimize_delta, vacuum_delta, load_data_from_url

SQL (4 tools)

sql_query, sql_explain, sql_export, get_sql_endpoint

  • Always pass type ("lakehouse" or "warehouse")
  • SQL endpoints are read-only - no DDL/DML
  • New delta tables take 5-10 min to appear in SQL endpoint
  • Requires ODBC Driver 18

Semantic Models & DAX (9 tools)

list_semantic_models, get_semantic_model, get_model_schema, list_measures, get_measure, create_measure, update_measure, delete_measure, analyze_dax_query

Reports (4 tools)

list_reports, get_report, report_export, report_params_list

Power BI (2 tools)

semantic_model_refresh, dax_query

Notebooks (16 tools)

list_notebooks, create_notebook, get_notebook_content, update_notebook_cell, create_pyspark_notebook, create_fabric_notebook, generate_pyspark_code, generate_fabric_code, validate_pyspark_code, validate_fabric_code, analyze_notebook_performance, run_notebook_job, get_run_status, cancel_notebook_job, install_requirements, install_wheel, cluster_info

Pipelines & Scheduling (8 tools)

pipeline_run, pipeline_status, pipeline_logs, create_data_pipeline, get_pipeline_definition, dataflow_refresh, schedule_list, schedule_set

OneLake File Operations (7 tools)

onelake_ls, onelake_read, onelake_write, onelake_rm, onelake_create_shortcut, onelake_list_shortcuts, onelake_delete_shortcut

Items & Permissions (4 tools)

resolve_item, list_items, get_permissions, set_permissions

Microsoft Graph (8 tools)

graph_user, graph_mail, graph_teams_message, graph_teams_message_alias, graph_drive, save_teams_channel_alias, list_teams_channel_aliases, delete_teams_channel_alias

Session (1 tool)

clear_context

Example Usage

"List all my Fabric workspaces"
"Set workspace to Analytics-Prod"
"Show me all tables in the sales lakehouse"
"What are the top 10 customers by revenue?"
"Create a DAX measure for total sales"
"Generate a PySpark ETL notebook"
"Run the daily pipeline and check status"

Manual Setup (without setup.py)

Claude Code (VS Code)

Create .mcp.json in the project root:

{
  "mcpServers": {
    "ms-fabric-core-tools-mcp": {
      "command": "uv",
      "args": ["--directory", "/full/path/to/ms-core-mcp", "run", "fabric_mcp_stdio.py"]
    }
  }
}

Add to ~/.claude/settings.json:

{
  "enableAllProjectMcpServers": true
}

Claude Desktop

Add to your claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "ms-fabric-core-tools-mcp": {
      "command": "/full/path/to/uv",
      "args": ["--directory", "/full/path/to/ms-core-mcp", "run", "fabric_mcp_stdio.py"]
    }
  }
}

Note: Claude Desktop needs the full path to uv since it may not inherit your shell PATH.

Project Structure

ms-core-mcp/
  fabric_mcp.py          # HTTP server entry point
  fabric_mcp_stdio.py    # STDIO entry point (Claude Code / Desktop)
  setup.py               # Automated setup script
  pyproject.toml          # Dependencies
  CLAUDE.md              # AI assistant instructions
  tools/                 # MCP tool definitions
  helpers/
    clients/             # Fabric API, SQL, OneLake clients
    formatters/          # Output formatters
    utils/               # Auth, context, validators
  tests/                 # Tests
  docs/                  # Documentation

Known Limitations

  • SQL endpoints are read-only - use PySpark notebooks for writes
  • SQL sync delay - new tables take 5-10 min to appear
  • API rate limits - 50 requests/min/user (Fabric), 120 queries/min/user (Power BI)
  • Notebook lakehouse attachment - must be done manually in Fabric UI
  • ODBC Driver 18 required for sql_query, table_preview, sql_explain tools
  • Report creation not supported - can list, export, view params only

Troubleshooting

"Command not found: uv" - Install uv, then restart terminal

"Not authenticated" - Run az login, then verify with:

az account get-access-token --resource https://api.fabric.microsoft.com/

"Database not found" on SQL queries - SQL endpoint may not be provisioned yet. Wait a few minutes or check the lakehouse has tables in the Fabric portal.

MCP tools not appearing in Claude Desktop - Use full path to uv in config. Check Task Manager to fully close and restart Claude Desktop.

Only some tools showing - Check for import errors by running:

uv run python -c "from tools import *; from helpers.utils.context import mcp; print(f'Tools: {len(mcp._tool_manager._tools)}')"

Testing

uv run pytest tests/

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选