Browser Feedback MCP
Enables visual browser feedback collection directly into Claude Code. Users can point at elements in their browser and send annotated feedback that Claude can act on immediately.
README
Browser Feedback MCP for Claude Code
A Model Context Protocol (MCP) server that enables visual browser feedback collection directly into Claude Code. Users can point at elements in their browser and send annotated feedback that Claude can act on immediately.
How It Works
┌─────────────────────────────────────────────────────────────────┐
│ Your Web App (localhost:3000) │
│ │
│ [Widget auto-injected by Claude] │
│ │
│ ┌──────────────────┐ │
│ Your App UI │ Add annotation │ │
│ └──────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
WebSocket
▼
┌─────────────────────────────────────────────────────────────────┐
│ browser-feedback-mcp server (localhost:9877) │
└─────────────────────────────────────────────────────────────────┘
│
MCP Protocol
▼
┌─────────────────────────────────────────────────────────────────┐
│ Claude Code │
│ │
│ "Let me annotate" → installs widget → waits → receives feedback│
└─────────────────────────────────────────────────────────────────┘
Installation
1. Install the MCP Server
# Clone the repository
git clone https://github.com/itk-dev/mcp-claude-code-browser-feedback.git
cd mcp-claude-code-browser-feedback
# Install dependencies
npm install
2. Add to Claude Code
claude mcp add --scope user browser-feedback node /path/to/mcp-claude-code-browser-feedback/src/server.js
Or add manually to your Claude Code MCP configuration:
{
"mcpServers": {
"browser-feedback": {
"command": "node",
"args": ["/path/to/mcp-claude-code-browser-feedback/src/server.js"],
"env": {
"FEEDBACK_PORT": "9877"
}
}
}
}
Usage
Basic Workflow
Tell Claude you want to show it something in the browser:
You: There's a bug with the checkout button, let me show you
Claude: I'll install the feedback widget and wait for your annotation.
[Calls: install_widget]
✅ Widget installed in public/index.html
[Calls: wait_for_browser_feedback]
Please refresh your browser. You'll see an "Add annotation" button.
Click it, then click on the problematic element.
--- You use the browser widget to select the button ---
Claude: I received your feedback! I can see:
📸 Screenshot captured
🎯 Element: <button class="checkout-btn" disabled>
📝 Your description: "Button stays disabled even with items in cart"
🔴 Console Error: "TypeError: Cannot read property 'items' of null"
Let me look at the checkout code and fix this...
Multiple Annotations
You can submit multiple feedback items at once:
You: I have several issues to show you
Claude: [Calls: wait_for_multiple_feedback]
Submit all your annotations, then click "Done" when finished.
--- You submit 3 feedback items, then click Done ---
Claude: I received 3 feedback items. Let me address each one...
Offline Export
The widget works without a server connection. When offline, feedback is stored locally and can be exported:
- Export Markdown - Click "Pending" to open the queue, then "Export Markdown" to download a
.mdfile - Create GitHub Issue - Click "Create GitHub Issue" to open a pre-filled issue in your browser (you'll be prompted for the repository on first use, stored in localStorage)
Browser Extension
Instead of modifying project HTML files, you can use the browser extension to toggle the widget on any tab.
Installation
Chrome
- Navigate to
chrome://extensions - Enable Developer Mode (toggle in top right)
- Click Load unpacked
- Select the
extension/folder from this repository
Firefox
- Navigate to
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on...
- Select
extension/manifest.jsonfrom this repository
Or ask Claude to run the setup_extension tool, which opens the folder and shows instructions.
Usage
- Click the extension icon in your browser toolbar
- Toggle the widget ON for the current tab
- The feedback widget appears without any file changes
- Toggle OFF to cleanly remove the widget
The extension connects to the MCP server at http://localhost:9877 by default. You can change the server URL in the extension popup.
Available MCP Tools
| Tool | Description |
|---|---|
install_widget |
Auto-inject the widget script into your app's HTML |
uninstall_widget |
Remove the widget when done |
wait_for_browser_feedback |
Block until user submits single feedback |
wait_for_multiple_feedback |
Wait for multiple feedback items (user clicks Done when finished) |
get_pending_feedback |
Get any feedback that's been submitted |
preview_pending_feedback |
Preview pending feedback summaries without consuming them |
delete_pending_feedback |
Delete a specific pending feedback item by ID |
get_connection_status |
Check if browser clients are connected |
request_annotation |
Prompt the user to annotate something specific |
get_widget_snippet |
Get the script tag for manual installation |
open_in_browser |
Open project URL in default browser (auto-detects from config files) |
setup_extension |
Help install the browser extension (opens folder + instructions) |
install_widget Options
{
// Optional: specific file path (auto-detects if not provided)
"file_path": "public/index.html",
// Optional: project directory to search
"project_dir": "/path/to/project",
// Optional: only load on allowed hostnames (default: true)
"dev_only": true,
// Optional: hostnames/patterns allowed when dev_only is true
// Supports '*' wildcard (e.g., '*.local.itkdev.dk')
// Defaults to: localhost, 127.0.0.1, *.local, *.local.*, *.test, *.dev, *.ddev.site
"allowed_hostnames": ["localhost", "*.local.itkdev.dk"]
}
Auto-detection searches these common locations:
index.htmlpublic/index.htmlsrc/index.htmlapp/index.htmldist/index.htmlbuild/index.htmlwww/index.htmlstatic/index.html
Manual Installation (Alternative)
If you prefer manual control, add this script tag to your HTML:
<script src="http://localhost:9877/widget.js"></script>
Or for development-only loading:
<script>
if (location.hostname === 'localhost') {
const s = document.createElement('script');
s.src = 'http://localhost:9877/widget.js';
document.body.appendChild(s);
}
</script>
Widget Features
- Draggable dialog - Move the feedback panel anywhere on screen
- Minimizable - Collapse the panel to just the header bar
- Collapsible element details - Technical info hidden by default
- Screenshot capture - Automatic viewport capture using html2canvas (bundled)
- Console log capture - Includes recent console messages
- Multi-feedback mode - Submit multiple annotations before sending to Claude
- Shadow DOM isolation - Widget styles are isolated from host page CSS
- Offline mode - Annotate elements even without a server connection; feedback is stored locally
- Export to Markdown - Download pending feedback as a structured Markdown file
- Export to GitHub Issue - Open a pre-filled GitHub issue directly from the widget
Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
FEEDBACK_PORT |
9877 |
Port for HTTP/WebSocket server |
Screenshot Capture
The widget automatically captures viewport screenshots using html2canvas, which is bundled with the MCP server and loaded on demand. No extra setup is needed.
Troubleshooting
Widget shows "disconnected" (gray button)
- Make sure the MCP server is running (check with
/mcpin Claude Code) - Check that the port (9877) is not in use by another process
- Try restarting Claude Code
Port already in use
The server handles this gracefully - the MCP tools will still work, but you'll need to free the port for the browser widget:
# Find and kill the process using port 9877
lsof -i :9877
kill <PID>
Or use a different port:
FEEDBACK_PORT=9878 node src/server.js
No feedback received
- Check browser console for WebSocket errors
- Ensure the widget script loaded correctly
- Verify the MCP server logs for connection info
Security Notes
- The widget only connects to
localhost - No data is sent to external servers
- All communication stays on your machine
- Note: The HTTP/WebSocket server listens on all interfaces (
0.0.0.0) by default. If you need to restrict this, use a firewall or bind to a specific interface via a reverse proxy.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。