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

d365-troubleshooter-mcp

v1.0.2

Published

Give your coding agent direct access to Dynamics 365 / Dataverse metadata and web resources through a Model Context Protocol (MCP) server.

Readme

D365 Troubleshooter MCP

Give your coding agent direct access to Dynamics 365 / Dataverse metadata and web resources through a Model Context Protocol (MCP) server.

This server helps with CRM troubleshooting workflows like:

  • finding entities quickly,
  • checking plugin step registrations for a table,
  • searching web resources,
  • reading web resource source content.

How it works

  1. Your MCP client starts this server over stdio.
  2. The server authenticates with Microsoft Entra ID using app credentials.
  3. It queries Dynamics 365 Web API (/api/data/v9.1).
  4. Your AI client can call the exposed tools and use structured output for analysis.

Features

  • search_entities: Search Dataverse tables by logical or display name.
  • get_entity_plugins: List plugin steps registered for a specific entity.
  • search_webresources: Find web resources by name/display name.
  • get_webresource_content: Read decoded web resource content by ID or name.
  • Access token caching in .crm_auth_results.json to reduce repeated auth calls.

Requirements

  • Node.js 18+ (recommended: latest LTS)
  • A Dynamics 365 / Dataverse environment URL
  • Microsoft Entra app registration with access to your Dataverse org
  • Tenant ID, Client ID, and Client Secret

Required environment variables:

  • TENANT_ID
  • CLIENT_ID
  • CLIENT_SECRET
  • DYNAMICS_365_URL (example: https://orgname.crm.dynamics.com)

Getting started

Many MCP clients (Cursor, VS Code MCP clients, Claude Desktop-compatible clients) support JSON-based server configuration.

MacOS / Linux

{
  "mcpServers": {
    "D365 Troubleshooter MCP": {
      "command": "npx",
      "args": ["-y", "d365-troubleshooter-mcp"],
      "env": {
        "TENANT_ID": "YOUR_TENANT_ID",
        "CLIENT_ID": "YOUR_CLIENT_ID",
        "CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "DYNAMICS_365_URL": "https://orgname.crm.dynamics.com"
      }
    }
  }
}

Windows

{
  "mcpServers": {
    "D365 Troubleshooter MCP": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "d365-troubleshooter-mcp"],
      "env": {
        "TENANT_ID": "YOUR_TENANT_ID",
        "CLIENT_ID": "YOUR_CLIENT_ID",
        "CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "DYNAMICS_365_URL": "https://orgname.crm.dynamics.com"
      }
    }
  }
}

Local development

pnpm install
pnpm build

Run from source build:

node dist/index.js

Available scripts:

  • pnpm dev – watch build with tsup
  • pnpm build – production build
  • pnpm type-check – TypeScript check
  • pnpm inspect – launch MCP inspector

VS Code extension

A companion VS Code extension exists in vscode-extension/ for local credential configuration and MCP integration.

Notes

  • The server uses OAuth client credential flow via @azure/msal-node.
  • Auth results are cached in .crm_auth_results.json.
  • Keep secrets in your MCP client env configuration (never hardcode them in source).

License

ISC