mcp-component-finder

mcp-component-finder

Enables searching for component, function, and type usage in React/TypeScript projects.

Category
Visit Server

README

mcp-component-finder

npm version License: MIT

MCP (Model Context Protocol) server for finding component, function, and type usage in React/TypeScript projects. Perfect for use with Claude Code!

🚀 Quick Start

Install in your project

npm install --save-dev mcp-component-finder

Auto-setup for Claude Code

npx mcp-component-finder setup

This will give you two options:

  1. Local setup (recommended) - Creates .claude_config.json in your project
  2. Global setup - Configures Claude Desktop globally

Local setup is recommended as it keeps the MCP server configuration project-specific.

📋 Manual Setup

Option 1: Local Project Configuration (Recommended)

Create .claude_config.json in your project root:

{
  "mcpServers": {
    "component-finder": {
      "command": "npx",
      "args": ["mcp-component-finder"],
      "env": {
        "PROJECT_ROOT": "."
      }
    }
  }
}

This approach:

  • ✅ Works only for the specific project
  • ✅ No global Claude Desktop configuration needed
  • ✅ Claude Code automatically detects the config
  • ✅ Easy to share with team (if not in .gitignore)

Option 2: Claude Desktop Configuration

Add to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "component-finder": {
      "command": "npx",
      "args": ["mcp-component-finder"],
      "env": {
        "PROJECT_ROOT": "/path/to/your/project"
      }
    }
  }
}

💡 Usage Examples

Once configured, you can ask Claude Code:

Find all usage of SearchIcon component
Show me where Button from @mui/material is used
Find useState imports from react in .tsx files only
List files that use the UserProfile component

🔧 Features

  • Find React Components: JSX usage, imports, exports
  • Find Functions: Function calls, imports from any package
  • Find TypeScript Types: Interface usage, type annotations
  • NPM Package Support: Search components from any installed package
  • Smart Filtering: Excludes comments, includes only relevant files
  • Fast Search: Optimized for large codebases

📊 Search Capabilities

Import Detection

  • import { Component } from './path'
  • import Component from './Component'
  • import * as Components from 'package'
  • import 'package' (side-effect imports)

Usage Detection

  • JSX: <Component />, <Component prop="value">
  • Function calls: Component(), Component.method()
  • TypeScript types: : Component, Component<T>
  • Destructuring: { Component } = obj

🎯 Tool Parameters

  • targetName (required): Name of component/function/type to find
  • packageName (optional): NPM package name for external dependencies
  • projectRoot (optional): Project root path (defaults to current directory)
  • extensions (optional): File extensions to search (default: .ts, .tsx, .js, .jsx)
  • excludeDirs (optional): Directories to exclude (default: node_modules, .git, dist, build)
  • format (optional): Output format - 'detailed' or 'files-only'

📁 Project Structure

Works with any React/TypeScript project structure:

  • Create React App
  • Next.js
  • Vite
  • Custom webpack setups
  • Monorepos

🤝 Contributing

Contributions welcome! Please read our Contributing Guide first.

📄 License

MIT © Deonis Peretyagin

🐛 Issues

Found a bug? Please open an issue.

🏷️ Changelog

See CHANGELOG.md for version history.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured