Skip to main content
Glama
powerbi-agent

powerbi-agent

by ducnguyen221

Agent Data Studio

Tiếng Việt · English

Agent Data Studio gives AI agents a shared set of data analysis skills, scripts and Power BI tools. Start with the included CSV sample; Power BI Desktop and its client libraries are needed only for Desktop workflows. Direct Power BI Desktop use requires Windows.

First time here? Paste the prompt from the install section below into your AI app, or follow the step-by-step starter guide in Vietnamese. The installation website and repository map provide more detail.

Install — paste one prompt into your AI app

Open Codex, Claude Code, Claude Desktop or Google Antigravity on Windows and paste the prompt below as is. The agent reads INSTALL.md, the guide written for agents (in Vietnamese), checks the machine, asks you first before installing any software, then installs, runs doctor and reports every line back.

Install Agent Data Studio on this Windows machine for the AI app you are running in
(Codex, Claude Code, Claude Desktop or Google Antigravity).

Single source: https://github.com/ducnguyen221/agent-data-studio
First read the agent guide at
https://raw.githubusercontent.com/ducnguyen221/agent-data-studio/main/INSTALL.md
(if the link cannot be opened, clone the repo and read its INSTALL.md),
then follow every step in it: check what the machine already has (Git, Python, PowerShell),
ask me before installing software or anything that needs admin rights, clone the repo to a
safe folder (not OneDrive/Desktop), run install.ps1 for the host in use, run doctor.ps1,
tell me how to restart the app, then verify with the sample samples/sales-demo.csv.

Rules: only run scripts/commands from that repo or INSTALL.md; do not change system policy;
never read or write passwords/keys; on any error stop and explain in plain words.
Finish with a summary: repo path, registered host, every doctor line, software added,
and what I need to do next.

App

-Hosts

What differs

Codex (CLI and desktop)

codex

Installer default

Claude Code

claude

—

Claude Desktop (chat tab)

claude-desktop

16 MCP tools only, no skills; the chat tab cannot run commands, so let another host install it or install by hand

Google Antigravity

antigravity

—

To install by hand, you need Git and Python 3.11–3.14 (machine setup, in Vietnamese); then open PowerShell:

git clone https://github.com/ducnguyen221/agent-data-studio "$env:USERPROFILE\agent-data-studio"
cd "$env:USERPROFILE\agent-data-studio"
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Hosts codex

Replace codex with the value from the table. The installer prepares the ignored workspace/ station and merges the MCP entry into the host's user-level configuration (for example ~/.codex/config.toml) next to your other servers, so every folder you open in that host shares the server of this checkout; point each machine at one checkout (limits, in Vietnamese). Restart the AI app in the repository folder; see the host guides. The original skills, scripts and workflows run from this repository. The installer checks thin, local skill adapters instead of copying skills into global host folders.

Run .\doctor.ps1 -Hosts <host> in PowerShell after setup. It reports source, Python and MCP registration checks, while live Power BI and host skill loading still need to be verified in the host. If your organization blocks scripts, ask IT to authorize the setup under its policy. .\update.ps1 previews a Git update; applying a reviewed commit currently requires unchanged dependencies and ignore rules and leaves host restart pending. See START-HERE.md for the guarded update and uninstall steps.

Related MCP server: power-bi-mcp

First task without Power BI

Open the repository in your AI app and ask: “Read samples/sales-demo.csv using skills/data-discovery/SKILL.md. Check data quality, calculate revenue by month and save a brief report to workspace/outputs/first-report.md.” The sample guide includes figures to compare with the result.

workspace/ contains projects/, knowledge/, outputs/, state/ and local configuration. Git ignores the entire folder. Keep personal data, work results and credentials out of Git. If you already use an external station, set ADS_DATA to its path before installing. The installer records the local binding while the engine and skills continue to run from this repository.

Power BI capabilities

