Curupira MCP Server provides a Model Context Protocol (MCP) interface for debugging web applications through Chrome DevTools Protocol (CDP). This document describes all available resources, tools, and prompts.
Resources provide read-only access to browser and application state. Resources are registered dynamically based on Chrome connection status.
Get current browser connection status and capabilities.
Response:
{
"connected": true,
"serviceUrl": "chrome://localhost:9222",
"activeSessions": 1,
"sessions": [{
"sessionId": "default",
"createdAt": "2024-01-15T10:00:00Z",
"duration": 0
}],
"capabilities": {
"screenshot": true,
"evaluate": true,
"navigate": true,
"profiling": true,
"debugging": true
}
}Get the current DOM tree structure.
Response:
{
"rootNode": {
"nodeId": 1,
"nodeName": "HTML",
"nodeType": 1,
"children": [...]
}
}Get recent network requests.
Response:
{
"requests": [{
"requestId": "123",
"url": "https://api.example.com/data",
"method": "GET",
"status": 200,
"responseTime": 123
}]
}Get active WebSocket connections.
Response:
{
"connections": [{
"url": "wss://ws.example.com",
"state": "open",
"messages": []
}]
}Get React component state information.
Get Apollo GraphQL cache state.
Get Zustand store state.
Get React component tree.
Response:
{
"components": [
{
"id": "1",
"name": "App",
"type": "function",
"props": {
"title": "My App"
},
"state": null,
"hooks": ["useState", "useEffect"],
"children": ["2", "3"],
"depth": 0
}
],
"total": 15,
"reactVersion": "18.2.0"
}Get specific component details.
Parameters:
id: Component ID from the component tree
Response:
{
"id": "1",
"name": "UserProfile",
"type": "function",
"props": {
"userId": 123,
"showAvatar": true
},
"hooks": [
{
"type": "useState",
"value": { "loading": false }
}
],
"fiber": {
"effectTag": 0,
"elementType": "function"
}
}Get React performance metrics.
Response:
{
"slowComponents": [
{
"name": "ExpensiveList",
"renderTime": 125.5,
"renderCount": 10
}
],
"totalRenders": 150,
"averageRenderTime": 15.2
}Get all XState machines.
Response:
{
"machines": [
{
"id": "auth",
"state": "authenticated",
"context": {
"user": { "id": 123 }
}
}
]
}Get all Zustand stores.
Response:
{
"stores": [
{
"name": "useCartStore",
"state": {
"items": [],
"total": 0
}
}
]
}Get recent network requests (last 500).
Response:
{
"requests": [
{
"id": "req-1",
"url": "https://api.example.com/users",
"method": "GET",
"status": 200,
"type": "xhr",
"duration": 125,
"size": 2048
}
],
"total": 45,
"stats": {
"totalSize": 150000,
"totalDuration": 5000,
"failedCount": 2
}
}Tools provide actions to interact with the browser and debug applications. All tools are registered at startup but require Chrome connection to function.
Connect to Chrome browser via CDP.
Parameters:
{
"host": "localhost",
"port": 3000,
"timeout": 5000
}Disconnect from Chrome browser.
List all available Chrome targets/tabs.
Evaluate JavaScript expression in the browser.
Parameters:
{
"expression": "document.title",
"sessionId": "optional-session-id"
}Navigate to a URL.
Parameters:
{
"url": "https://example.com",
"sessionId": "optional-session-id"
}Get browser cookies.
Parameters:
{
"urls": ["https://example.com"],
"sessionId": "optional-session-id"
}Detect React version and DevTools availability.
Get the React component tree structure.
Parameters:
{
"rootSelector": "#root",
"maxDepth": 10,
"includeProps": true
}Inspect a specific React component.
Parameters:
{
"componentSelector": "App > Header",
"includeProps": true,
"includeState": true,
"includeHooks": true
}Analyze component re-renders for performance.
Parameters:
{
"componentSelector": "MyComponent",
"duration": 5000
}Find DOM elements using CSS selectors.
Parameters:
{
"selector": ".btn-primary",
"all": false
}Click a DOM element.
Parameters:
{
"selector": "#submit-btn"
}Get recent network requests.
Get active WebSocket connections.
Intercept and modify network requests.
Get localStorage items.
Get sessionStorage items.
Get browser cookies.
Set a browser cookie.
Get console log messages.
Execute code in the browser console.
Clear the console.
Enable Chrome debugger.
Pause JavaScript execution.
Resume JavaScript execution.
Set a breakpoint.
Get Apollo GraphQL cache state.
Get Zustand store states.
Get XState machine states.
Get TanStack Query cache.
Get Vite dev server information.
Get React Router routes.
Get React Hook Form states.
Get Framer Motion animations.
Get Panda CSS styles and tokens.
Prompts provide pre-configured debugging scenarios for common use cases.
Debug lazy-loaded component issues.
Arguments:
componentName(required): Name of the component having issues
Trace GraphQL query errors.
Arguments:
operation(required): GraphQL operation nameerror(required): Error message
Profile component render performance.
Arguments:
component(optional): Component to profile
Curupira follows the Nexus configuration pattern: Base YAML → Environment YAML → Environment Variables.
# config/base.yaml
server:
name: "curupira-mcp-server"
version: "1.1.3"
host: "localhost"
port: 8080
chrome:
serviceUrl: "http://localhost:3000"
connectTimeout: 5000
transports:
websocket:
enabled: true
http:
enabled: true
sse:
enabled: trueAll configuration can be overridden via environment variables:
# Server
SERVER_HOST=0.0.0.0
SERVER_PORT=8080
# Chrome
CHROME_SERVICE_URL=http://browserless:3000
CHROME_DISCOVERY_ENABLED=true
# Logging
LOGGING_LEVEL=debug
# Storage
STORAGE_MINIO_ENABLED=trueAll errors follow a consistent format:
{
"error": "Chrome not connected",
"code": "CHROME_DISCONNECTED",
"details": {
"suggestion": "Use chrome_connect tool first"
}
}CHROME_DISCONNECTED: Chrome browser not connectedSESSION_NOT_FOUND: Invalid session IDTOOL_EXECUTION_FAILED: Tool failed to executeRESOURCE_NOT_FOUND: Requested resource not foundINVALID_PARAMETERS: Invalid tool parameters