{"_id":"agentic-debugger","name":"agentic-debugger","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"agentic-debugger","version":"1.0.0","description":"MCP server for interactive debugging with code instrumentation. Live debug mode for AI coding assistants.","type":"module","main":"dist/index.js","bin":{"agentic-debugger":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch","start":"node dist/index.js","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","debug","debugging","agentic","ai-coding","instrumentation","logging","cursor","windsurf","cline","copilot"],"author":{"name":"Arman"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/iarmankhan/agentic-debugger.git"},"bugs":{"url":"https://github.com/iarmankhan/agentic-debugger/issues"},"homepage":"https://github.com/iarmankhan/agentic-debugger#readme","engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.25.1","zod":"^4.2.1"},"devDependencies":{"@types/node":"^25.0.3","typescript":"^5.9.3"},"_id":"agentic-debugger@1.0.0","gitHead":"7f713c590e73d5770b0b2642fa8ea06a91905c0a","types":"./dist/index.d.ts","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-XJiuAF/pY3n/PUA0gXq2jetFL6rlqXBksjaG0OM4rT3wUjRDgLGTUGKyXJMxRDW08IEvKdB9wbBMA5IvCm+61Q==","shasum":"d86b631be1b40fc722cd8064a02aec4f62b284a3","tarball":"https://registry.npmjs.org/agentic-debugger/-/agentic-debugger-1.0.0.tgz","fileCount":13,"unpackedSize":32986,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB850c1BDpBlZ7RhWT3xbzonwz/UcCHhyNi6B+gvnr1TAiBsTHHJU1+36D22cluIqDjlg5sGPqUF5laFa0ZqBQtiJg=="}]},"_npmUser":{"name":"iarman","email":"work.armankhan@gmail.com"},"directories":{},"maintainers":[{"name":"iarman","email":"work.armankhan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agentic-debugger_1.0.0_1767094742199_0.48276176495594214"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-30T11:39:02.198Z","1.0.0":"2025-12-30T11:39:02.342Z","modified":"2025-12-30T11:39:02.644Z"},"maintainers":[{"name":"iarman","email":"work.armankhan@gmail.com"}],"description":"MCP server for interactive debugging with code instrumentation. Live debug mode for AI coding assistants.","homepage":"https://github.com/iarmankhan/agentic-debugger#readme","keywords":["mcp","model-context-protocol","debug","debugging","agentic","ai-coding","instrumentation","logging","cursor","windsurf","cline","copilot"],"repository":{"type":"git","url":"git+https://github.com/iarmankhan/agentic-debugger.git"},"author":{"name":"Arman"},"bugs":{"url":"https://github.com/iarmankhan/agentic-debugger/issues"},"license":"MIT","readme":"# agentic-debugger\n\nAn MCP (Model Context Protocol) server that enables interactive debugging with code instrumentation for AI coding assistants. Inspired by Cursor's debug mode.\n\nWorks with any MCP-compatible AI coding tool:\n- **Claude Code**\n- **Cursor**\n- **Windsurf**\n- **Cline**\n- **GitHub Copilot**\n- **Kiro**\n- **Zed**\n- And more...\n\n## Features\n\n- **Live code instrumentation** - Inject debug logging at specific lines\n- **Variable capture** - Log variable values at runtime\n- **Multi-language support** - JavaScript, TypeScript, and Python\n- **Browser support** - CORS-enabled for browser JS debugging\n- **Clean removal** - Region markers ensure instruments are fully removed\n\n## Installation\n\n### Using npx (recommended)\n\nAdd to your MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"debug\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"agentic-debugger\"]\n    }\n  }\n}\n```\n\n**Configuration file locations:**\n- Claude Code: `~/.mcp.json`\n- Cursor: `.cursor/mcp.json` in your project or `~/.cursor/mcp.json`\n- Other tools: Check your tool's MCP documentation\n\n### Global install\n\n```bash\nnpm install -g agentic-debugger\n```\n\nThen configure:\n\n```json\n{\n  \"mcpServers\": {\n    \"debug\": {\n      \"command\": \"agentic-debugger\"\n    }\n  }\n}\n```\n\n## Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `start_debug_session` | Start HTTP server for log collection |\n| `stop_debug_session` | Stop server and cleanup |\n| `add_instrument` | Insert logging code at file:line |\n| `remove_instruments` | Remove debug code from file(s) |\n| `list_instruments` | Show all active instruments |\n| `read_debug_logs` | Read captured log data |\n| `clear_debug_logs` | Clear the log file |\n\n## How It Works\n\n1. **Start session** - Spawns a local HTTP server (default port 9876)\n2. **Add instruments** - Injects `fetch()` calls that POST to the server\n3. **Reproduce bug** - Run your code, instruments capture variable values\n4. **Analyze logs** - Read the captured data to identify issues\n5. **Cleanup** - Remove all instruments and stop the server\n\n## Debug Workflow Example\n\n```\nYou: \"Help me debug why the total is NaN\"\n\nAI Assistant:\n1. Starts debug session\n2. Reads your code to understand the logic\n3. Adds instruments at suspicious locations\n4. \"Please run your code to reproduce the issue\"\n\nYou: *runs code* \"Done\"\n\nAI Assistant:\n5. Reads debug logs\n6. \"I see `discount` is undefined at line 15...\"\n7. Removes instruments\n8. Fixes the bug\n9. Stops debug session\n```\n\n## Instrument Examples\n\n### JavaScript/TypeScript\n```javascript\n// #region agentic-debug-abc123\nfetch('http://localhost:9876/log', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    id: 'abc123',\n    location: 'cart.js:15',\n    timestamp: Date.now(),\n    data: { total, discount, items }\n  })\n}).catch(() => {});\n// #endregion agentic-debug-abc123\n```\n\n### Python\n```python\n# region agentic-debug-abc123\ntry:\n    import urllib.request as __req, json as __json\n    __req.urlopen(__req.Request(\n        'http://localhost:9876/log',\n        data=__json.dumps({\n            'id': 'abc123',\n            'location': 'cart.py:15',\n            'timestamp': __import__('time').time(),\n            'data': {'total': total, 'discount': discount}\n        }).encode(),\n        headers={'Content-Type': 'application/json'}\n    ))\nexcept: pass\n# endregion agentic-debug-abc123\n```\n\n## Supported Languages\n\n| Language | Extensions |\n|----------|------------|\n| JavaScript | `.js`, `.mjs`, `.cjs` |\n| TypeScript | `.ts`, `.tsx` |\n| Python | `.py` |\n\n## Requirements\n\n- Node.js >= 18.0.0\n- An MCP-compatible AI coding assistant\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-17ba60aadff5bf6535c2f671c20f1001"}