The remote Power BI MCP (Model Context Protocol) server is a game-changer for data professionals and AI developers. It enables AI agents—like GitHub Copilot, Azure AI Foundry, and custom AI assistants—to query your Power BI semantic models using natural language. Instead of manually writing DAX queries, you can ask Copilot questions like “Show me top 10 products by sales” and get instant results from your semantic model.
This comprehensive blog walks you through setting up the remote Power BI MCP server in Visual Studio Code and connecting it to GitHub Copilot for AI-powered data analysis.
What is Power BI MCP Server?
The Power BI Model Context Protocol (MCP) server acts as a bridge between AI assistants and your Power BI semantic models. Here’s what it enables:
Natural Language Queries: Ask questions about your data in plain English instead of writing DAX
Automated DAX Generation: Copilot generates optimized DAX queries based on your model schema
Schema Retrieval: AI agents understand your tables, columns, measures, and relationships
Query Execution: Get real-time results directly from your semantic model
Integration with AI Tools: Works with GitHub Copilot, Azure AI Foundry, and custom AI agents
Example use cases:
✅ A business analyst asks: “What’s our revenue trend by month?” → Copilot generates and executes the DAX automatically
✅ A data engineer debugs model issues: “Show me all tables with null values” → MCP retrieves schema details
✅ An executive gets insights: “Top 5 customers by profit” → AI queries and visualizes results in seconds
Prerequisites: What You Need Before Starting
Before you set up the remote Power BI MCP server, ensure you have everything ready:
| Requirement | Details | Why It Matters |
|---|---|---|
| Power BI Admin Approval | Your Power BI tenant admin must enable: “Users can use the Power BI Model Context Protocol server endpoint (preview)” | Security & compliance control |
| Visual Studio Code | Download from code.visualstudio.com | IDE for MCP configuration |
| GitHub Copilot | Enable Copilot in VS Code | AI agent for querying models |
| Semantic Model Access | You need Build permissions on at least one Power BI semantic model | Required to query the model |
| Optimized Models (Recommended) | Prepare semantic models for AI by adding AI instructions and descriptions | Improves Copilot query quality |
| Azure AI Foundry (Optional) | For custom agents with Service Principal auth | Advanced scenario for enterprises |
Pro Tip: Start with one well-structured semantic model. If your model has clear naming conventions, descriptions, and AI instructions, Copilot will generate better queries.
Step 1: Understand the Remote MCP Server Endpoint
The remote Power BI MCP server is hosted by Microsoft and available at:
https://api.fabric.microsoft.com/v1/mcp/powerbi
This HTTP endpoint allows any MCP client (GitHub Copilot, Azure AI agents, or custom tools) to connect to your Power BI models without local server setup. Here’s why this matters:
No local installation needed (unlike local MCP server)
Cloud-based & scalable (works across your organization)
Secure (uses Azure AD authentication + your Power BI permissions)
Real-time access (queries your live semantic models)
Step 2: Configure the Remote MCP Server in VS Code
Option A: Quick Installation (Recommended) ⚡
The easiest way is using the one-click installer:
Open VS Code
Press Ctrl + Shift + P (or Cmd + Shift + P on Mac)
Search for “MCP: Configure Server”
Select “Power BI MCP Server (Remote)”
VS Code automatically adds the configuration to your MCP settings
✅ Done! The server is now configured.
Option B: Manual Installation (Advanced)
If the one-click installer doesn’t work, manually add the server:
Open VS Code settings (Ctrl + ,)
Search for “MCP” in settings
Find “MCP: Servers” configuration
Add this JSON block:
{
"servers": {
"powerbi-remote": {
"type": "http",
"url": "https://api.fabric.microsoft.com/v1/mcp/powerbi"
}
}
}
Save the settings
Restart VS Code
Verify configuration: Open the MCP Servers panel in VS Code to confirm “powerbi-remote” appears in the list.
Step 3: Connect GitHub Copilot to Your Power BI Model
Now that the MCP server is configured, connect Copilot to your semantic model:
A. Get Your Semantic Model ID
Go to Power BI Service
Navigate to your workspace and select your semantic model
Click Settings (gear icon, top right)
Copy the Semantic Model ID from the URL or settings panel
URL format:
app.powerbi.com/groups/{workspace-id}/semanticmodels/{model-id}The model ID is the long string at the end
💡 Save this ID – you’ll use it in every Copilot query.
B. Launch Copilot & Enable Agent Mode
Open GitHub Copilot in VS Code (Ctrl + I or Cmd + I)
Type “@copilot” to activate agent mode
Click “Enable Tools” to allow Copilot to use MCP server tools
Paste your semantic model ID in the prompt:
Example prompt:
@copilot Using semantic model ID [your-model-id], what tables are in this model?
Press Enter – Copilot will query your semantic model
Authorize if prompted (sign in with your Microsoft account)
Step 4: Test Your Connection with Example Queries
Once connected, test the setup with these example questions. Copilot should execute queries against your semantic model:
Test Query 1: Understand Your Model Structure
@copilot What tables and measures are available in semantic model [model-id]?
Expected result: Copilot lists all tables, columns, and measures in your model.
Test Query 2: Generate a DAX Query
@copilot Show me the top 10 products by sales revenue using semantic model [model-id]
Expected result: Copilot generates DAX, executes it, and returns results.
Test Query 3: Retrieve Specific Data
@copilot What is the total sales by month for the last 12 months? (semantic model: [model-id])
Expected result: Copilot retrieves the time-series data from your model.
Test Query 4: Debug Model Issues
@copilot Are there any null values or data quality issues in the [model-id] model?
Expected result: MCP analyzes the schema and flags potential issues.
If tests fail: Check the troubleshooting section below.
Optimize Your Semantic Model for Better AI Queries
To get the best results from Copilot + MCP, follow these best practices:
1. Add AI Instructions & Descriptions
Go to Power BI Desktop → Model view
Select each table/column and add a description (e.g., “Sales revenue in USD by transaction date”)
Add AI Instructions for complex measures (Copilot uses these to understand intent)
Example instruction:
"Revenue = Total sales minus returns. Use this for financial reports."
2. Use Clear Naming Conventions
❌ Bad:
Tbl_01,Col_Revenue_USD_2024✅ Good:
Sales,Revenue_USD,Transaction_Date
3. Create Verified Answers
Document common metrics in Copilot’s Verified Answers feature
These appear as reliable results Copilot trusts
Reduces hallucination and improves accuracy
4. Maintain Clean Relationships
Ensure all relationships are properly configured (one-to-many, many-to-one)
Avoid circular dependencies or ambiguous paths
Result: Copilot generates better DAX and provides more accurate insights.
Troubleshooting: Common Issues & Solutions
Issue 1: “MCP Server Not Connected”
Problem: VS Code shows the Power BI MCP server as disconnected.
Solutions:
Restart VS Code (close completely and reopen)
Verify your configuration matches the JSON example above
Check VS Code version (update if outdated)
Restart MCP servers panel: Ctrl + Shift + P → “MCP: Restart Server”
Issue 2: “Unauthorized or Authentication Failed”
Problem: Copilot asks for authentication repeatedly or returns permission errors.
Solutions:
Sign in to Microsoft Account → Copilot will ask for permissions
Check Power BI permissions → Ensure you have Build access to the semantic model
Verify admin approval → Ask your Power BI admin if MCP server endpoint is enabled
Re-authenticate: Sign out and sign in again in VS Code
Issue 3: “Semantic Model ID Not Found”
Problem: Copilot says the semantic model doesn’t exist.
Solutions:
Double-check the model ID (copy from Power BI Service URL)
Verify workspace permissions → You must have access to the workspace
Ensure model is published → The model must be in Power BI Service (not Desktop only)
Refresh in Power BI Service → Sometimes caching causes delays
Issue 4: “Copilot Returns Incorrect Results”
Problem: Copilot’s DAX queries or answers are inaccurate.
Solutions:
Optimize your model (follow the best practices section above)
Add AI instructions to ambiguous measures
Create Verified Answers for critical metrics
Ask more specific questions (be clearer about date ranges, filters, etc.)
Learn more: Manage MCP servers in VS Code
Advanced: Service Principal Authentication (Enterprise Scenario)
For organizations using Service Principal authentication with custom AI agents (not GitHub Copilot), refer to:
This setup allows your enterprise AI agents to query Power BI models programmatically without user interaction.
Real-World Use Cases
Use Case 1: Executive Dashboard Automation
Scenario: An executive asks Copilot, “What are our top markets by revenue?”
Result: MCP queries the semantic model and returns real-time insights without manual queries.
Use Case 2: Data Analyst Productivity
Scenario: A data analyst uses Copilot to generate DAX instead of writing manually.
Benefit: 10x faster query generation + fewer errors.
Use Case 3: Model Governance & QA
Scenario: A BI developer asks, “Are all measures properly documented?”
Result: MCP audits the model schema and flags missing descriptions.
Use Case 4: Self-Service Analytics
Scenario: Business users ask natural language questions about sales data.
Result: Copilot generates and executes queries—no SQL or DAX knowledge needed.
Next Steps
Now that your remote Power BI MCP server is set up and connected to GitHub Copilot, here’s what to explore:
Master Advanced Copilot Queries – Learn how to ask complex multi-table questions
Build Custom AI Agents – Use Azure AI Foundry to create tailored agents for your organization
Implement Verified Answers – Document metrics for enterprise consistency
Monitor MCP Usage – Track query performance and audit logs in Power BI
Explore MCP Tools – Discover all available MCP tools and capabilities
Conclusion
The remote Power BI MCP server transforms how organizations interact with data. By connecting AI assistants to your semantic models, you unlock:
✅ Faster insights – Natural language queries instead of manual DAX
✅ Democratized analytics – Business users get self-service access
✅ Reduced errors – AI generates optimized, tested queries
✅ Enterprise scale – Works across your entire organization

