HistoryMCP
БесплатноНе проверенProvides AI assistants access to browser history from SQLite databases, enabling reading and analysis of the last 100 visited URLs.
Описание
Provides AI assistants access to browser history from SQLite databases, enabling reading and analysis of the last 100 visited URLs.
README
A Model Context Protocol (MCP) tool that provides access to browser history data from SQLite databases. This tool allows AI assistants to read and analyze your browsing history through the MCP interface.
Features
- Browser History Access: Read the last 100 visited URLs from your browser's SQLite history database
- MCP Integration: Seamlessly integrates with MCP-compatible AI assistants
- Cross-Platform: Works with any browser that stores history in SQLite format (Chrome, Firefox, Safari, etc.)
Installation
Prerequisites
- Python 3.12 or higher
- A browser history SQLite database file
Setup
Clone or download this repository
Install dependencies using uv (recommended):
uv syncSet up your browser history database path:
You need to set the
SQLITE_PATHenvironment variable to point to your browser's history database:Chrome/Chromium:
export SQLITE_PATH="$HOME/Library/Application Support/Google/Chrome/Default/History"Firefox:
export SQLITE_PATH="$HOME/Library/Application Support/Firefox/Profiles/*.default/places.sqlite"Safari:
export SQLITE_PATH="$HOME/Library/Safari/History.db"Note: You may need to copy the database file to a writable location first, as browsers often lock their database files.
Usage
Running the MCP Server
python main.py
The server runs on stdio transport, which is the standard for MCP tools.
Available Tools
read_history()
Returns the last 100 visited URLs from your browser history.
Returns:
List[Dict[str, str]]: A list of dictionaries containing:"title": The title of the web page"url": The URL of the web page
Example Response:
[
{
"title": "GitHub - Homepage",
"url": "https://github.com"
},
{
"title": "Stack Overflow - Programming Questions",
"url": "https://stackoverflow.com"
}
]
Integration with MCP Clients
To use this tool with an MCP client, add it to your MCP configuration:
{
"mcpServers": {
"history": {
"command": "python",
"args": ["/path/to/historyMCP/main.py"],
"env": {
"SQLITE_PATH": "/path/to/your/browser/history.db"
}
}
}
}
Development
Project Structure
historyMCP/
├── main.py # Main MCP server implementation
├── pyproject.toml # Project configuration and dependencies
├── README.md # This file
└── uv.lock # Dependency lock file
Dependencies
mcp[cli]>=1.10.1: Model Context Protocol implementationrequests>=2.32.4: HTTP requests for web content fetchinghttpx>=0.28.1: Modern HTTP clientpandas>=2.3.0: Data manipulation (for future features)
Adding New Features
The codebase is structured to easily add new tools. To add a new MCP tool:
- Create a new function with the
@mcp.tool()decorator - Define the function signature and return type
- Add appropriate documentation
Example:
@mcp.tool()
def search_history(query: str) -> List[Dict[str, str]]:
"""
Search browser history for URLs containing the query
Args:
query: Search term to look for in URLs and titles
Returns:
List of matching history entries
"""
# Implementation here
pass
Security Considerations
⚠️ Important: This tool accesses your browser history, which may contain sensitive information. Consider the following:
- Only use this tool with trusted MCP clients
- Be aware that your browsing history will be shared with AI assistants
- Consider using a separate browser profile for testing
- Review the data being shared before using in production environments
Troubleshooting
Common Issues
"Please set the SQLITE_PATH environment variable"
- Make sure you've set the
SQLITE_PATHenvironment variable correctly - Verify the path points to a valid SQLite database file
- Make sure you've set the
"Database is locked"
- Close your browser completely
- Copy the database file to a temporary location
- Update the
SQLITE_PATHto point to the copied file
"No such file or directory"
- Check that the browser history database path is correct for your system
- Ensure the file exists and is readable
Getting Help
If you encounter issues:
- Check that your Python version is 3.12 or higher
- Verify all dependencies are installed correctly
- Ensure the SQLite database path is correct and accessible
- Check that your browser is not currently running (to avoid database locks)
License
This project is open source. Please check the license file for more details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request or open an issue for bugs and feature requests.
Установка HistoryMCP
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Jovillios/historyMCPFAQ
HistoryMCP MCP бесплатный?
Да, HistoryMCP MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для HistoryMCP?
Нет, HistoryMCP работает без API-ключей и переменных окружения.
HistoryMCP — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить HistoryMCP в Claude Desktop, Claude Code или Cursor?
Открой HistoryMCP на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolCompare HistoryMCP with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
