Skip to content
/

pbip-demo-agentic-mcp

pbip-demo-agentic-mcp · RuiRomano/pbip-demo-agentic-mcp · ★ 30 · last commit 2025-09-26

Demonstrates spec-first Power BI semantic model development using powerbi-modeling-mcp with BPA-enforced quality loops.

Best whenPower BI agentic development requires a mandatory spec review gate and an iterative BPA quality loop — without both, agents produce technically valid but arc…
Skip ifImplementing directly without a spec, Running DAX queries in PBIP offline mode
vs seeds
kiro(spec-first with human review gate before implementation) but without IDE primitives — purely a methodology doc with KB …
Primitive shape 1 total
MCP tools 1
00

Summary

pbip-demo-agentic-mcp — Summary

pbip-demo-agentic-mcp is a demonstration repository showing how to build Power BI Projects (PBIP) agentically using the powerbi-modeling-mcp MCP server (currently in private preview from Microsoft). The repo does not ship a plugin or skills package; it ships a structured workflow template: a .kb/ folder with Power BI development knowledge bases, a .bpa/ folder with Best Practice Analysis scripts, a .input/ folder with prompt templates and requirements, and a template report. The core workflow is spec-first: the agent produces a dev-spec.md for review before any implementation, then implements against BPA rules iteratively until all critical violations are resolved. With only 30 stars and last commit in September 2025, this is a Tier A entry primarily as a demonstration of the powerbi-modeling-mcp private-preview tooling.

Differs from seeds: Closest to kiro (spec-first: requirements → spec → implementation) but without an IDE, hooks, or primitive system. The BPA iterative loop (execute → check violations → fix → re-execute until clean) mirrors kiro's steering file pattern but uses a shell script rather than IDE hooks.

01

Overview

pbip-demo-agentic-mcp — Overview

Origin

Created by Rui Romano, a Microsoft employee working on Power BI tooling. The repo demonstrates integration with powerbi-modeling-mcp, a private-preview MCP server from Microsoft. Licensed MIT.

Philosophy

"Agentic development is a new paradigm where developers shift from writing code or using UI applications to guiding intelligent agents. The developer defines the what — the requirements, rules, and intent — and the AI agent handles the how — generating specs, implementing the model, running validations, fixing issues, and iterating toward a working solution."

The workflow is described as analogous to reviewing a teammate's pull request: the developer specifies requirements, reviews the generated spec, says GO, and then reviews the result in Power BI Desktop. The BPA script acts as automated CI for Power BI model quality.

Key Dependency

powerbi-modeling-mcp (Microsoft, private preview) — an MCP server that exposes Power BI modeling operations to AI agents. Without this MCP server, the workflow cannot run. Users must sign up via a Microsoft Forms link.

End-to-End Demo

YouTube walkthrough linked in README: demonstrates the full workflow from prompt to implemented Power BI model.

02

Architecture

pbip-demo-agentic-mcp — Architecture

Distribution

Standalone repository — clone and use as a template. No plugin, no npm package.

Install

  1. Clone the repo
  2. Install VS Code + GitHub Copilot (or any MCP-compatible agent)
  3. Sign up for powerbi-modeling-mcp private preview (Microsoft Forms)
  4. Configure the MCP server in your agent settings

Directory Tree

.
├── .bpa/
│   ├── bpa-rules-report.json          # Best Practice Analysis rules for reports
│   ├── bpa-rules-semanticmodel.json   # BPA rules for semantic models
│   └── bpa.ps1                        # PowerShell BPA runner script
├── .input/
│   ├── AzureSQLSchema.csv             # Sample data schema
│   ├── prompt.md                      # Template prompt for the agent
│   └── requirements.md                # Sample requirements document
├── .kb/
│   ├── powerbi-modeling-kb.md         # Semantic model development guidelines
│   ├── powerbi-pbip-kb.md             # PBIP file structure and implementation phases
│   └── templateReport/                # Template report files
├── README.md
└── LICENSE

Required Runtime

  • VS Code (or any MCP-compatible coding agent)
  • GitHub Copilot in Agent mode (or Claude Code, Cursor)
  • powerbi-modeling-mcp (private preview, stdio MCP server)
  • PowerShell (for .bpa/bpa.ps1)
  • Power BI Desktop (for viewing results)

Target AI Tools

Not tool-specific — any agent supporting MCP tools and Agent mode.

03

Components

pbip-demo-agentic-mcp — Components

Skills

None. This repo does not use the Claude Code skill format.

Agents

None. No agent definition files.

Hooks

None.

Knowledge Base Files (.kb/)

