Connect your AI coding assistant to your app's runtime so it can debug with real data instead of guessing from source code.
MCP (Model Context Protocol) is an open standard that lets AI models call external tools and data sources. Instead of the AI only seeing your source files, MCP lets it query live data — runtime events, state, API responses — through a structured interface.
For debugging, this means the AI can ask "what network requests happened in the last 10 seconds?" or "what state changes led to this error?" and get real answers from your running app — not guesses from static analysis.
Install the SDK and call Limelight.connect() — it auto-detects your environment (React web or React Native) and starts capturing runtime events.
npm install @getlimelight/sdk// Add to your entry file (App.tsx, index.ts, etc.)
import { Limelight } from "@getlimelight/sdk"
Limelight.connect()Then connect your editor's MCP client to the Limelight desktop app:
// .cursor/mcp.json
{
"mcpServers": {
"limelight": {
"command": "npx",
"args": ["limelight-mcp"]
}
}
}claude mcp add limelight-mcp npx limelight-mcpBoth support MCP servers. See docs for editor-specific details.
Your dashboard feels sluggish — components re-render on every keystroke in an unrelated search field. You ask the AI: "Why is DashboardStats rendering so often?"
The AI calls the MCP render profiler and gets:
Component: DashboardStats
Renders: 47 in last 30 seconds
Avg cost: 12.3ms
Cause breakdown:
props: 45 (95.7%) SUSPICIOUS
state: 2 (4.3%)
Unstable prop: onRefresh
Type: function
Reference changes on every parent render
Parent: DashboardPage (re-renders on search input)Root cause: an inline onRefresh callback creates a new function reference on every render, bypassing React.memo. Fix: wrap it in useCallback. A precise answer backed by runtime data, not a generic "try memoizing your components."
Users get logged out randomly. You suspect the token refresh logic is failing intermittently. With Limelight running, you reproduce the issue and ask: "Why did the user get logged out?"
The AI investigates via MCP and gets:
Causal Chain:
1. GET /api/me → 401 (token expired)
2. POST /api/auth/refresh → 200 (new token received)
3. State: auth.token ← new token
4. GET /api/me → 401 (still using OLD token)
5. State: auth.isLoggedIn ← false (logout triggered)
Root Cause: The retry of request #1 was queued before
the refresh response updated the token. The retry
read the stale token from a closure, not the store.A stale closure captured the old token. Fix: refactor the retry interceptor to read the token from the store at retry time, not at queue time.