element
MCP server from stonega/element-mcp
claude mcp add --transport stdio stonega-element-mcp node server.js \ --env PORT="Port to run the MCP server on (default if not specified)." \ --env EXTENSION_ORIGIN="Origin for the Chrome extension (if needed by CORS)."
How to use
Element MCP powers a Chrome extension that lets you select elements on a webpage and store references to those elements on a local server. After starting the server and loading the Chrome extension, you can trigger element capture from the browser. Stored elements appear in a tabular view served by the MCP server, allowing you to review, organize, and potentially reuse element selectors later. The extension communicates with the server to persist each captured element, and the server exposes endpoints to fetch or manage the stored elements. Use the extension’s UI to capture elements on any page and then visit the server’s interface to browse your saved items.
How to install
Prerequisites:
- Git
- Node.js installed locally (or a compatible runtime as used by your setup; Bun is commonly used with this project but the server here is started via a Node entry point)
- Chrome browser (for loading the extension)
Steps:
-
Clone the repository git clone https://github.com/stonega/stonega-element-mcp.git cd stonega-element-mcp
-
Install dependencies (using your preferred runtime; Bun is commonly used with this project, but if you’re following the instructions below, you can use npm/yarn as applicable) bun install
or with npm
npm install
-
Start the MCP server bun start
or if you use the Node-based start script directly
node server.js
-
Load the Chrome extension
- Open Chrome and go to chrome://extensions/
- Enable "Developer mode" if not already
- Click "Load unpacked" and select the extension directory provided in the repository (often named extension)
-
Use the extension to capture elements
- Click the Element MCP extension icon in Chrome
- Choose elements on a page to store
- Access the server’s interface to view stored elements
-
Optional: configure environment variables If you’re using a custom PORT or need to set CORS/Origin options, set them in your environment or a .env file as appropriate for your runtime.
Additional notes
Tips and notes:
- The server stores element references captured by the Chrome extension; ensure the extension is loaded and has permission to communicate with the server (adjust CORS/origin as needed).
- If you restart the server, your stored elements persist locally if your data directory is preserved; otherwise ensure proper persistence configuration for your environment.
- Common issues: extension not communicating with server due to port mismatches or blocked cross-origin requests; verify PORT and EXTENSION_ORIGIN if you encounter connectivity problems.
- If you plan to distribute or deploy, consider wrapping the server in a container (Docker) or using a dedicated process manager for reliability in production.
Related MCP Servers
any-chat-completions
MCP Server for using any LLM as a Tool
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.
xgmem
Global Memory MCP server, that manage all projects data.