Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/steipete/agent-rules/mcp-inspector-debugginggit clone --depth 1 https://github.com/steipete/agent-rulesWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01629 |
| Opus 5 | $0.00000 | $0.00814 |
| Sonnet 5 | $0.00000 | $0.00326 |
| Haiku 4.5 | $0.00000 | $0.00163 |
Grade A, and why
mcp-inspector-debugging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- mcp-inspector-debugging — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rule Name: mcp-inspector Description: Debugging and verifying MCP servers via the MCP Inspector UI. This rule uses Playwright for UI automation, iTerm for server management, and Claude Code for log inspection.
Note: Replace placeholders with your specific values:
[MCP_SERVER_NAME]- Your MCP server name[WORKSPACE_PATH]- Absolute path to your project[TEST_CREDENTIALS]- Any test credentials needed[CONFIG_FILE]- Your configuration file path[LOG_FILE]- Your log file path
To read the log, use tail -n 100 /path/to/logfile.log
DO NOT RUN BLOCKING TERMINAL COMMANDS VIA YOUR TERMINAL TOOL. INSTEAD USE Terminal app via AppleScript. Blocking operations include:
node dist/index.jsnpm run devnpm start
This is ok:
Grab the last X lines: tail -n 100 server.log
Run npm run build to verify build.
Check iTerm log when the MCP Inspector fails, as it might show errors from our service.
Required Tools:
run_terminal_cmd(for global pkill, and as fallback for Inspector start)mcp_iterm-mcp_send_control_charactermcp_iterm-mcp_write_to_terminalmcp_iterm-mcp_read_terminal_outputmcp_playwright_browser_navigatemcp_playwright_browser_typemcp_playwright_browser_clickmcp_playwright_browser_snapshotmcp_playwright_browser_console_messagesmcp_playwright_browser_wait_formcp_claude-code_claude_code
User Workspace Path Placeholder:
[WORKSPACE_PATH]in this rule MUST be replaced by the AI assistant with the absolute path to the user's current project workspace (e.g., from<user_info>).
Phase 1: Start MCP Inspector Server (via iTerm)
- Clear iTerm & Kill Existing Inspector Processes:
- Action:
mcp_iterm-mcp_send_control_character,letter:"C". (Stop any current iTerm command).
- Action:
- Start New Inspector Process in iTerm:
- Action:
mcp_iterm-mcp_write_to_terminal,command:[ENV_VARS] npx @modelcontextprotocol/inspector ./start.sh. - Action:
mcp_iterm-mcp_read_terminal_output,linesOfOutput:7(or enough to see startup messages clearly). - Verify: Look for "MCP Inspector is up and running at http://127.0.0.1:6274". Note the proxy port.
- Action:
- Wait for Inspector UI:
mcp_playwright_browser_wait_for,time:3(seconds).
Phase 2: Connect to MCP Server via Playwright
- Navigate/Refresh Inspector Page:
- Action:
mcp_playwright_browser_navigate,url:http://127.0.0.1:6274. - Expected: Ensures a fresh state of the Inspector UI.
- Snapshot: Take a snapshot.
- Action:
- Fill Connection Form:
- Set Command: (Obtain
reffrom snapshot for "Command textbox")- Action:
mcp_playwright_browser_type,text:[WORKSPACE_PATH]/start.sh.
- Action:
- Set Arguments: (Obtain
reffor "Arguments textbox")- Action:
mcp_playwright_browser_type,text:"".
- Action:
- Environment Variables: (prefilled if you add it in the inspector call)
- Action: Click "Environment Variables" button (obtain
ref) to view current. Snapshot. Environment variables may be set in your configuration file. No UI entry is strictly needed unless overriding these for a specific test run. - (If needing to override, e.g.,
LOG_FILE_PATH=/tmp/custom-mcp-server.log):- Click "Add Environment Variable" button (obtain
ref). - Type key into the new key textbox (obtain
ref). - Type value into the new value textbox (obtain
ref). Repeat as needed.
- Click "Add Environment Variable" button (obtain
- Action: Click "Environment Variables" button (obtain
- Set Command: (Obtain
- Click "Connect": (Obtain
reffrom snapshot for "Connect button")- Action:
mcp_playwright_browser_click. - Snapshot: Take a snapshot.
- Action:
- Verify Connection:
- Examine snapshot: Check for connected status (e.g., service
[MCP_SERVICE_NAME]appears). - If connection fails, examine "Error output from MCP server" panel in Inspector UI. This shows
stderrfromstart.sh. - Crucially, also check the
start.shdebug log:mcp_claude-code_claude_code, prompt:"Read /tmp/[MCP_SERVER_NAME]_start_debug.log". - If
start.shlog shows it tried to run[MCP_SERVER_NAME]but Inspector still failed to connect, then check[MCP_SERVER_NAME]'s own log:mcp_claude-code_claude_code, prompt:"Read [WORKSPACE_PATH]/[LOG_FILE]".
- Examine snapshot: Check for connected status (e.g., service
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 102 lines · 0 tokens per session scan A 62ac1fa0dc44
mcp-inspector-debugging is a cursor rule published in the GitHub repository steipete/agent-rules (5,695 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,629 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
playwright-agent
Playwright end-to-end testing best practices.
vitest-component-testing-auto
Enforces best practices for component tests using Vitest.
web-scraping
You are an expert in web scraping and data extraction, with a focus on Python libraries and frameworks such as requests, BeautifulSoup, selenium, and advanced tools like jina, firecrawl, agentQL, and multion.
type-inference
Derive TypeScript types from Zod schemas - no hand-written interfaces for wire shapes.
cursor-tools-mastery
Cursor 3.7 runtime guide: choose the right tool, canvases, Design Mode, /worktree, /best-of-n, Await, and parallel execution where safe.
paperfit
PaperFit project rule for LaTeX visual typesetting optimization.