Chrome Bookmark MCP Server

Chrome Bookmark MCP Server

A Model Context Protocol (MCP) server implementation that provides seamless integration between Chrome bookmarks and AI assistants. This server enables AI models to access, search, analyze, and manage Chrome bookmarks through a standardized protocol.

Category
访问服务器

README

Chrome Bookmark MCP Server

A Model Context Protocol (MCP) server implementation that provides seamless integration between Chrome bookmarks and AI assistants. This server enables AI models to access, search, analyze, and manage Chrome bookmarks through a standardized protocol.

Overview

This project implements an MCP server that bridges Chrome bookmarks with AI assistants, allowing for intelligent bookmark management, search, and analysis. It includes both a Chrome extension for data collection and a Python-based MCP server for processing requests.

Features

Core Functionality

  • Bookmark Access: Read and search through Chrome bookmarks
  • Advanced Search: Full-text search with ElasticSearch integration
  • Real-time Sync: Automatic synchronization of bookmark changes via WebSocket
  • Analytics: Bookmark usage patterns and insights
  • Security: JWT authentication and secure communication

Chrome Extension

  • Bookmark export and synchronization
  • Search interface with advanced filtering
  • Usage analytics dashboard
  • Real-time updates via WebSocket
  • Offline message queuing

MCP Server

  • Standard MCP protocol implementation
  • WebSocket support for real-time updates
  • RESTful API endpoints
  • Redis caching for performance
  • ElasticSearch for advanced search
  • Docker support for easy deployment

Architecture

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│ Chrome Browser  │────▶│  Chrome Ext.    │────▶│   MCP Server    │
│   (Bookmarks)   │     │  (Data Export)  │     │  (Processing)   │
└─────────────────┘     └─────────────────┘     └─────────────────┘
                                                          │
                                ┌─────────────────────────┴─────────────┐
                                │                                       │
                        ┌───────▼────────┐                    ┌────────▼───────┐
                        │     Redis      │                    │ ElasticSearch  │
                        │   (Caching)    │                    │   (Search)     │
                        └────────────────┘                    └────────────────┘

Prerequisites

  • Python 3.8+
  • Docker and Docker Compose
  • Chrome Browser
  • Redis (via Docker)
  • ElasticSearch (via Docker)

Installation

1. Clone the Repository

git clone https://github.com/mamba-mental/chrome-bookmark-mcp-server.git
cd chrome-bookmark-mcp-server

2. Set Up the Server

Using Docker (Recommended)

# Start all services
docker-compose up -d

# Check service status
docker-compose ps

Manual Setup

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up Redis and ElasticSearch (see docs/REDIS_SETUP.md and docs/ELASTICSEARCH_SETUP.md)

3. Install Chrome Extension

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable "Developer mode"
  3. Click "Load unpacked"
  4. Select the chrome-extension folder from this repository
  5. The extension icon should appear in your toolbar

4. Configure the Server

Create a .env file in the project root:

# Server Configuration
MCP_SERVER_HOST=localhost
MCP_SERVER_PORT=8012
SECRET_KEY=your-secret-key-here

# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0

# ElasticSearch Configuration
ELASTICSEARCH_HOST=localhost
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_INDEX=chrome_bookmarks

# Security
JWT_SECRET_KEY=your-jwt-secret-key-here
JWT_ALGORITHM=HS256
JWT_EXPIRATION_DELTA=3600

Usage

Starting the Server

With Docker

docker-compose up

Without Docker

python server/MCP_Chrome_Server_033025.py

Chrome Extension

  1. Click the extension icon in Chrome
  2. Use the popup interface to:
    • Export bookmarks to the server
    • Search bookmarks with filters
    • View analytics dashboard
    • Configure settings

MCP Integration

Connect your AI assistant to the MCP server:

{
  "mcpServers": {
    "chrome-bookmarks": {
      "command": "python",
      "args": ["/path/to/server/MCP_Chrome_Server_033025.py"],
      "env": {
        "PYTHONPATH": "/path/to/project"
      }
    }
  }
}

API Documentation

MCP Tools

The server provides the following MCP tools:

  • search_bookmarks: Search bookmarks with advanced filters
  • get_bookmark: Retrieve a specific bookmark by ID
  • analyze_bookmarks: Get analytics and insights
  • organize_bookmarks: Auto-organize bookmarks
  • export_bookmarks: Export bookmarks in various formats

REST API Endpoints

  • GET /api/bookmarks: List all bookmarks
  • GET /api/bookmarks/search: Search bookmarks
  • GET /api/bookmarks/{id}: Get specific bookmark
  • POST /api/bookmarks/sync: Sync bookmarks from Chrome
  • GET /api/analytics/dashboard: Get analytics data
  • POST /api/auth/login: Authenticate and get JWT token
  • WS /ws: WebSocket endpoint for real-time updates

Development

Project Structure

chrome-bookmark-mcp-server/
├── chrome-extension/       # Chrome extension source
│   ├── manifest.json      # Extension manifest
│   ├── popup.html/js      # Extension popup interface
│   ├── background.js      # Background service worker
│   ├── search.html        # Search interface
│   ├── analysis.html      # Analytics dashboard
│   └── icons/             # Extension icons
├── server/                # MCP server implementation
│   ├── MCP_Chrome_Server_033025.py         # Main server
│   ├── MCP_Chrome_Schemas_033025.py        # Data schemas
│   ├── Security_Module_033025.py           # Security module
│   ├── Advanced_Features_Module_033025.py  # Advanced features
│   └── requirements.txt                    # Python dependencies
├── config/                # Configuration files
├── docs/                  # Documentation
│   ├── ELASTICSEARCH_SETUP.md
│   ├── REDIS_SETUP.md
│   └── MCP_Implementation_Project_Master_Plan_031125.md
├── docker-compose.yml     # Docker configuration
└── requirements.txt       # Root Python dependencies

Running Tests

# Run unit tests
python -m pytest tests/

# Run with coverage
python -m pytest --cov=server tests/

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Security Considerations

  • JWT tokens for authentication
  • API rate limiting to prevent abuse
  • Secure WebSocket connections (WSS in production)
  • Input validation and sanitization
  • No storage of sensitive user data

Troubleshooting

Common Issues

  1. Extension not connecting to server

    • Check server is running on port 8012
    • Verify no firewall blocking
    • Check browser console for errors
  2. Search not working

    • Ensure ElasticSearch is running
    • Check if bookmarks are indexed
    • Verify ElasticSearch connection
  3. WebSocket disconnections

    • Check network stability
    • Review server logs
    • Ensure proper CORS configuration

For detailed setup instructions, see:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Model Context Protocol specification by Anthropic
  • Chrome Extensions API documentation
  • Open source libraries and contributors

Contact

For questions, issues, or contributions, please open an issue on GitHub.


Note: This is an active development project. Features and APIs may change. Please refer to the latest documentation and release notes.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选