Forum Discussion

ahmedshalabyy12's avatar
9 months ago
Solved

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 
  • Ahmed-Elfeel's avatar
    Ahmed-Elfeel
    9 months ago

    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