A Chrome extension and MCP bridge system that captures LLM-formatted memory blocks from web pages and persists them for AI context.
https://github.com/davidbmar/mcp-highlighter · public · shipped
A distributed system consisting of a Chrome extension, an HTTP bridge client, and an MCP storage server. It allows users to highlight or identify text formatted with specific [MCP-START]/[MCP-END] tags on any webpage, capture that content, and store it in a persistent JSON file or S3 bucket for retrieval by Model Context Protocol-compatible AI assistants like Claude.
cd mcp-servers/memory-server && npm install && npm run build cd ../../mcp_client && npm install && npm run build npm start cd ../extension # Load unpacked extension in chrome://extensions
flowchart TD
User((User)) -->|Highlights Text| Browser[Chrome Browser]
Browser -->|DOM Scan| Ext[Chrome Extension]
Ext -->|HTTP POST /mcp/blocks| Bridge[MCP Client Bridge :3001]
Bridge -->|JSON-RPC / Stdio| MCPServer[MCP Storage Server]
MCPServer -->|Write| LocalStore[(Local JSON File)]
MCPServer -->|Write| S3Store[(AWS S3 Bucket)]
AI[Claude / LLM] -->|MCP Protocol| MCPServer
The system is built with TypeScript across three distinct components: a Chrome Extension (content scripts) for DOM scanning, an Express.js HTTP server acting as a bridge/client, and an MCP SDK-based server for standardized tool/resource exposure. It uses strict regex parsing for block detection and JSON-RPC/Stdio for MCP communication.
sequenceDiagram
participant U as User
participant E as Chrome Extension
participant B as MCP Client Bridge
participant S as MCP Storage Server
participant D as Data Store
U->>E: Visits page with [MCP-START] block
E->>E: scanMCP() regex parse
E->>B: POST /mcp/blocks (JSON payload)
B->>B: Validate & Hash content
B->>S: Forward memory entry
S->>D: Append to memories.json
S-->>B: Acknowledge storage
B-->>E: 200 OK
E->>U: Update UI status 'Found 1'
Use this project to give stateful memory capabilities to stateless LLM sessions. Developers can extend the storage backend (S3/File), modify the parsing logic for different markup formats, or integrate the MCP server into custom AI agent workflows requiring persistent user context.