React Context Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited React Context Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<div align="center"> <img src="logo.png" alt="React Context MCP" width="600"> <br><br>
</div>
The Problem: You see a "Sign up" button and need to find which React component renders it, what file it's in, and what props it has.
With React Context MCP: Ask your AI assistant and get a complete component tree with accessibility information instantly.
// You ask your AI:
"Show me the component tree for this page"
// Your AI calls:
get_component_map()
// You get:
React Component Tree:
OnboardingPage (src/pages/OnboardingPage.tsx:25:4)
└─ OnboardingScreen {content={...}, onSignUp={fn}, onLogIn={fn}} (src/pages/OnboardingPage.tsx:136:8)
└─ Box {display="flex", flexDirection="column"} (src/design-system/OnboardingScreen.tsx:138:4)
└─ Typography {as="h1", variant="h2Bold"} [role="heading" name="Create Account"] (src/components/Typography.tsx:103:10)
└─ h1 [role="heading" name="Create Account"]
└─ Button {size="large", onClick={fn}} [role="button" name="Sign up"] (src/components/Button.tsx:115:12)
└─ button [role="button" name="Sign up"]Ask your AI assistant to:
react-context-mcp is a Model Context Protocol (MCP) server that connects your AI assistant to React applications running in Chrome, providing instant access to component trees, props, state, and source locations.
get_component_mapWhen you ask "Show me the component tree", your AI calls:
get_component_map({ verbose: true })Returns a markdown tree showing:
size="large", onClick={fn})React Component Tree:
App (src/main.tsx:8:4)
└─ OnboardingScreen {onSignUp={fn}, onLogIn={fn}} (src/pages/OnboardingPage.tsx:136:8)
└─ Stack {direction="column", gap="3"} (src/design-system/OnboardingScreen.tsx:216:8)
└─ Text {variant="h1"} [role="heading" name="Send instantly"] (src/components/Text.tsx:222:12)
└─ h1 [role="heading" name="Send instantly"]
└─ Text {variant="body-secondary"} [role="paragraph"] (src/components/Text.tsx:232:12)
└─ p [role="paragraph"]
└─ Button {variant="primary", size="large"} [role="button" name="Sign up"] (src/components/Button.tsx:361:10)
└─ button [role="button" name="Sign up"]For specific element details, use the two-step process:
Step 1: Take a snapshot to get element IDs
take_snapshot({ verbose: true })Returns the accessibility tree with backendDOMNodeId for every element:
{
"role": "button",
"name": "Sign up",
"backendDOMNodeId": 48
}Step 2: Get React component details
get_react_component_from_backend_node_id(48)Returns complete component information:
{
"component": {
"name": "Button",
"type": "ForwardRef",
"source": {
"fileName": "src/components/Button.tsx",
"lineNumber": 42,
"columnNumber": 8
},
"props": {
"variant": "primary",
"size": "large",
"onClick": "[Function]",
"children": "Sign up"
},
"owners": [
{
"name": "OnboardingScreen",
"source": "src/screens/OnboardingScreen.tsx:222:12"
}
]
}
}Add to your MCP client configuration:
{
"mcpServers": {
"react-context": {
"command": "npx",
"args": ["-y", "react-context-mcp@latest"]
}
}
}[!NOTE] Using @latest ensures you always get the most recent version.<details> <summary><b>Claude Code</b></summary>
Use the Claude Code CLI:
claude mcp add react-context npx react-context-mcp@latest</details>
<details> <summary><b>Cursor</b></summary>
Go to Cursor Settings → MCP → New MCP Server, then add:
{
"mcpServers": {
"react-context": {
"command": "npx",
"args": ["-y", "react-context-mcp@latest"]
}
}
}</details>
<details> <summary><b>Cline / Windsurf / Other Clients</b></summary>
Add the configuration above to your MCP settings file. Refer to your client's documentation for the config file location.
</details>
Try this in your MCP client:
Navigate to http://localhost:3000 and show me the component treeYour AI assistant will open the browser, navigate to the page, and display the complete React component hierarchy with accessibility information.
⚠️ IMPORTANT: To get accurate component source locations (file name, line number), you must configure the Babel plugin in your React project.
React Context MCP extracts source locations from data-inspector-* DOM attributes added by Babel. React 19 removed the `_debugSource` fiber property, making the Babel plugin approach the only reliable method for source tracking.
Without the plugin:
undefinedWith the plugin:
src/components/Button.tsx)#### Vite
npm install --save-dev @react-dev-inspector/babel-pluginAdd to vite.config.ts:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [
react({
babel: {
plugins: [
['@react-dev-inspector/babel-plugin', {
excludes: ['node_modules']
}]
]
}
})
]
})#### Next.js / CRA / Manual Babel
See the detailed configuration instructions for Next.js, Create React App, and manual Babel setup in the react-dev-inspector documentation.
#### get_component_map Primary tool - Get complete React component tree as markdown
Arguments:
verbose (boolean, optional) - Include all DOM elements (default: true)includeState (boolean, optional) - Include component state (default: false)Response:
React Component Tree:
App (src/App.tsx:10:4)
└─ Button {variant="primary", size="large"} [role="button" name="Sign up"] (src/Button.tsx:42:5)
└─ button [role="button" name="Sign up"]Shows:
prop="value", prop={value})#### take_snapshot Get accessibility tree with element IDs
Arguments:
verbose (boolean, optional) - Include all elements (default: false)Response:
{
"role": "RootWebArea",
"name": "My App",
"children": [
{
"role": "button",
"name": "Sign up",
"backendDOMNodeId": 48
}
]
}Use backendDOMNodeId with get_react_component_from_backend_node_id for detailed component inspection.
#### get_react_component_from_backend_node_id Get React component details using backendDOMNodeId from snapshot
Arguments:
backendDOMNodeId (number) - From take_snapshotResponse:
{
"success": true,
"component": {
"name": "Button",
"type": "ForwardRef",
"source": {
"fileName": "src/components/Button.tsx",
"lineNumber": 42
},
"props": {"variant": "primary", "children": "Sign up"},
"owners": [
{"name": "OnboardingScreen", "source": {...}},
{"name": "App", "source": {...}}
]
}
}Benefits:
Important: backendDOMNodeId is only valid within the same browser session.
# Auto-navigate on startup
TARGET_URL=http://localhost:3000 react-context-mcp
# Connect to existing Chrome with remote debugging
react-context-mcp --browserUrl http://localhost:9222
# Isolated mode (separate Chrome profile)
react-context-mcp --isolated --headless
# Custom Chrome executable
react-context-mcp --executablePath /path/to/chrome
# Set viewport size
react-context-mcp --viewport 1920x1080Available flags:
--headless - Run Chrome in headless mode--isolated - Use isolated user data directory--browserUrl <url> - Connect to existing Chrome debugging session--wsEndpoint <url> - WebSocket endpoint for CDP--executablePath <path> - Path to Chrome executable--channel <channel> - Chrome channel (stable, canary, beta, dev)--viewport <WxH> - Viewport size (e.g., 1280x720)Use --isolated flag:
react-context-mcp --isolatedtake_snapshot and get_react_component_from_backend_node_id in the same MCP sessionnpm run build# Test the built package
npm start
# Or with target URL
TARGET_URL=http://localhost:3000 npm startpackage.json: {
"version": "0.2.0"
} npm run build
npm publish npm info react-context-mcp# Commit all changes
git add .
git commit -m "feat: your feature description"
# Tag the version
git tag v0.2.0
# Push with tags
git push origin main --tagsApache-2.0
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.