jsx-analyzer
Analyzes JSX component prop usage in React/JSX codebases, providing tools to search for components, props, and missing props.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jsx-analyzerfind Button components missing onClick prop in src"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JSX Component Prop Analyzer
A powerful tool for analyzing JSX component prop usage in React/JSX codebases. Now available as both a CLI tool and an MCP (Model Context Protocol) server!
Features
Recursive file scanning - Analyzes
.js,.jsx,.ts, and.tsxfilesComponent detection - Finds JSX components by name
Prop analysis - Searches for specific props and their values
Missing prop detection - Identifies components missing required props
Substring matching - Search for prop values containing specific strings
Detailed output - Shows file paths, line numbers, and prop values
Related MCP server: Ultra Debugger
Installation
npm installUsage
CLI Mode
Use the traditional command-line interface:
# Basic usage - find components with specific prop
./cli.js <rootDir> <componentName> <propName> [propValue]
# Find Button components with className prop
./cli.js ./src Button className
# Find Button components with specific className value
./cli.js ./src Button className "btn-primary"
# Find components missing a required prop
./cli.js ./src Button onClick --find-missing
# Verbose output showing all props
./cli.js ./src Button className --verbose
# Substring matching
./cli.js ./src Button className "primary" --includesCLI Options:
--find-missing, -m: Find components missing the specified prop--verbose, -v: Include all props of matching components in output--includes, -i: Substring match for prop values
MCP Server Mode
The project now also works as an MCP server, exposing three tools:
Installation for VS Code / Cursor
You have two options for installing this MCP server:
Option 1: Local Installation
For VS Code with Roo/Cline:
Open the MCP settings file:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.jsonAdd the jsx-analyzer server to the
mcpServersobject:
{
"mcpServers": {
"jsx-analyzer": {
"command": "node",
"args": ["/absolute/path/to/your/project/mcp-server.js"],
"disabled": false,
"alwaysAllow": []
}
}
}For Cursor with Claude/Cline:
Open the MCP settings file:
~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.jsonAdd the same configuration as above
Local Installation Notes:
Replace
/absolute/path/to/your/project/mcp-server.jswith the actual absolute path to your mcp-server.js fileMake sure you've run
npm installin the project directory firstRestart VS Code/Cursor after modifying the settings file
Option 2: NPX Installation (if published to npm)
If this package is published to npm, you can use npx for easier installation:
For VS Code with Roo/Cline:
"jsx-analyzer": {
"command": "npx",
"args": ["-y", "my-component-prop-analyzer"],
"disabled": false
}For Cursor with Claude/Cline: Use the same configuration as above.
NPX Installation Benefits:
No need to clone the repository locally
Always uses the latest published version
Simpler configuration (no absolute paths required)
Automatic dependency management
Publishing to NPM (for package maintainers): To enable npx installation, publish the package:
# Update package name in package.json if needed
npm login
npm publishThen users can reference it via npx using the published package name.
General Notes:
Restart VS Code/Cursor after modifying the settings file
The server will automatically start when you begin a new conversation
Verification
After installation, you should see "jsx-analyzer" listed in the Connected MCP Servers section when you start a new conversation.
Tools Available:
analyze_jsx_props- General JSX prop analysisrootDir: Directory or file to analyzecomponentName: JSX component name to search forpropName: Prop name to search forpropValue(optional): Expected prop valuefindMissing(optional): Find missing propsverbose(optional): Include all props in outputincludes(optional): Substring matching
find_missing_props- Find components missing required propsrootDir: Directory or file to analyzecomponentName: JSX component namepropName: Required prop nameverbose(optional): Include all props in output
search_prop_values- Search prop values with substring matchingrootDir: Directory or file to analyzecomponentName: JSX component namepropName: Prop name to searchsearchValue: String to search for within prop valuesverbose(optional): Include all props in output
The MCP server has been automatically configured and is ready to use!
Project Structure
├── analyzer.js # Core analysis logic
├── cli.js # CLI interface
├── mcp-server.js # MCP server interface
├── package.json # Dependencies and scripts
└── README.md # This fileExamples
CLI Examples
# Find all Button components with onClick prop
./cli.js ./src Button onClick
# Find Button components missing onClick prop
./cli.js ./src Button onClick --find-missing
# Find Input components with type="password"
./cli.js ./src Input type "password"
# Find components with className containing "primary"
./cli.js ./src Button className "primary" --includes --verboseMCP Examples
When using through an MCP client, you can invoke tools like:
Analyze Button components for className prop in ./src directory
Find Input components missing the required 'name' prop
Search for components with className values containing 'btn-'
Output Format
CLI Output
--- JSX Prop Analysis Results ---
[1] src/components/Button.jsx:15
Props: {
"className": "btn btn-primary"
}
[2] src/pages/Home.jsx:42
Props: {
"className": "btn btn-secondary"
}MCP Output
{
"summary": {
"totalMatches": 2,
"searchCriteria": {
"component": "Button",
"prop": "className",
"value": null,
"mode": "existing props"
}
},
"matches": [
{
"filePath": "src/components/Button.jsx",
"lineNumber": 15,
"props": {
"className": "btn btn-primary"
}
}
]
}Supported File Types
.js- JavaScript files.jsx- React JSX files.ts- TypeScript files.tsx- TypeScript JSX files
Excluded Directories
The analyzer automatically skips:
node_modules.gitdistbuild.next
Your JSX prop analyzer is now ready to use in both CLI and MCP modes! 🚀
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lmn451/mcp-jsx-prop-analyzer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server