Forum Discussion
MCP not working
Hello,
I installed the extension of Power BI MCP in vs code . when I try to connect to my open report always receive strange answers.
so is there anything wrong ?
Thank you
Hi ahmedshalabyy12,
Based on your description that the Power BI MCP server extension isn't functioning correctly in VS Code.
So you need to:
- Uninstall the Power BI MCP extension from VS Code
- Close VS Code completely
- Reinstall the extension from Marketplace
- Restart VS Code
Or add this JSON in your VS Code setting
{ "mcp.servers": { "powerbi": { "command": "node", "args": [ "C:/Users/[YourUsername]/.vscode/extensions/powerbi-extension-path/mcp-server.js" ] } } }And if you want it for SSMS you should:
- Open SQL Server Management Studio
- Connect to Server type Analysis Services
- Server - localhost:51345
- This will show your Power BI data model directly
Or you can just use PowerShell (Temporary)
# Connect directly via PowerShell $server = "localhost:51345" $query = "EVALUATE 'YourTableName'" Invoke-ASCmd -Server $server -Query $query
3 Replies
- Ahmed-ElfeelSuper User
Hi ahmedshalabyy12,
Based on the Microsoft Learn resources the MCP technology for Power BI is still evolving and can be unstable You can try:
Close both VS Code and Power BI Desktop completely
Open Power BI Desktop first - wait until fully loaded
Open your .pbix file - ensure it's completely loaded
Open VS Code
Run Command Palette: MCP: Reset Cached Tools
Retry your Power BI connection
Also make sure to note the Power BI Port From:
Power BI Desktop go to Help → About Power BI Desktop
Note the Local Analysis Services port number
- Also test it if it works or not
Test-NetConnection localhost -Port 51345You can check this resource also:
if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.- ahmedshalabyy12Helper V
Thank you Ahmed-Elfeel
I did what you said, but the problem it keeps ignoring my commands and asks me to open the report via SSMS, tabular editor, or PowerShell- Ahmed-ElfeelSuper User
Hi ahmedshalabyy12,
Based on your description that the Power BI MCP server extension isn't functioning correctly in VS Code.
So you need to:
- Uninstall the Power BI MCP extension from VS Code
- Close VS Code completely
- Reinstall the extension from Marketplace
- Restart VS Code
Or add this JSON in your VS Code setting
{ "mcp.servers": { "powerbi": { "command": "node", "args": [ "C:/Users/[YourUsername]/.vscode/extensions/powerbi-extension-path/mcp-server.js" ] } } }And if you want it for SSMS you should:
- Open SQL Server Management Studio
- Connect to Server type Analysis Services
- Server - localhost:51345
- This will show your Power BI data model directly
Or you can just use PowerShell (Temporary)
# Connect directly via PowerShell $server = "localhost:51345" $query = "EVALUATE 'YourTableName'" Invoke-ASCmd -Server $server -Query $query