Browser History Analysis MCP
Accesses Firefox browser history databases to retrieve and analyze browsing data, providing insights on browsing patterns, productivity, and content consumption.
Offers limited support for accessing Safari browser history data, primarily for older versions, allowing analysis of browsing habits and patterns.
Directly reads from browser SQLite databases to extract browsing history and related data for analysis and processing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Browser History Analysis MCP analyze my browser history from the past week for productivity patterns"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Browser History MCP Server
A local Model Context Protocol (MCP) server that provides access to browser history data for comprehensive analysis and insights. Built using the official python MCP sdk, this tool can be added to Claude desktop in a few minutes using the Quick Start guide.
📋 Table of Contents
Related MCP server: askboard-mcp
✨ Features
🔍 Multi-Browser Support: Query Firefox, Chrome, and (some versions of) Safari browser history
📊 Session Analysis: Group browsing sessions with intelligent time-based clustering
🏷️ Smart Categorization: Automatically categorize websites by type and purpose
📈 Domain Analytics: Analyze domain frequency and visit patterns
🎯 Learning Insights: Identify learning patterns and educational content consumption
⚡ Productivity Metrics: Calculate productivity scores and distraction analysis
🔄 Real-time Access: Direct database access for immediate insights
🛡️ Privacy-First: Local processing with no data transmission
🚀 Quick Start
Install
uvfor dependency management:curl -LsSf https://astral.sh/uv/install.sh | sh uv syncTest locally:
uv run mcp dev server/main.pyInstall for Claude Desktop (you will need to restart Claude Desktop afterwards):
uv run mcp install server/main.py --name "Browser History MCP"
📦 Detailed installation
Prerequisites
Python 3.12 or higher
Firefox, Chrome, or Safari browser
uv (recommended) or pip
Using uv (Recommended)
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/yourusername/browser-mcp-server.git
cd browser-mcp-server
uv syncUsing pip
git clone https://github.com/yourusername/browser-mcp-server.git
cd browser-mcp-server
pip install -e .⚙️ Configuration
Automatic Setup (Recommended)
The server automatically detects your browser profile directories:
OS | Firefox Path | Chrome Path |
macOS |
|
|
Linux |
|
|
Windows |
|
|
Manual Configuration
If automatic detection fails, manually configure paths in server/main.py:
FIREFOX_PROFILE_DIR = "/path/to/your/firefox/profile"
CHROME_PROFILE_DIR = "/path/to/your/chrome/profile"Development Mode
uv run mcp dev server/main.pyPro tip: Open the version of the local URL with the token pre-filled. Then hit "Connect"
Use with Claude Desktop
uv run mcp install server/main.py --name "Browser History MCP"📚 API Reference
Core Tools
Tool | Description | Use Case |
| Simple health check to test if the MCP server is working | Initial testing |
| Step 1: Check which browsers are available and which are locked | Initial setup and troubleshooting |
| Step 2: Get raw browser history data without analysis (fastest) | Quick data retrieval |
| Step 3: Main analysis tool with options for quick_summary, basic, or comprehensive analysis | Full productivity analysis |
| Search browser history for specific queries | Targeted research |
| Get uncategorized URLs for custom categorization | Data organization |
| Safari support and accessibility diagnostics | Safari-specific issues |
Analysis Prompts
Prompt | Purpose | Output |
| Comprehensive productivity assessment | Productivity metrics and recommendations |
| Deep learning pattern analysis | Learning insights and progress tracking |
| Research topic extraction and summarization | Research themes and focus areas |
| Create personalized browsing insights | Comprehensive activity and behavior report |
| Compare browsing habits across time | Trend analysis and habit transformation metrics |
| Generate data visualizations | Interactive charts and visual analytics |
🌐 Browser Support
Browser | Status | Requirements |
Firefox | ✅ Full Support | Browser must be closed |
Chrome | ✅ Full Support | Browser must be closed |
Safari | 🔄 Limited Support | Mostly older versions of Safari |
Important: Browsers must be closed to access their history databases due to file locking mechanisms.
Troubleshooting
MCP Config
{
"mcpServers": {
"Browser History MCP": {
"command": "/usr/local/bin/uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"[wherever-you-saved-the-repo]/browser-mcp-server/server/main.py"
]
}
}
}🔒 Privacy & Security
Data Handling
Local Processing: All data processing occurs locally on your machine
No Data Transmission: No browser history data is sent to external servers (aside from whatever Claude desktop is doing)
Direct Database Access: Reads directly from browser SQLite databases
Temporary Caching: Optional local caching for performance
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
7 toolsanalyze_browser_historyB
Step 3: Analyze browser history with different levels of detail.
This is the main analysis tool that consolidates all analysis options.
Args:
time_period_in_days: Number of days of history to analyze (default: 7)
analysis_type: Type of analysis to perform:
- "quick_summary": Basic stats only (fastest)
- "basic": Domain analysis and categorization (not yet implemented)
- "comprehensive": Full analysis with sessions and insights (default)
fast_mode: If True, limits analysis for faster processing (default: True)
Inputs: time_period_in_days, analysis_type, fast_mode. Returns: result
check_browser_statusA
Step 1: Check which browsers are available and which are locked. This is the first step in the workflow - run this to see if you need to close any browsers.
Returns a dictionary with:
- status: "ready", "browser_locked", or "error"
- error_message: Clear error message if there's an issue
- user_action_required: True if user needs to close browsers
- recommended_action: Specific instructions for the user
- available_browsers: List of detected browsers
- active_browsers: List of browsers that are currently running
IMPORTANT: If status is "browser_locked", you MUST tell the user to close the specified browser(s).Inputs: no named parameters. Returns: result
diagnose_safari_supportC
Diagnose Safari support and accessibility. Useful for debugging Safari integration.
Inputs: no named parameters. Returns: result
get_browser_historyA
Step 2: Get raw browser history data without analysis. This is the fastest way to retrieve browser history and should be used before any analysis.
Args:
time_period_in_days: Number of days of history to retrieve (default: 7)
browser_type: Browser type ('firefox', 'chrome', 'safari', or None for auto-detect)
all_browsers: If True, get history from all available browsers (default: True)
Returns:
Either a list of history entries or a dictionary with partial results and browser status
Inputs: time_period_in_days, browser_type, all_browsers. Returns: result
health_checkA
Simple health check that returns immediately to test if the MCP server is working.
Inputs: no named parameters. Returns: result
search_browser_historyB
Search browser history for specific queries. Use this after getting history data.
Args:
query: Search term to look for in URLs and titles
Inputs: query (required). Returns: result
suggest_categoriesA
Get uncategorized URLs for custom categorization. Use this after running analysis.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes: check_browser_status verifies browser availability, get_browser_history retrieves raw data, analyze_browser_history performs analysis, search_browser_history searches, and suggest_categories handles categorization. However, analyze_browser_history's 'comprehensive' mode might overlap with other tools like suggest_categories, creating minor ambiguity in advanced workflows.
All tool names follow a consistent snake_case pattern with clear verb_noun combinations (e.g., check_browser_status, get_browser_history, analyze_browser_history). This predictability makes it easy for agents to understand and select tools without confusion.
With 7 tools, the server is well-scoped for browser history analysis, covering key steps from checking browser status to retrieving, analyzing, searching, and categorizing history. Each tool serves a specific role without unnecessary bloat or gaps in the workflow.
The toolset covers a complete workflow: status check, data retrieval, analysis, search, and categorization. A minor gap exists as analyze_browser_history's 'basic' mode is noted as 'not yet implemented,' which could limit some analysis options, but core operations are well-covered.
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
MCP server to assist with JxBrowser development.
An MCP server that measures MCP client behaviour and converts EBCDIC to ASCII, which nobody needs.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn MCP Server that enables AI assistants to interact with your local browsers.55MIT
- AlicenseAqualityDmaintenanceA local MCP server that collects structured human input via browser forms and maintains a searchable history dashboard.35 npmMIT
- AlicenseNot gradedqualityDmaintenanceA Python MCP server that loads and analyzes HAR files locally, providing structured summaries to AI assistants to avoid token explosion and sensitive content filtering.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server that fetches web pages, extracts clean markdown (reducing token count), caches results, and provides searchable reading history.6 npmMIT