Skip to main content
Glama
nusagates

Power BI Modeling MCP SSE Bridge

by nusagates

Power BI 建模 MCP SSE 网桥

Node.js Version Platform MCP

本项目是 Microsoft 官方 Power BI 建模 MCP 服务器 的高性能 SSE (Server-Sent Events) 网桥。它支持从任何语言(Laravel、Python、Go)通过 URL 无缝交互 Power BI 语义模型,无需本地 stdio 管道。

🔥 核心创新

  • 自动认证 (令牌注入):使用您的管理员凭据自动执行 Azure ROPC 流程以注入访问令牌。结果: 服务器端无需浏览器弹出窗口

  • 动态二进制解析:自动检测您的操作系统和 CPU 架构,以启动正确的 Microsoft MCP 二进制文件。

  • Laravel 上下文注入:通过 URL 查询参数传递工作区 (Workspace) 和数据集 (Dataset) ID,以维护特定于会话的上下文。

  • Web 就绪:非常适合为 Power BI 构建自定义 AI 聊天界面。


Related MCP server: powerbi-mcp-proxy

🛠️ 安装与快速入门

1. 要求

  • Node.js v18 或更高版本。

  • Power BI 管理员账户 (主用户) 或服务主体 (Service Principal)。

2. 设置

git clone https://github.com/nusagates/mcp_pbi.git
cd mcp_pbi
npm install

3. 配置

根据模板创建 .env 文件:

cp .env.example .env

填写您的 MS_PBI_... 凭据。重要提示:为了使基于密码的登录无需浏览器即可工作,请在 Azure 应用注册 -> 身份验证设置中启用 “允许公共客户端流 (Allow public client flows)”

4. 运行

npm start

网桥将在 http://localhost:3000/sse 启动。


🔗 Laravel 集成示例

使用 Laravel 的 Http 门面与网桥交互:

use Illuminate\Support\Facades\Http;

// 1. Establish connection context (via Browser/SSE Client)
// URL: http://localhost:3000/sse?workspace_id=abc&dataset_id=123

// 2. Execute a Tool through the bridge
$response = Http::post("http://localhost:3000/messages?sessionId=YOUR_SESSION_ID", [
    "jsonrpc" => "2.0",
    "id" => 1,
    "method" => "tools/call",
    "params" => [
        "name" => "execute_dax_query",
        "arguments" => [
            "query" => "EVALUATE TOPN(10, 'YourTable')"
        ]
    ]
]);

return $response->json();

🛡️ Power BI 权限检查清单

  • [ ] Azure 门户:应用注册已存在,且具有 Tenant.Read.All 权限。

  • [ ] Power BI 管理员:已开启 “允许服务主体使用 Power BI API”。

  • [ ] 工作区:应用或用户已添加为 成员/贡献者

🤝 致谢

本网桥使用 Microsoft Power BI 建模 MCP 服务器 作为其核心引擎。特别感谢 Microsoft 团队提供的协议实现。

📄 许可证

MIT 许可证。欢迎使用并贡献代码!

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A self-hosted MCP server that proxies MCP clients to Power BI, using your own Entra tenant and Azure subscription. It enables DAX queries, workspace listing, and dataset management while preserving user-specific row-level security.
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    The Power BI Modeling MCP Server implements the MCP specification to create a seamless connection between AI agents and Power BI semantic models. This allows developers and AI applications to interact with Power BI models in entirely new ways, from using natural language to execute modeling changes to autonomous AI agentic development workflows.
    1,078
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nusagates/mcp_pbi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server