MCP Pointer

MCP Pointer

An MCP server and Chrome extension that allows users to select browser DOM elements via a keyboard shortcut to provide detailed technical context to AI coding tools. It captures HTML attributes, CSS styles, and React component metadata, enabling agents to analyze and modify web elements directly.

Category
访问服务器

README

<img width="1440" height="480" alt="MCP Pointer banner" src="https://github.com/user-attachments/assets/a36d2666-e848-4a80-97b3-466897b244f7" />

CI Release npm version Chrome Extension License: MIT

👆 MCP Pointer

Point to browser DOM elements for agentic coding tools via MCP!

MCP Pointer is a local tool combining an MCP Server with a Chrome Extension:

  1. 🖥️ MCP Server (Node.js package) - Bridges between the browser and AI tools via the Model Context Protocol
  2. 🌐 Chrome Extension - Captures DOM element selections in the browser using Option+Click

The extension lets you visually select DOM elements in the browser, and the MCP server makes this textual context available to agentic coding tools like Claude Code, Cursor, and Windsurf through standardized MCP tools.

✨ Features

  • 🎯 Option+Click Selection - Simply hold Option (Alt on Windows) and click any element
  • 📋 Complete Element Data - Text content, CSS classes, HTML attributes, positioning, and styling
  • 💡 Dynamic Context Control - Request visible-only text, suppress text entirely, or dial CSS detail from none → full computed styles per MCP call
  • ⚛️ React Component Detection - Component names and source files via Fiber (experimental)
  • 🔗 WebSocket Connection - Real-time communication between browser and AI tools
  • 🤖 MCP Compatible - Works with Claude Code and other MCP-enabled AI tools

🎬 Usage example (video)

https://github.com/user-attachments/assets/98c4adf6-1f05-4c9b-be41-0416ab784e2c

See MCP Pointer in action: Option+Click any element in your browser, then ask your agentic coding tool about it (in this example, Claude Code). The AI gets complete textual context about the selected DOM element including CSS properties, url, selector, and more.

🚀 Getting Started

1. Install Chrome Extension

🎉 Now available on Chrome Web Store!

Install from Chrome Web Store

Simply click the link above to install from the Chrome Web Store.

<details> <summary>Alternative: Manual Installation</summary>

Option A: Download from Releases

  1. Go to GitHub Releases
  2. Download mcp-pointer-chrome-extension.zip from the latest release
  3. Extract the zip file to a folder on your computer
  4. Open Chrome → Settings → Extensions → Developer mode (toggle ON)
  5. Click "Load unpacked" and select the extracted folder
  6. The MCP Pointer extension should appear in your extensions list
  7. Reload web pages to activate the extension

Option B: Build from Source

  1. Clone this repository
  2. Follow the build instructions in CONTRIBUTING.md
  3. Open Chrome → Settings → Extensions → Developer mode (toggle ON)
  4. Click "Load unpacked" and select the packages/chrome-extension/dist/ folder
  5. Reload web pages to activate the extension

</details>

2. Configure MCP Server

One command setup for your AI tool:

npx -y @mcp-pointer/server config claude  # or cursor, windsurf, and others - see below

<details> <summary>Other AI Tools & Options</summary>

# For other AI tools
npx -y @mcp-pointer/server config cursor     # Opens Cursor deeplink for automatic installation
npx -y @mcp-pointer/server config windsurf   # Automatically updates Windsurf config file
npx -y @mcp-pointer/server config manual     # Shows manual configuration for other tools

Optional: You can install globally with npm install -g @mcp-pointer/server to use mcp-pointer instead of npx -y @mcp-pointer/server

</details>

After configuration, restart your coding tool to load the MCP connection.

🔄 Already using MCP Pointer? Run the config command again to update to auto-updating configuration:

npx -y @mcp-pointer/server config <your-tool>  # Reconfigures to always use latest version

3. Start Using

  1. Navigate to any webpage
  2. Option+Click any element to select it
  3. Ask your AI to analyze the targeted element!

Your AI tool will automatically start the MCP server when needed using the npx -y @mcp-pointer/server@latest start command.

Available MCP Tool:

  • get-pointed-element – Returns textual information about the currently pointed DOM element. Optional arguments:
    • textDetail: 0 | 1 | 2 (default 2) controls how much text to include (0 = none, 1 = visible text only, 2 = visible + hidden).
    • cssLevel: 0 | 1 | 2 | 3 (default 1) controls styling detail, from no CSS (0) up to full computed styles (3).

🎯 How It Works

  1. Element Selection: Content script captures Option+Click events
  2. Data Extraction: Analyzes element structure, CSS, and framework info
  3. WebSocket Transport: Sends data to MCP server on port 7007
  4. MCP Protocol: Makes data available to AI tools via MCP tools
  5. AI Analysis: Your assistant can now see and analyze the element!

🎨 Element Data Extracted

  • Basic Info: Tag name, ID, classes, text content
  • CSS Properties: Display, position, colors, dimensions
  • Component Info: React component names and source files (experimental)
  • Attributes: All HTML attributes
  • Position: Exact coordinates and dimensions
  • Source Hints: File paths and component origins

🔍 Framework Support

  • ⚛️ React - Component names and source files via Fiber (experimental)
  • 📦 Generic HTML/CSS/JS - Full support for any web content
  • 🔮 Planned - Vue component detection (PRs appreciated)

🌐 Browser Support

  • Chrome - Full support (tested)
  • 🟡 Chromium-based browsers - Should work (Edge, Brave, Arc - load built extension manually)

🐛 Troubleshooting

Extension Not Connecting

  1. Make sure MCP server is running: npx -y @mcp-pointer/server@latest start
  2. Check browser console for WebSocket errors
  3. Verify port 7007 is not blocked by firewall

MCP Tools Not Available

  1. Restart your AI assistant after installing
  2. Check MCP configuration: mcp-pointer config <your-tool>
  3. Verify server is running: npx -y @mcp-pointer/server@latest start

Elements Not Highlighting

  1. Some pages block content scripts (chrome://, etc.)
  2. Try refreshing the page
  3. Check if targeting is enabled (click extension icon)

🚀 Roadmap

1. Dynamic Context Control

  • Full raw context transferred to server
  • LLM-configurable detail levels (visible text only, all text, CSS levels)
  • Progressive refinement options / token-conscious data fetching

2. Visual Content Support (for multimodal LLMs)

  • Base64 encoding for images (img tags)
  • Screenshot capture of selected elements
  • Separate MCP tool for direct visual content retrieval

3. Enhanced Framework Support

  • Vue.js component detection
  • Better React support (React 19 removed _debugSource, affecting source mapping in dev builds)

4. Multi Select

  • Having the ability to select multiple DOM elements
  • https://github.com/etsd-tech/mcp-pointer/pull/9

📝 License

MIT License - see LICENSE file for details

🤝 Contributing

We welcome contributions! Please see our CONTRIBUTING.md guide for development setup and guidelines.


Inspired by tools like Click-to-Component for component development workflows.


Made with ❤️ for AI-powered web development

Now your AI can analyze any element you point at with Option+Click! 👆

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选