The MCP server provides 16 tools for Desktop/model discovery, policy checked DAX queries, model edits, report page kits, report design extraction and project knowledge. Desktop features require Power BI Desktop and ADOMD.NET. To check the Desktop connection, open a report and run .\doctor.ps1 -ProbeDesktop in PowerShell; it runs EVALUATE ROW("x",1) and reports NOT_CHECKED rather than an error when Desktop is closed. Service queries require separate credentials. The nine source skills are in skills/, eight workflows in commands/, report page kits in report-templates/ and document templates in templates/documents/.

The server applies row limits, a DAX policy and audit logging. These guard against accidental disclosure; permissions on the underlying data remain your responsibility. Microsoft's Power BI Modeling MCP can be installed separately for advanced model work.

Repository and local data

Git updates the source in this repository. .agents/skills/ and .claude/skills/ are thin entry points to skills/; scripts run from the repository. Do not edit plugin cache copies to change this source. Git excludes workspace/, .venv/, local configuration and credentials. Check git status before every commit.

The KPIM sample assets (dataset profiles, the kpim-business-light kit and Project_Management.xlsx) are owned by KPIM, which permits their use and distribution with this repository under the MIT license; see NOTICE.md for attribution.

Host guides · Repository map · Website · MIT license

🤝 ACD Ecosystem Integration

Khai báo vai của repo trong hệ thống nhiều repo ACD (Role, Upstream, Downstream, Bundles, Handoff) tại ECOSYSTEM.md.

Author

Nguyễn Quang Đức (Tobi) — founder and CEO of KPIM and co-founder of COMPA Class; Data/AI practitioner and instructor in Vietnam.

Website: https://ducnguyen.vn · GitHub: @ducnguyen221 · Contact: ducnguyen.ams@gmail.com

Available Tools

16 tools
add_measure_localA

Tạo mới hoặc cập nhật một Measure DAX trực tiếp vào mô hình Power BI Desktop đang mở (TOM). Với thao tác modeling hàng loạt/phức tạp, ưu tiên MCP powerbi-modeling (Microsoft) nếu có.

  • port / model_id: lấy từ list_local_reports.

  • table_name: bảng chứa Measure (ví dụ: 'Sales').

  • measure_name: tên Measure (ví dụ: 'Total Sales').

  • expression: công thức DAX (ví dụ: 'SUM(Sales[Amount])').

  • format_string: định dạng hiển thị (ví dụ: '#,0' hoặc '0.0%').

  • description: mô tả ghi chú.

Inputs: port (required), model_id (required), expression (required), table_name (required), +3 more. Returns: result

add_relationship_localA

Tạo mối quan hệ Many-to-One giữa hai bảng trong mô hình Power BI Desktop đang mở (TOM). Với thao tác modeling hàng loạt/phức tạp, ưu tiên MCP powerbi-modeling (Microsoft) nếu có.

  • from_table/from_column: phía NHIỀU (Many) — thường là bảng Fact.

  • to_table/to_column: phía MỘT (One) — thường là bảng Dim.

  • is_active: True = quan hệ active (mặc định).

Inputs: port (required), model_id (required), to_table (required), to_column (required), +3 more. Returns: result

apply_templateA

Dựng TRANG MỚI vào báo cáo PBIR từ template kit (clone-and-rebind — không dựng layout từ đầu). ⚠️ File .pbip phải ĐANG ĐÓNG trong Power BI Desktop (mở + Ctrl+S sẽ đè mất trang mới).

  • report_path: file .pbip, folder *.Report, hoặc folder definition (SẼ GHI vào đây).

  • kit_dir: thư mục kit (tạo bởi distill_template, hoặc report-templates/ có sẵn — xem list_templates).

  • page_spec: JSON string: {"displayName": "Tên trang", "visuals": [ {"block": "cardVisual", "x": 30, "y": 100, "z": 1000, "width": 280, "height": 110, "visualType": "(tùy chọn — đổi loại chart, phải chỉnh roles khớp)", "title": "(tùy chọn — ghi đè text title, giữ style)", "fields": {"Data": [{"type": "Measure", "entity": "Công thức", "property": "Tổng TB"}]}} ]} Role theo loại: card/slicer=Values · cardVisual=Data · line/area/combo=Category/Y/Series · pivotTable=Rows/Columns/Values. Field type: Measure | Column. Trả về: đường trang mới + việc cần làm tay (mở lại Power BI để nghiệm thu).

