Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Power BI Consumption MCP server is a remote-hosted endpoint where AI agents chat with data in Power BI semantic models by using natural language. Built on the Model Context Protocol (MCP), it translates your prompts into Power BI operations, generating DAX queries and executing them while respecting your permissions and security policies.
To create or change semantic models instead of querying them, see Power BI Authoring MCP server.
This article shows you how to:
- Connect to the remote Power BI MCP server in Visual Studio Code
- Connect GitHub Copilot to your Power BI semantic models
- Validate the connection with test queries
Important
For semantic model consumption, prefer to use the Fabric IQ MCP server. Fabric IQ is the primary MCP server for bringing trusted business data and context from Power BI semantic models and reports into AI clients. This article covers the earlier Power BI MCP consumption endpoint, which is in preview.
Prerequisites
- Administrator approval - Your Power BI admin must enable the tenant setting: "Users can use the Power BI Model Context Protocol server endpoint (preview)"
- Visual Studio Code - Download VS Code
- GitHub Copilot - Enable GitHub Copilot in VS Code
- Semantic model access - Build permissions on at least one Power BI semantic model
- (Recommended) Optimized models - Prepare your semantic models for AI to improve query generation quality
Set up in VS Code
The remote Power BI MCP server is available at:
https://api.fabric.microsoft.com/v1/mcp/powerbi
Quick installation (recommended)
The easiest way to configure the server is by using the one-click installer:
This installer automatically configures the MCP server in your VS Code settings.
Manual installation
To manually configure the server, add the following code to your MCP configuration file:
{
"servers": {
"powerbi-remote": {
"type": "http",
"url": "https://api.fabric.microsoft.com/v1/mcp/powerbi"
}
}
}
Learn more: MCP servers in VS Code
Test your Power BI MCP server connection
After configuration, verify that the setup works:
Start the MCP server in VS Code
- Open the MCP servers panel
- Ensure the Power BI MCP server shows as connected
Open GitHub Copilot
- Launch the chat window in VS Code
- Enable agent mode
Provide your semantic model ID
- Get your semantic model ID from the Power BI service (see Find your semantic model ID)
- Share the ID with Copilot in your conversation
Ask a question
- Example: "What tables are in this semantic model?"
- Example: "Show me the top 10 products by sales"
Authorize the tool
- When prompted, allow Copilot to use the MCP server tool
- Authenticate with your Microsoft credentials if requested
Review the response
- Copilot queries your model and returns results
Tip
For best query results, prepare your semantic models for AI by adding AI instructions and verified answers.
Troubleshooting: Manage MCP servers in VS Code
Available Power BI MCP server tools
The remote Power BI MCP server provides the following tools for AI agents to invoke: Execute Query, Get Semantic Model Schema, Get Report Metadata, and Generate Query. The following sections describe each tool.
Execute Query tool
The Execute Query tool runs a DAX query against a Power BI semantic model and returns the results to the AI agent.
Required inputs:
- Semantic model ID
- DAX query expression
Permissions:
- You must have at least Build permissions on the semantic model
- Queries execute in the context of the authenticated user
Security considerations:
- Row-level security (RLS) applies to user authentication
- Service principal authentication doesn't currently support RLS
See also: Execute Queries REST API
Get Semantic Model Schema tool
The Get Semantic Model Schema tool retrieves comprehensive metadata for a Power BI semantic model, including tables, columns, measures, relationships, and any AI-optimized metadata that the model author configured. Use this tool to ground DAX query generation in the structure of the model and to surface author-provided guidance that improves query accuracy.
Required input: Semantic model ID
What's included:
- Tables, columns, measures, and relationships
- Data types and hierarchies
- Copilot tooling metadata, when configured, which provides more context about your model, helps guide Copilot to the right data in the model, and helps increase the quality of Copilot output.
Get Report Metadata tool
The Get Report Metadata tool retrieves the high-level schema of a Power BI report, including workspace information, semantic model details, pages, visual information, and filters. Reports reveal how a report uses the semantic model in practice and can clarify the intended context, relationships, and filtering logic that should guide DAX query generation. Use this tool to ground DAX query generation in the structure of the model schema that the report uses and to surface author-provided guidance that improves query accuracy.
Required input: Report ID
What's included:
- Pages in the report, regardless of hidden state
- Visuals with valid model schema references, including charts, tables, matrices, slicers, and cards. The tool excludes non-data visuals such as action buttons, shapes, images, and rectangles.
- Hidden columns and measures when visuals reference them
- Visual bindings that map fields to visual roles such as Category, Values, Legend, and Tooltips
- Textbox content from each page
Limits:
- Requests fail when the report metadata exceeds the maximum supported size.
Generate Query tool
The Generate Query tool uses Copilot in Power BI to create optimized DAX queries from natural language prompts. The tool uses the same DAX generation engine as Copilot for Power BI to create queries that follow best practices.
Required inputs:
- Semantic model ID
- Natural language question or prompt
- Relevant schema context that the agent determines (tables, columns, measures)
Requirements:
- Copilot license for you or your organization
Note
If you prefer not to consume Copilot capacity, disable this tool in your MCP client configuration and rely on your client's LLM to generate DAX directly.
Find your semantic model ID
To get a semantic model ID from the Power BI service:
- Sign in to Power BI
- Navigate to the workspace containing your semantic model
- Select the semantic model to open its details page
- Copy the semantic model ID from the URL
Semantic model URLs follow this format:
https://app.powerbi.com/groups/{workspaceId}/datasets/{semanticModelId}
Tip
- Store frequently used model IDs where your agent can access them like a
semantic-model-ids.jsonlocal file or agent instruction files. - You can also retrieve semantic model IDs programmatically by using the Power BI REST API.
Limitations and considerations
Authentication and security
- Row-level security (RLS): Power BI doesn't enforce RLS when you use service principal authentication. When a service principal runs queries, it can access all data that the principal is authorized to access. Carefully review security implications before you expose service principal-authenticated agents to end users.
- Tenant settings: Administrators must enable "Users can use the Power BI Model Context Protocol server endpoint (preview)" for your organization.
Query generation
- Complex DAX: Highly complex calculations or nested logic might not translate perfectly from natural language prompts.
- Model optimization: Query generation quality improves significantly when you prepare your data for AI.
Performance
- Model design impact: Query execution performance depends on semantic model design, size, and optimization.
- Large schemas: Models with hundreds of tables or thousands of columns might result in large schema payloads.
- Query complexity: Complex DAX queries might take longer to generate and execute.
Context and conversation
- Context window limits: The AI model your MCP client uses limits how much context it can maintain across conversation turns.
- Stateless queries: Each query executes independently. The server doesn't maintain query state between requests.