Skip to main content

MCP server for searching local browser history files. Also compatible with llm-tools.

Project description

Local Browser History MCP

An MCP server that allows searching local browser history files through a unified interface. Works with MCP-compatible clients and as a tool for the llm CLI tool.

The tool currently supports Chrome, Firefox, and Safari browser histories.

Installation

MCP Server (Claude Desktop, Claude Code, etc.)

Install with MCP support:

pip install llm-tools-browser-history

Quick start for Claude Desktop - add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "browser-history": {
      "command": "uvx",
      "args": [
        "--from",
        "llm-tools-browser-history",
        "browser-history-mcp",
      ]
    }
  }
}

Once configured, you can use the browser_history tool in conversations with Claude.

Note that the CLI supports additional options as needed:

browser-history-mcp --help

Note: Safari browser history is blocked by TCC - you would need to explicitly allow access to your Safari data (I don't yet have instructions for this, but welcome contributions!)

llm CLI tool

Install for use with llm:

# install the plugin:
llm install llm-tools-browser-history

# see available plugins:
llm plugins

...
  {
    "name": "llm-tools-browser-history",
    "hooks": [
      "register_tools"
    ],
    "version": "0.1.0"
  },
...

Examples:

# Search for pages mentioning yosemite in title or URL
llm -T llm_time -T BrowserHistory "what pages about yosemite did I look up recently?"

# Limit to Firefox and Safari sources
llm -T llm_time -T 'BrowserHistory(["firefox","safari"])' "what pages about yosemite did I look up recently?"

llm -T BrowserHistory "show a table of how much I used each browser over the past year by month"

Security and Privacy

Warning: This tool has read-access to your entire browser history. You risk sending this highly sensitive personal data to third-party services (like OpenAI).

See the lethal trifecta article for more information about the risks of using tools like this with LLMs.

To mitigate the risks of data leakage:

  • Only runs queries against a copy of the target browser's history database (so any malicious modification has no effect).
  • Limits the number of results to no more than 100 records per tool use.
  • Does not return the entire browser history record. This tool will return a subset of fields (URL, title, visit date). Query parameters are stripped from URLs and timestamps only include the date (not the time).

Dev setup

make setup
make test

pip install -e .

llm -T llm_time -T BrowserHistory --td "what pages about yosemite did I look up recently?"

Documentation

  • MCP Setup Guide - Setting up the MCP server for Claude Desktop, Claude Code, etc.

ADRs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_tools_browser_history-0.3.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_tools_browser_history-0.3.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file llm_tools_browser_history-0.3.0.tar.gz.

File metadata

File hashes

Hashes for llm_tools_browser_history-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7f244490e9d21dcc770c6ad9c7d0791743f73d8b19cc9c6b981e54c6140004e4
MD5 5359096cfd5c8748727e1950bb5f6d36
BLAKE2b-256 52ed340be9bf1e95db5469a667ef7e1e06f74341730cd16c021f5cbef8c1d9d1

See more details on using hashes here.

File details

Details for the file llm_tools_browser_history-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_tools_browser_history-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db05f30aa48f10e079d3480b56f0e4c3343158352dc39e3e47880033aacf15e8
MD5 c7c31e7a960d83ec32aaa5750c865fc6
BLAKE2b-256 03ee0d55e8e9c913b43355acd73df3335495ee53e2ab7e5f262438b684be3385

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page