File Purpose
powerbi-pbip-kb.md PBIP implementation phases (Prepare, Semantic Model, BPA enforcement, Report), file structure templates, JSON examples
powerbi-modeling-kb.md Semantic model development rules: naming conventions, DAX patterns, model best practices
templateReport/ Template report files to copy-in during Phase 4

BPA Scripts (.bpa/)

File Purpose
bpa.ps1 PowerShell script: runs Best Practice Analysis on .SemanticModel folder; invoked as .bpa/bpa.ps1 -src [path]
bpa-rules-semanticmodel.json BPA rule definitions for semantic models
bpa-rules-report.json BPA rule definitions for reports

Input Templates (.input/)

File Purpose
prompt.md Template prompt instructing agent: create PBIP, follow .kb/powerbi-pbip-kb.md, write dev-spec.md first
requirements.md Sample requirements document (Adventure Works company)
AzureSQLSchema.csv Sample data schema for grounding

MCP Server (external dependency)

powerbi-modeling-mcp — Microsoft private preview MCP server exposing Power BI modeling operations. The agent is instructed to use batch tools to minimize round-trips.

05

Prompts

pbip-demo-agentic-mcp — Prompt Excerpts

Excerpt 1: .input/prompt.md — Agent task definition

Technique: Spec-first directive with explicit work boundary; KB reference is mandatory before implementation.

# Tasks 🧑‍💻

- **Create a new Power BI Project (PBIP)** for the `Adventure Works` company that answer the requirements in document `requirements.md`.
- **Strictly follow the development guidelines in `.kb/powerbi-pbip-kb.md`** (Be sure to review any referenced KB documents included in this document).
- **Don't implement the project directly!** Start with a good technical **development spec** document with name `dev-spec.md` for my review.
- **All source code and created documents should go to the `src/` folder**. Do not work outside of that folder.

Excerpt 2: .kb/powerbi-pbip-kb.md — Phase 1 MCP check

Technique: Hard dependency check — agent must stop if MCP server unavailable.

