How to Use MCP Servers with Power BI
Connect AI clients to Power BI with hosted or local MCP servers, query semantic models safely, and automate model authoring with clear setup steps.
Short answer: choose the MCP workflow that matches your goal. Use the Power BI Authoring MCP server to create or change semantic-model objects and run DAX. Use Fabric IQ for Microsoft’s primary current path to bring trusted Power BI model and report context into AI clients. The older Power BI Consumption MCP endpoint remains documented as a preview integration.
MCP (Model Context Protocol) gives an AI client a standard way to discover and call tools exposed by a server. With Power BI, that means an agent can inspect a semantic model, run queries, and—when you use the Authoring server with sufficient permissions—create, update, or delete model objects. It does not edit report pages or semantic-model diagram layouts.
1. Decide whether you need authoring or analysis
Power BI MCP is not one single connection. Start by identifying the operation you need:
| Goal | Recommended route | What it can do |
|---|---|---|
| Change a semantic model | Power BI Authoring MCP server | Create, update, and delete tables, columns, measures, relationships, hierarchies, calculation groups, partitions, and security roles; run and validate DAX. |
| Ask questions of existing data | Fabric IQ | Bring trusted business data and context from Power BI semantic models and reports into AI clients. |
| Use an existing preview integration | Power BI Consumption MCP endpoint | Execute queries, retrieve schema and report metadata, and generate queries. |
Microsoft’s MCP overview identifies Fabric IQ as the primary consumption route. The Consumption endpoint is still useful when your client or integration already targets its preview tools.
2. Hosted versus local Authoring MCP
| Decision | Hosted server | Local server |
|---|---|---|
| Best fit | Fabric workspace semantic models | Power BI Desktop models, PBIP/TMDL files, local development, or service-principal workflows |
| Transport | Streamable HTTP | stdio |
| Authentication | Microsoft Entra ID as the signed-in user | Interactive Entra ID or service principal |
| Installation | None; Microsoft manages updates | You install and update the extension, package, or executable |
| Distinct capabilities | Fabric workspace models | Desktop/PBIP file access, transactions, and Analysis Services traces |
| Gate for workspace models | Fabric administrator enables the preview tenant setting | Capacity XMLA endpoint must be Read Write |
Microsoft recommends the hosted server when your environment supports it because there is nothing to install and Microsoft manages updates. Register only one Authoring server in a client: hosted and local servers expose overlapping tools, which can make agent selection ambiguous and add request overhead.
3. Prerequisites and permissions
- An MCP-capable client running in agent mode.
- Access to the target workspace and semantic model.
- For hosted Authoring: a Fabric administrator must enable Users can use the Power BI Model Context Protocol server endpoint (preview).
- For Authoring changes: Write permission is required. Build permission alone permits DAX queries.
- For a local connection to a Fabric workspace model: the capacity XMLA endpoint must be set to Read Write.
- For Consumption setup: follow the documented administrator approval and client requirements; the example uses VS Code with GitHub Copilot in agent mode and Build permission on at least one semantic model.
4. Configure the Authoring server
Hosted workflow
- Ask the Fabric administrator to enable the preview MCP server endpoint tenant setting.
- In your MCP client, add the hosted Authoring server using Microsoft’s client-specific setup instructions.
- Sign in with the Entra account that has access to the workspace and model.
- Tell the agent the exact workspace and semantic-model names. Avoid relying on a display-name guess when several models are similar.
Local workflow
- Install the local Authoring MCP package or executable using the setup path for your client. Microsoft documents an
npxinstallation example; the exact command and configuration depend on the client and environment. - Choose interactive Entra sign-in or configure a service principal.
- Identify the Power BI Desktop file or PBIP/TMDL definition folder to edit.
- If targeting a Fabric workspace model, verify the capacity XMLA endpoint is Read Write.
Keep local PBIP/TMDL work in source control where practical. This gives you a reviewable diff and a straightforward rollback path.
5. Smoke-test the connection safely
Start with read-only requests before allowing edits. A useful first prompt is:
Connect to the Power BI semantic model named "Sales Model" in workspace "Finance".
List the tables, columns, measures, relationships, and security roles.
Do not change anything.
Confirm that the returned model is the intended one. Then run a narrow DAX query and inspect its result:
Run a read-only DAX query that returns the top 10 products by revenue
for the latest available month. Show the generated DAX before execution.
The Authoring DAX execution tools have a hard limit of 100,000 rows. Aggregate or filter results before requesting them when you approach that limit.
6. Make a controlled model change
- Back up the model or commit the current PBIP/TMDL state.
- Describe one change precisely, including the object name, expression, and intended behavior.
- Ask the agent to show the proposed DAX or metadata operation before applying it.
- Apply the change with the least-privileged identity that can perform it.
- Re-read the affected tables, measures, relationships, or roles.
- Run validation queries and inspect the source-control diff where available.
In the connected model, propose a measure named Gross Margin:
DIVIDE([Revenue] - [Cost], [Revenue]).
Show the exact expression and affected table. Wait for approval before creating it.
After creation, run a validation query for the latest month.
The Authoring server operates on model objects. It does not modify report pages, visual placement, or diagram layouts, so those tasks still require the appropriate Power BI authoring tools.
7. Query existing data with Fabric IQ or Consumption MCP
For analysis, begin with Fabric IQ guidance. If you use the documented Consumption preview endpoint, its tools include:
- Execute a query.
- Retrieve semantic-model schema.
- Retrieve report metadata.
- Generate a query.
The Generate Query tool uses Copilot’s DAX generation engine and requires a Copilot license for the user or organization. A client can disable that tool and generate DAX with its own LLM instead.
Use explicit model context in every request:
Use semantic model "Sales Model" in workspace "Finance".
First retrieve the schema. Then write DAX for monthly revenue by region.
Show the DAX, explain filters and grouping, and execute only after validation.
Consumption queries are independent and stateless. Query quality depends on model preparation and logic complexity, while response time is affected by model size, design, and query complexity.
8. Authentication and security decisions
- Hosted Authoring authenticates as the signed-in Entra user.
- Local Authoring supports interactive Entra authentication or a service principal.
- MCP tools act within the connected identity’s Fabric RBAC permissions, but an autonomous client can still make destructive changes. Use least privilege, approval gates, and a security review.
- Model metadata and query results enter the MCP client conversation and may be processed by the LLM provider selected by that client. Check your organization’s data-handling requirements.
- For the Consumption endpoint, Microsoft documents that Power BI does not enforce row-level security when service-principal authentication is used for queries; the principal can access data it is authorized to access. Assess this carefully before exposing such an agent to end users.
9. Reliability, performance, and cost considerations
Reliability checklist
- Use one Authoring deployment per client to avoid ambiguous tool selection.
- Name the workspace and model explicitly.
- Begin each session with a read-only schema or table listing.
- Back up before changes and keep PBIP/TMDL under version control when suitable.
- For the Consumption preview endpoint, preserve the documented stable MCP session header. Clients that fail to return
mcp-Session-Idmay start a new session on every call.
Performance checklist
- Request only the columns and rows needed.
- Aggregate in DAX instead of asking the agent to return raw high-cardinality data.
- Keep generated-query prompts specific about date ranges, dimensions, and measures.
- Expect complex natural-language requests to need human review and refinement.
- Remember the Authoring DAX tool’s 100,000-row limit.
Cost checklist
MCP itself is a connection pattern; your total cost depends on Power BI/Fabric capacity, Copilot or LLM licensing, and the MCP client and identity setup your organization uses. The Microsoft documentation in this guide does not establish a universal per-query MCP price.
10. Troubleshooting common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Hosted server is unavailable | Fabric preview tenant setting is disabled | Ask a Fabric administrator to enable the Power BI Model Context Protocol server endpoint preview setting. |
| Agent can query but cannot create a measure | User has Build permission but not Write | Grant the minimum required Write permission or keep the workflow read-only. |
| Local workspace operation fails | XMLA endpoint is Read Only | Use a capacity with XMLA set to Read Write, or work against local Desktop/PBIP files. |
| Agent edits the wrong model | Workspace or model was not identified uniquely | Specify exact workspace and semantic-model names and perform a read-only listing first. |
| Consumption calls create a new session | Client does not return mcp-Session-Id |
Configure the client to preserve and return the stable session header required by the documented remote setup. |
| Generated DAX is wrong for a complex question | Natural-language ambiguity or an underprepared model | Inspect the DAX, clarify measures and filters, retrieve schema first, and validate with a smaller query. |
| Query returns too many rows | Authoring DAX limit exceeded | Filter, group, or aggregate to stay below 100,000 rows. |
| Report page cannot be changed | Authoring MCP does not edit report pages or diagram layouts | Use Power BI report-authoring tools for page and visual changes. |
11. Capture a Power BI report image without maintaining browser automation
If your workflow needs a static preview of a published report or documentation screenshot, ScreenshotNeo is the first screenshot API to try: it removes consent banners, popups, and chat widgets before capture, bills only clean shots, and has the lowest paid plan.
Or skip the browser setup
One GET request returns a PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation for all options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://app.powerbi.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://app.powerbi.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://app.powerbi.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are never billed, and response headers identify the page verdict and billing state. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
12. Practical operating checklist
- Choose Authoring, Fabric IQ, or Consumption based on the job.
- Use hosted Authoring where supported; use local for Desktop, PBIP/TMDL, traces, transactions, or service principals.
- Enable required tenant and XMLA settings.
- Confirm permissions before asking for edits.
- Identify the exact workspace and model.
- Run a read-only smoke test.
- Back up, preview generated DAX, and review diffs.
- Limit result size and protect session headers.
- Review identity, row-level-security, and LLM data-handling implications.
FAQ
Can MCP edit Power BI report visuals?
The Authoring MCP server edits semantic-model objects, not report pages or diagram layouts.
Is hosted Authoring or local Authoring better?
Hosted is the recommended choice for supported Fabric workspace models. Local is appropriate for Desktop and PBIP/TMDL files or local-only capabilities.
Do I need Write permission to run DAX?
No. Build permission supports DAX queries; Write is required to change model objects.
What happens if a DAX result is larger than 100,000 rows?
The Authoring DAX tools have a hard 100,000-row limit, so aggregate or filter the query.
Which MCP route should new data-analysis integrations use?
Microsoft currently identifies Fabric IQ as the primary route for bringing trusted Power BI data and context into AI clients; Consumption MCP remains a documented preview option.


