Integrations
Used as a dependency for data processing operations in the PBIXRay server, supporting statistical analysis and data manipulation of Power BI models.
PBIXRay MCP 服务器
PBIXRay 的模型上下文协议(MCP) 服务器。
该 MCP 服务器将PBIXRay的功能公开为 LLM 客户端与 Power BI (.pbix) 文件交互的工具和资源。
特征
- [x] 加载和分析 PBIX 文件
- [x] 数据模型探索
- [x] 列出模型中的表
- [x] 检索模型元数据
- [x] 检查模型尺寸
- [x] 获取模型统计数据
- [x] 获取全面的模型摘要
- [x] 查询语言访问
- [x] 查看 Power Query (M) 代码
- [x] 访问 M 参数
- [x] 探索 DAX 计算表
- [x] 查看 DAX 指标
- [x] 检查 DAX 计算列
- [x] 数据结构分析
- [x] 检索架构信息
- [x] 分析表关系
- [x] 使用分页访问表格内容
工具列表是可配置的,因此您可以选择要向 MCP 客户端开放的工具。如果您不使用某些功能或不想泄露敏感信息,此功能非常有用。
工具
工具 | 类别 | 描述 |
---|---|---|
load_pbix_file | 核 | 加载 Power BI (.pbix) 文件进行分析 |
get_tables | 模型 | 列出模型中的所有表 |
get_metadata | 模型 | 获取有关 Power BI 配置的元数据 |
get_power_query | 询问 | 显示用于数据转换的所有 M/Power Query 代码 |
get_m_parameters | 询问 | 显示所有 M 参数值 |
get_model_size | 模型 | 获取模型大小(以字节为单位) |
get_dax_tables | 询问 | 查看 DAX 计算表 |
get_dax_measures | 询问 | 通过按表或度量名称进行筛选来访问 DAX 度量 |
get_dax_columns | 询问 | 使用筛选选项访问计算列 DAX 表达式 |
get_schema | 结构 | 获取有关数据模型架构和列类型的详细信息 |
get_relationships | 结构 | 获取有关数据模型关系的详细信息 |
get_table_contents | 数据 | 检索指定表的分页内容 |
get_statistics | 模型 | 通过可选过滤获取有关模型的统计数据 |
get_model_summary | 模型 | 获取当前 Power BI 模型的全面摘要 |
用法
WSL(推荐)
将服务器配置添加到客户端配置文件中。例如,对于 Claude Desktop:
WSL 路径转换(例如 Claude 项目说明)
在 Windows 上使用 Claude Desktop 在 WSL 中使用 PBIXRay MCP 服务器时,加载 PBIX 文件时需要注意路径差异。Windows 路径(例如C:\Users\name\file.pbix
)无法在 WSL 中直接访问。请在项目说明中添加“请注意,mcp 服务器正在 WSL 中运行。Windows 路径(例如 C:\Users\name\file.pbix )无法在 WSL 中直接访问。请在引用文件时使用 WSL 路径:Windows:C:\Users\name\Downloads\file.pbix”或类似说明,让您的 AI 助手知道如何在路径之间进行转换。
命令行选项
该服务器支持多个命令行选项:
--disallow [tool_names]
:出于安全原因禁用特定工具--max-rows N
:设置返回的最大行数(默认值:100)--page-size N
:设置分页结果的默认页面大小(默认值:20)
可以根据需要在配置json中添加命令行选项:
查询选项
工具支持用于过滤和分页的附加参数:
按名称过滤
get_dax_measures
、 get_dax_columns
、 get_schema
等工具支持按特定名称进行过滤:
大型表格的分页
get_table_contents
工具支持分页,可以有效地处理大型表格:
开发和测试
您可以安装 PBIXRay MCP 服务器:
开发安装
对于参与该项目的开发人员:
- 克隆存储库:Copy
- 以开发模式安装:Copy
- 如果从源安装,请创建虚拟环境并安装依赖项:Copy
使用示例文件进行测试
该存储库包含示例文件和测试脚本,以帮助您入门:
测试脚本将帮助您了解如何使用demo/
目录中提供的示例 PBIX 文件与服务器交互。
开发模式
要在开发过程中测试服务器,请使用 MCP Inspector:
这将启动一个交互式会话,您可以在其中调用工具和测试响应。
项目结构
贡献
非常欢迎贡献!
致谢
许可证(克劳德坚持要添加这些)
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
模型上下文协议使 AI 客户端能够通过 PBIXRay python 包查询元数据与 PowerBI 模型进行交互。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that provides seamless interaction with Workato's API through custom AI tools, enabling management of recipes, connections, connectors, folders, and activity logs.Last updated -TypeScriptMIT License
- AsecurityFlicenseAqualityImplements the Model Context Protocol to allow AI models to access and interact with blockchain data, including reading contract states, retrieving events, and accessing transaction information across various networks.Last updated -104530TypeScript
- -securityAlicense-qualityA streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.Last updated -12PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables AI models to create and manipulate PowerPoint presentations with advanced features like financial charts, formatting, and template management.Last updated -1Python