边缘书签MCP服务器
使用FastMCP 2.12.2构建的用于Microsoft Edge书签管理的综合模型上下文协议(MCP)服务器。
✨ 特性
- 📚 完成书签访问:读取、搜索和管理Edge书签
- 🔍 高级搜索:按标题、URL、内容和标签搜索
- 📁 文件夹管理:导航和组织书签文件夹
- 📊 分析:书签使用统计数据和见解
- 📤 导出/导入:支持JSON、CSV、HTML和XLSX格式
- ⚡ 实时监控:实时书签文件更改检测
- 🛡️ 安全操作:默认情况下为只读,可选写操作
🚀 快速开始
先决条件
- Python 3.9+
- 带书签的Microsoft Edge
- FastMCP 2.10.1+
安装
- 克隆或下载 此存储库:
ash git clone https://github.com/stephanschipal/edge-bookmark-mcp.git cd edge-bookmark-mcp-server
- 安装依赖项:
ash pip install fastmcp>=2.10.1 jinja2 pandas pydantic watchdog
- 运行服务器:
ash python run_server.py
Claude Desktop Configuration
Add to your Claude Desktop configuration (claude_desktop_config.json):
json { "mcpServers": { "edge-bookmarks": { "command": "python", "args": ["D:\\projects\\windsurf\\mcp\\edge-bookmark-mcp-server\\run_server.py"], "cwd": "D:\\projects\\windsurf\\mcp\\edge-bookmark-mcp-server" } } }
🛠️ Available Tools
Core Bookmark Operations
- list_bookmarks() - Get all bookmarks with folder structure
- search_bookmarks(query) - Search by title/URL/content
- get_bookmark_by_id(id) - Retrieve specific bookmark
- get_folder_contents(folder_id) - Browse bookmark folders
Search & Analysis
- dvanced_search(filters) - Complex search with multiple criteria
- ind_duplicates() - Detect duplicate bookmarks
- nalyze_bookmarks() - Usage statistics and insights
- alidate_links() - Check for broken/dead links
Export & Import
- export_bookmarks(format, options) - Export as JSON/CSV/HTML/XLSX
- import_bookmarks(file_path, format) - Import from various formats
- generate_report() - Create detailed bookmark reports
Utility Functions
- get_server_status() - Server health and statistics
-
efresh_bookmarks() - Reload bookmark data
- get_configuration() - View server settings
📁 Project Structure
edge-bookmark-mcp-server/ ├── src/ │ ├── server.py # Main FastMCP server │ ├── bookmark_loader.py # Edge bookmark file parsing │ ├── search_engine.py # Advanced search functionality │ ├── analytics.py # Bookmark analysis tools │ ├── exporter.py # Export/import capabilities │ ├── file_monitor.py # Real-time file monitoring │ └── config.py # Configuration management ├── tests/ # Comprehensive test suite ├── data/ # Sample and backup data ├── docs/ # Additional documentation ├── examples/ # Usage examples ├── run_server.py # Simple server launcher ├── pyproject.toml # Python packaging └── README.md # This file
⚙️ Configuration
The server supports extensive configuration through src/config.py:
- Bookmark file paths (auto-detected for different Edge profiles)
- Search indexing options
- Export templates and formats
- File monitoring settings
- Security and access controls
🔒 Security
- Read-only by default: Safe bookmark access without modifications
- Path validation: Prevents access to unauthorized files
- Error handling: Graceful handling of file access issues
- Logging: Comprehensive audit trail of operations
📊 Usage Examples
Basic Search
\`python
Search for bookmarks about "github"
results = search_bookmarks("github") \`
导出书签
python
将所有书签导出为JSON格式
export_bookmarks(“json”,{“include_modelata”:True}) \`
分析
python
获取书签统计信息
统计=analyze_bookmarks() print(f“书签总数:{stats\['otal_count'\]}”) \`
🐛 Troubleshooting
Common Issues
- "FastMCP not available"
ash pip install fastmcp>=2.10.1 --upgrade
- "Bookmark file not found"
- Ensure Edge is closed when running the server - Check Edge profile path in configuration
- "Import/export errors"
ash pip install pandas jinja2
Logging
Check logs for detailed error information:
- Server logs: Console output
- File monitoring: ile_monitor.py logs
- Analytics: nalytics.py logs
🔧 Development
Running Tests
ash python -m pytest tests/
Code Structure
- FastMCP 2.12.2 for MCP protocol implementation
- Pydantic for data validation
- Watchdog for file monitoring
- Pandas for data analysis
- Jinja2 for export templates
📈 Performance
- Fast startup: ~2-3 seconds for large bookmark collections
- Efficient search: Indexed search for 10,000+ bookmarks
- Low memory: ~50MB typical usage
- Real-time updates: \<1 second file change detection
🤝 Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- FastMCP - Excellent MCP framework
- Microsoft Edge - Bookmark file format compatibility
- Anthropic - Model Context Protocol specification
📞 Support
For issues and questions:
- GitHub Issues: https://github.com/stephanschipal/edge-bookmark-mcp/issues
- Email: stephanschipal@hotmail.com
______________________________________________________________________
Built with ❤️ using FastMCP 2.12.2
Here are all the available edge-bookmarks MCP tools:
🔍 搜索与发现:
edge-bookmarks:search_bookmarks-具有多种模式(模糊、精确、语义、域、标签)的高级书签搜索edge-bookmarks:get_search_suggestions-基于部分查询获取智能搜索建议
📊 分析和见解:
edge-bookmarks:analyze_bookmarks-基于健康评分的书签收集综合分析edge-bookmarks:detect_duplicates-具有可配置相似性阈值的高级重复检测edge-bookmarks:cleanup_duplicates-确认后删除重复书签
📁 组织机构:
edge-bookmarks:get_bookmark_folders-获取具有全面统计信息的文件夹结构
📤 导出和备份:
edge-bookmarks:export_bookmarks-导出为各种格式(JSON、CSV、HTML、XLSX、XML、YAML)
🔧 系统管理:
edge-bookmarks:initialize_server-使用全面的设置初始化服务器组件edge-bookmarks:get_server_status-获取服务器状态和运行状况信息edge-bookmarks:get_system_info-获取全面的系统信息和功能edge-bookmarks:get_monitoring_status-获取详细的文件监控状态和统计数据
🔄 实时操作:
edge-bookmarks:subscribe_to_bookmark_changes-订阅实时书签文件更改通知edge-bookmarks:refresh_bookmarks-强制刷新书签数据和搜索索引
主要特点:
- 🚀 7021个书签 准备搜索
- ⚡ 3.8毫秒 平均搜索性能
- 🔍 多种搜索模式:模糊、精确、语义、领域、标签
- 📊 健康状况分析 具有重复检测功能
- 📤 6种导出格式 具有高级过滤功能
- 🔄 实时监控 书签更改
所有工具均已投入使用! 🎯
太好了! 🎉 现在您的Edge Bookmark MCP服务器正在工作,以下是如何使用Claude聊天中的工具:
基本工具使用模式
只需让Claude自然地执行书签操作:
"List my bookmarks"
"Search for bookmarks about python"
"Find all my GitHub bookmarks"
"Export my bookmarks to JSON"
"Show me bookmark statistics"具体工具示例
📚 浏览书签
"Show me all my bookmarks"
"List bookmarks in my 'Development' folder"
"What bookmarks do I have?"🔍 搜索操作
"Search for bookmarks containing 'FastMCP'"
"Find bookmarks with 'github.com' in the URL"
"Search my bookmarks for 'machine learning'"
"Look for bookmarks tagged with 'python'"📊 分析与洞察
"Analyze my bookmark collection"
"Show me bookmark statistics"
"Find duplicate bookmarks"
"Check for broken links in my bookmarks"📤 导出和备份
"Export my bookmarks to CSV"
"Save my bookmarks as JSON"
"Create an HTML backup of my bookmarks"
"Export bookmarks from my 'Work' folder only"⚙️ 服务器管理
"Check server status"
"Refresh bookmark data"
"Show server configuration"
"Get system information"高级使用示例
复杂搜索
"Search for bookmarks from last month that contain 'AI'"
"Find all bookmarks in github.com domain"
"Show me bookmarks with multiple tags"详细分析
"Give me a detailed report of my bookmark collection"
"Show me which folders have the most bookmarks"
"Find bookmarks I haven't organized yet"自然语言集成
克劳德将自动:
- ✅ 调用正确的工具 根据您的要求
- ✅ 很好地格式化结果 便于阅读
- ✅ 组合多个操作 如有需要
- ✅ 优雅地处理错误 并提出替代方案
对话流程示例
你: “我有什么关于Python的书签?”
克劳德: *\[调用search_bookmarks(“python”)\]* “我在你的收藏中找到了15个与Python相关的书签:
- Python文档(docs.Python.org)
- FastAPI教程(FastAPI.tiangolo.com)
- ..."
你: “将这些导出到CSV文件”
克劳德: *\[使用Python搜索结果调用export_bookmarks\]* “我已将您的Python书签导出到CSV文件…”
专业提示
- 要具体 关于您想要什么:“在Development文件夹中搜索'react'”
- 询问组合:“查找GitHub书签并导出它们”
- 请求分析:“你在我的书签中看到了什么图案?”
- 使用自然语言:不需要技术语法!
您的Edge Bookmark MCP服务器现在与Claude的对话功能无缝集成!自然地问,克劳德会使用适当的工具来帮助管理你的书签。