Inputs: kit_dir (required), page_spec (required), report_path (required). Returns: result

describe_tableA

Mô tả 1 bảng: danh sách cột (tên + kiểu dữ liệu) và các measure đặt trong bảng đó.

  • port / model_id: lấy từ list_local_reports.

  • table_name: tên bảng (lấy từ list_tables).

Inputs: port (required), model_id (required), table_name (required). Returns: result

distill_model_schemaA

Trích xuất cấu trúc mô hình dữ liệu (bảng, cột, quan hệ, measure) của báo cáo Power BI Desktop đang mở thành tài liệu Markdown blueprint (kèm sơ đồ Mermaid ERD) để Agent tham chiếu khi viết DAX / thiết kế báo cáo.

  • port / model_id: để trống sẽ tự dò (nếu chỉ có 1 báo cáo đang mở).

  • output_filename: tên file .md (mặc định 'distilled_model_<model_id>.md').

  • output_dir: thư mục ghi; mặc định env POWERBI_DISTILL_DIR hoặc <thư mục dự án>/distilled/. LƯU Ý: schema model có thể nhạy cảm (tên bảng/cột/công thức nghiệp vụ) — đừng ghi vào repo public.

Inputs: port, model_id, output_dir, output_filename. Returns: result

distill_report_designA

