npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fabric-agentic-analytics-mcp

v1.0.0

Published

MCP server connecting AI agents to Microsoft Fabric and Power BI. Single auth, read-only analytics, data caching for HTML reports.

Readme

fabric-analytics-mcp

A lightweight MCP (Model Context Protocol) server that connects AI agents to Microsoft Fabric and Power BI. Single authentication, two endpoints.

What it does

Claude Code (and other MCP clients) cannot directly authenticate with Microsoft's remote MCP servers because Entra ID doesn't support MCP's dynamic client registration. This proxy handles MSAL device-code authentication locally and forwards requests to both Microsoft endpoints:

  • Power BI (api.fabric.microsoft.com/v1/mcp/powerbi) — DAX queries, semantic model schemas, report metadata, query generation
  • Fabric Core (api.fabric.microsoft.com/v1/mcp/core) — workspace management, item CRUD, catalog search, permissions, folders

Tool calls are automatically routed to the correct endpoint based on which upstream advertised the tool.

Prerequisites

  • Node.js >= 20.11
  • A Microsoft account with access to Power BI / Fabric workspaces
  • Your Power BI admin must enable: "Users can use the Power BI MCP server endpoint (preview)"

No Azure app registration is required. The proxy uses a built-in public Power BI client ID.

Setup

git clone https://github.com/<your-username>/fabric-analytics-mcp.git
cd fabric-analytics-mcp
npm install
npm run build

Claude Code

claude mcp add --transport stdio --scope local fabric-analytics-mcp \
  -- node /path/to/fabric-analytics-mcp/dist/src/index.js

Restart Claude Code, then call fabric_auth_start — it will return a Microsoft device code and URL. Sign in once; tokens cache locally and auto-refresh.

Other MCP clients

Add as a stdio server pointing to node /path/to/fabric-analytics-mcp/dist/src/index.js.

Local tools

These tools are handled by the proxy itself (no remote call needed):

| Tool | Description | |---|---| | fabric_auth_start | Start Microsoft device-code sign-in | | fabric_auth_status | Check authentication status | | fabric_auth_logout | Clear local token cache | | fabric_set_context | Set active workspace/semantic model for the session | | fabric_get_context | Show current context | | fabric_clear_context | Reset session context |

Remote tools

After authentication, all tools from both upstream endpoints are discovered and merged automatically. These include:

From Power BI:

  • ExecuteQuery — Run DAX queries
  • GetSemanticModelSchema — Model metadata (tables, columns, measures, relationships)
  • GenerateQuery — Natural language to DAX (requires Copilot license)
  • GetReportMetadata — Report pages, visuals, filters

From Fabric Core (read-only):

  • list_workspaces, get_workspace — Discover workspaces
  • list_items, get_item, get_item_definition — Browse items
  • search_catalog — Search OneLake catalog
  • list_workspace_roles, get_workspace_role — View permissions
  • list_folders, get_folder — Browse folder structure
  • list_capacities — View capacity info

Safety: Destructive operations (create_*, update_*, delete_*, move_*, bulk_*, role mutations) are blocked at the proxy level. This MCP is designed for read-only analytics, not resource management.

Environment variables

All optional. Defaults work out of the box.

| Variable | Default | |---|---| | FABRIC_MCP_POWERBI_URL | https://api.fabric.microsoft.com/v1/mcp/powerbi | | FABRIC_MCP_CORE_URL | https://api.fabric.microsoft.com/v1/mcp/core | | FABRIC_MCP_CLIENT_ID | Built-in public Power BI client ID | | FABRIC_MCP_TENANT_ID | organizations (multi-tenant) | | FABRIC_MCP_SCOPES | https://api.fabric.microsoft.com/.default | | FABRIC_MCP_CACHE_DIR | ~/.fabric-analytics-mcp | | FABRIC_MCP_TIMEOUT_SECONDS | 60 |

CLI helpers

npm run login    # Authenticate from terminal
npm run logout   # Clear token cache
npm run status   # Show cached accounts

Security

  • One runtime dependency: @azure/msal-node (Microsoft's official auth library)
  • Tokens are only sent to api.fabric.microsoft.com — no third-party services
  • Token cache is stored locally with restricted file permissions (0o600)
  • No telemetry, no analytics, no data exfiltration

License

MIT