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

react-inspector-mcp

v1.1.2

Published

MCP server for inspecting React component usage, props, dependencies, and unused components.

Readme

react-inspector-mcp

MCP server for inspecting React/TypeScript projects with ts-morph.

It helps find React components, read props and metadata, locate JSX usages, detect unused components, and inspect component dependency graphs.

Requirements

  • Node.js 20+
  • A React/TypeScript project with a tsconfig.json

Installation

For MCP clients, use the npm package through npx:

npx -y react-inspector-mcp

Or install it into your React project as a dev dependency:

cd C:/absolute/path/to/target-react-project
npm install -D react-inspector-mcp

For a local checkout:

git clone https://github.com/vgratsilev/react-inspector-mcp.git
cd react-inspector-mcp
npm install
npm run build

MCP Client Configuration

Production

Use the npm package through npx:

{
  "mcpServers": {
    "react-inspector-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "react-inspector-mcp"
      ]
    }
  }
}

For a project-local install, point to that project's installed package:

{
  "mcpServers": {
    "react-inspector-mcp": {
      "command": "node",
      "args": [
        "C:/absolute/path/to/target-react-project/node_modules/react-inspector-mcp/dist/index.js"
      ]
    }
  }
}

For a local compiled checkout, point to that checkout's dist/index.js:

{
  "mcpServers": {
    "react-inspector-mcp": {
      "command": "node",
      "args": [
        "C:/absolute/path/to/react-inspector-mcp/dist/index.js"
      ]
    }
  }
}

Development

Use the TypeScript entrypoint while working on this server:

{
  "mcpServers": {
    "react-inspector-mcp-dev": {
      "command": "npx",
      "args": [
        "tsx",
        "C:/absolute/path/to/react-inspector-mcp/src/index.ts"
      ]
    }
  }
}

On Windows, escaped backslashes in JSON configs are also valid.

Tool Call Example

After connecting the server, pass the target React project path in tool arguments:

{
  "tool": "list_components",
  "arguments": {
    "projectPath": "C:/absolute/path/to/target-react-project",
    "limit": 20,
    "mode": "summary"
  }
}

Tools

  • search_components - search paginated components by name, path, description, prop names, and prop types.
  • list_components - list detected components with paginated props and metadata.
  • get_component - get one component by exact name.
  • get_component_report - get a compact component report with props, usages, dependencies, dependents, and risk.
  • get_dependency_graph - get a bounded component dependency graph.
  • find_component_usages - find JSX usages for one component.
  • find_unused_components - find components without external JSX usages.
  • get_component_dependencies - list components used inside one component.
  • get_component_dependents - list components that use one component.

For the common agent task "what is this component and who uses it", prefer get_component_report.

Full tool inputs, outputs, scan rules, and limitations are documented in docs/REFERENCE.md.

Scripts

npm run dev
npm run build
npm start
npm test
npm run test:smoke
  • npm run dev starts the MCP server from src/index.ts using tsx.
  • npm run build compiles TypeScript into dist.
  • npm start starts the compiled MCP server from dist/index.js.
  • npm test runs fixture-based tool tests.
  • npm run test:smoke packs and installs the package into a temporary project, then checks the MCP stdio handshake and list_components.

Project Docs