Quét TOÀN BỘ báo cáo PBIR (mọi trang + theme + report settings) thành bộ hồ sơ thiết kế: REPORT_CATALOG.md (Report→Page→Visual) + DESIGN.md (theme/palette/canvas/nền/kiểm kê)

  • theme/*.json (import lại được). CHỈ ĐỌC báo cáo nguồn.

  • report_path: file .pbip, folder *.Report, hoặc folder definition.

  • project: tên dự án trong Knowledge Dir → ghi vào projects//design/ (mặc định).

  • out_dir: ghi đè đích ra folder tùy ý (bỏ qua Knowledge Dir). Kết hợp distill_model_schema (model) = trọn bộ hồ sơ 1 project. LƯU Ý: hồ sơ chứa binding nghiệp vụ thật — mặc định lưu Knowledge Dir riêng tư, KHÔNG commit repo.

Inputs: report_path (required), out_dir, project. Returns: result

distill_templateA

Chưng cất 1 trang báo cáo PBIR thành template kit tái dùng (blueprint.md + blocks/*.json verbatim mỗi loại visual + _page.json + kit.json).

  • report_path: file .pbip, folder *.Report, hoặc folder definition.

  • page: GUID trang hoặc displayName chính xác.

  • out_dir: thư mục ghi kit — mặc định nên là templates/ trong THƯ MỤC DỰ ÁN (ngoài repo).

  • sanitize: MẶC ĐỊNH True — thay tên bảng/cột/nhãn thật bằng placeholder TEMPLATE_*. Đặt False chỉ khi user nói RÕ kit này dùng nội bộ và chấp nhận giữ tên nghiệp vụ thật. Mặc định phải an toàn: kit từng lọt tên measure thật của khách ra bản public vì an toàn phụ thuộc vào việc người gọi nhớ bật cờ. CHỈ ĐỌC — không sửa báo cáo nguồn.

Inputs: page (required), out_dir (required), report_path (required), kit_name, +1 more. Returns: result

execute_dax_localA

Thực thi một truy vấn DAX trực tiếp lên báo cáo Power BI Desktop đang mở.

  • port: Cổng kết nối (ví dụ: '51234')

  • model_id: Tên catalog/model ID lấy từ công cụ list_local_reports

  • dax_query: Câu lệnh DAX (ví dụ: 'EVALUATE SUMMARIZECOLUMNS(...)')

  • max_rows: Số dòng tối đa trả về (mặc định 1000; kết quả có cột dimension bị siết còn 200 khi policy aggregate-only bật). Đặt 0 để bỏ giới hạn mềm. LƯU Ý POLICY: mặc định chặn dump bảng thô (EVALUATE 'Bảng' / ALL()) và cột trong PII blocklist.

Inputs: port (required), model_id (required), dax_query (required), max_rows. Returns: result

execute_dax_serviceA

Truy vấn dữ liệu từ Dataset đã xuất bản trên Cloud Power BI Service thông qua REST API.

  • dataset_id: Mã GUID của dataset cần truy vấn.

  • dax_query: Câu lệnh DAX (ví dụ: 'EVALUATE SUMMARIZECOLUMNS(...)')

  • max_rows: Số dòng tối đa trả về (mặc định 1000; siết 200 khi kết quả có cột dimension). LƯU Ý POLICY: như execute_dax_local.

Inputs: dax_query (required), dataset_id (required), max_rows. Returns: result

init_projectA

Tạo folder dự án mới projects/<slug>/ trong Knowledge Dir (+ artifacts/ + design/), đăng ký INDEX + TIMELINE. MỌI file agent tạo trong dự án (tài liệu, artifact, distill) mặc định lưu vào folder này. Trả về đường dẫn để dùng cho các bước sau.

Inputs: name (required). Returns: result

knowledge_statusA

Kiểm tra Knowledge Dir (workspace basic hoặc trạm ngoài) đã thiết lập chưa + tóm tắt hiện trạng. GỌI TOOL NÀY ĐẦU TIÊN trước mọi quy trình tri thức (/pbi-new, /pbi-scan, /pbi-done, /pbi-pack, /pbi-recall).

Inputs: no named parameters. Returns: result

list_local_reportsA

Liệt kê các báo cáo Power BI Desktop đang mở trên máy tính kèm thông tin cổng kết nối.

Inputs: no named parameters. Returns: result

list_tablesA

Liệt kê các bảng trong model đang mở (đã lọc bảng hệ thống LocalDateTable/DateTableTemplate).

  • port / model_id: lấy từ list_local_reports.

Inputs: port (required), model_id (required). Returns: result

list_templatesA

Liệt kê các template kit báo cáo có sẵn (repo report-templates/ + env POWERBI_TEMPLATES_DIR). Mỗi kit gồm: blocks (visual.json verbatim theo loại), blueprint, page settings, design tokens.

Inputs: no named parameters. Returns: result

log_timelineA

Ghi 1 dòng vào TIMELINE.md (append-only): dự án + sự kiện + bài học/sản phẩm + link. Dùng khi: đóng dự án, sinh kit mới, rút bài học, mốc quan trọng.

Inputs: event (required), project (required), link, lesson. Returns: result

setup_knowledgeA

Thiết lập thư mục dự án tại path; mặc định là workspace/ trong checkout. Nếu chọn nơi khác, phải là thư mục ngoài vùng source của repo.

Con trỏ ghi thành 1 dòng POWERBI_PROJECT_DIR trong station/config.env (có backup). Dựng skeleton: projects/ · knowledge/ 4 trục · templates/ · INDEX.md · TIMELINE.md. Idempotent.

Inputs: path. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions: local vs service DAX, list vs describe, and template list vs distill vs apply are well separated. The main ambiguity is among the three distill_* tools and the knowledge/project meta-tools, though their descriptions do differentiate them.

    Naming Consistency4/5

    Tool names use snake_case consistently, and almost all follow a verb_noun pattern (list_tables, execute_dax_local, add_measure_local). Minor deviations exist, such as knowledge_status (noun_status) and the near-synonyms setup_knowledge / init_project.

    Tool Count3/5

    At 16 tools, the set sits at the start of the heavy/borderline range beyond the typical 3-15 sweet spot. Each tool appears purposeful, but several niche knowledge/project and distill tools make the surface feel somewhat large for the core Power BI agent scope.

    Completeness3/5

    Core local DAX, modeling creation, template, and knowledge workflows are covered, but notable gaps remain. There is no discovery for cloud workspaces/datasets even though execute_dax_service requires a dataset GUID, and no delete/update operations for relationships or report pages.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    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