### Phase 1: Prepare environment
1. **Critical**: Make sure **powerbi-modeling-mcp** is available and is used for model development. If not, stop and prompt the user to install it. Learn about the **powerbi-modeling-mcp** tools and always prioritize using Batch tools. For example, when creating objects always try to create them in batches to minimize round-trips.
2. Create the Power BI Project (PBIP) folder structure as explained in [PBIP file structure](#pbip-file-structure)
3. Because its PBIP development, there is no Analysis Services server. Therefore: cannot run DAX queries to test data; cannot run refresh commands; its ok to have partitions in `NoData` state.

Excerpt 3: .kb/powerbi-pbip-kb.md — Phase 3 BPA loop

Technique: Iterative enforcement loop with exit condition.

### Phase 3: Enforce Semantic Model Best practices
1. Ensure the application of the semantic model best practices in `powerbi-modeling-kb.md`.
2. **Critical:** Execute the Best Practice Analysis script `.bpa/bpa.ps1` with arguments `-src [SemanticModel folder path]`. Keep executing the script until all critical errors are resolved. On each iteration, serialize the semantic model back to the `*.SemanticModel/definition/` folder.
09

Uniqueness

pbip-demo-agentic-mcp — Uniqueness

Differs from Seeds

Closest to kiro (spec-first: requirements → review → implement) but without IDE primitives, hooks, or a skills system. The BPA loop (agent self-invokes a script repeatedly until quality gates pass) is functionally similar to taskmaster-ai's iterative task expansion, but domain-specific to Power BI model quality. Unlike any seed, this repo's value is the .kb/ knowledge base files — the entire Power BI PBIP implementation methodology in two markdown files that any agent can consume. The powerbi-modeling-mcp dependency ties the workflow to a private-preview Microsoft server, making it the only entry in this batch that depends on vendor-controlled private infrastructure.

Positioning

A reference template for Power BI developers wanting to explore agentic semantic model development. Primary audience is Power BI/Fabric developers at Microsoft or large enterprises with access to the private-preview powerbi-modeling-mcp. Not a general-purpose tool.

Observable Failure Modes

  1. Private preview dependency: powerbi-modeling-mcp is not publicly available; any user without access cannot use the workflow.
  2. PowerShell-only BPA: The .bpa/bpa.ps1 script works only on Windows with the appropriate Power BI tooling installed.
  3. No skill format: The KB files are markdown documents, not Claude Code skills — they cannot be loaded on-demand and must be referenced explicitly in prompts.
  4. No validation of scope boundary: The agent is instructed to work only in src/ but there is no technical enforcement (no sandbox, no hook).

Explicit Antipatterns

  • Implementing directly without creating a spec first
  • Running DAX queries or model refresh (unavailable in PBIP offline mode)
  • Working outside the src/ folder
  • Not checking powerbi-modeling-mcp availability before starting
04

Workflow

pbip-demo-agentic-mcp — Workflow

Phases

Phase Name Activity Artifact
0 Requirements User writes requirements + schema requirements.md, AzureSQLSchema.csv
1 Spec generation Agent reads requirements + KB, creates spec src/dev-spec.md
2 Human review Developer reviews spec
3 GO signal User says "GO"
4 Prepare environment Agent verifies powerbi-modeling-mcp available; creates PBIP folder structure PBIP folder skeleton
5 Semantic model implementation Agent creates tables, columns, relationships, measures .SemanticModel/definition/ TMDL files
6 BPA enforcement loop Agent runs .bpa/bpa.ps1 -src [path]; fixes critical violations; repeats until clean Clean semantic model
7 Report implementation Agent copies template report, adapts visuals to model .Report/definition/ PBIR files
8 Human review Developer opens in Power BI Desktop

Approval Gates

  1. Spec review (Phase 2): Human reviews dev-spec.md before implementation begins. This is a deliberate human gate.
  2. GO signal (Phase 3): Explicit user confirmation required to proceed.
  3. BPA clean (Phase 6): Automated loop — agent repeats until no critical BPA violations remain.

Spec Format

Markdown (dev-spec.md) — human-readable, reviewable, adjustable.

Iterative Loop

The BPA enforcement loop is the key automated quality gate:

execute .bpa/bpa.ps1 → check violations → fix → serialize model → repeat until no critical errors

Storage

All output goes to src/ folder. The .kb/ and .bpa/ folders are read-only references; the agent is instructed never to work outside src/.

06

Memory Context

pbip-demo-agentic-mcp — Memory & Context

State Storage

No persistent memory. Project state lives in PBIP files under src/.

Context Injection

  • .kb/powerbi-pbip-kb.md — loaded at session start (referenced in prompt)
  • .kb/powerbi-modeling-kb.md — loaded when working on semantic model
  • .bpa/bpa-rules-*.json — consumed by bpa.ps1 script, not directly by the agent

Cross-Session Handoff

dev-spec.md serves as the human-reviewable handoff document between spec generation and implementation.

Compaction Handling

None.

Grounding Documents

.input/AzureSQLSchema.csv provides the data schema as grounding context for the agent to avoid hallucinating table/column names.

07

Orchestration

pbip-demo-agentic-mcp — Orchestration

Multi-Agent Pattern

None. Single agent.

Execution Mode

Sequential — phase-by-phase: spec → review gate → implement → BPA loop → report.

Isolation Mechanism

None. Work is confined to src/ by prompt instruction, not technical enforcement.

Multi-Model

No. Single model, whatever the agent session uses.

Auto-Validators

  • BPA loop: PowerShell script bpa.ps1 run by the agent itself — not a hook, but an agent-driven iterative loop. Counts as an agent-invoked auto-validator.

Prompt Chaining

Yes — the spec dev-spec.md output from Phase 1 is the input document for Phase 4 implementation.

Consensus Mechanism

None.

MCP Tool Usage

The powerbi-modeling-mcp server provides Power BI modeling operations. The agent is instructed to use batch tools to minimize round-trips — an explicit performance instruction for MCP-heavy workflows.

08

Ui Cli Surface

pbip-demo-agentic-mcp — UI / CLI Surface

CLI Binary

None.

Local UI

None.

IDE Integration

  • VS Code (recommended in README) with GitHub Copilot in Agent mode
  • Any MCP-compatible agent works (Claude Code, Cursor also mentioned)

Observability

None.

Target Agent Surface

The only "surface" is the template prompt in .input/prompt.md — a single prompt the developer pastes into their agent chat. The repo is a template, not an installed tool.

Related frameworks

same archetype · same primary tool · same memory type

Context-Engineering Handbook ★ 9.0k

Provides a first-principles, research-grounded vocabulary and learning path for context engineering — the discipline of designing…

walkinglabs/learn-harness-engineering ★ 6.6k

Teach harness engineering from first principles (12 lectures + 6 projects) and provide a scaffolding skill (harness-creator) that…

Awesome Harness Engineering (walkinglabs) ★ 2.7k

Curate the authoritative reference list of articles, benchmarks, and tools for harness engineering — the practice of shaping the…

cline-memory-bank (nickbaumann98) ★ 581

Custom instructions + 6-file hierarchical Markdown memory bank so Cline maintains full project context across sessions, with a…

FPF (First Principles Framework) ★ 372

Provides a formal pattern language for making reasoning explicit, traceable, and publishable in mixed human/AI engineering work —…

nexu-io/harness-engineering-guide ★ 134

Provide a practical, code-first reference guide to harness engineering — from first principles to production patterns —…