loading…
Search for a command to run...
loading…
A powerful MCP server that extracts, stores, searches, and analyzes Claude.ai conversations with SQLite database, semantic search, and multiple export formats i
A powerful MCP server that extracts, stores, searches, and analyzes Claude.ai conversations with SQLite database, semantic search, and multiple export formats including Obsidian and PDF.
PyPI version Python 3.11+ License: MIT
A powerful Model Context Protocol (MCP) server for extracting, storing, searching, and analyzing Claude.ai conversations with enhanced database storage, semantic search, and multiple export formats.
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Claude.ai Web │────▶│ Chrome Extension │────▶│ Bridge Server │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ MCP Client │◀────│ MCP Server │◀────│ Database │
│ (Claude App) │ │ (Enhanced) │ │ (SQLite+FTS) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
┌───────┴───────┐
▼ ▼
┌──────────┐ ┌──────────┐
│ Exporters│ │ Search │
│ (PDF/MD) │ │ (AI/FTS) │
└──────────┘ └──────────┘
Add to your Claude Desktop config:
{
"mcpServers": {
"claude-context": {
"command": "uvx",
"args": ["mcp-claude-context"],
"env": {
"CLAUDE_SESSION_KEY": "sk-ant-sid01-...",
"CLAUDE_ORG_ID": "28a16e5b-..."
}
}
}
}
That's it! No installation needed. See full uvx guide →
# Using pre-built image
docker run -d \
--name mcp-claude-context \
-p 8000:8000 \
-v $(pwd)/data:/app/data \
hamzaamjad/mcp-claude-context:latest
# Or with docker-compose
curl -O https://raw.githubusercontent.com/hamzaamjad/mcp-claude-context/main/docker-compose.simple.yml
docker-compose -f docker-compose.simple.yml up -d
# Mac/Linux
curl -sSL https://raw.githubusercontent.com/hamzaamjad/mcp-claude-context/main/deployment/one-click-install.sh | bash
# Windows (PowerShell)
iwr -useb https://raw.githubusercontent.com/hamzaamjad/mcp-claude-context/main/deployment/install.ps1 | iex
Prerequisites:
Install dependencies:
poetry install
Initialize database:
poetry run python -c "from src.models.conversation import init_database; init_database()"
Install Chrome extension:
chrome://extensions/extension/ directoryStart the server:
poetry run python -m src.direct_api_server
| Tool | Description | Requires API Keys |
|---|---|---|
list_conversations |
List all conversations from Claude.ai | ✅ |
get_conversation |
Get specific conversation details | ✅ |
search_conversations |
Search conversations by keyword | ✅ |
get_conversation_messages |
Get full messages from local data | ❌ |
| Tool | Description |
|---|---|
search_messages |
Full-text search across all messages |
semantic_search |
AI-powered similarity search |
get_analytics |
Get conversation statistics and insights |
| Tool | Description |
|---|---|
export_conversations |
Export to JSON/CSV formats |
export_to_obsidian |
Export to Obsidian vault with backlinks |
bulk_operations |
Tag, export, delete, or analyze in bulk |
| Tool | Description |
|---|---|
update_session |
Update Claude.ai session credentials |
migrate_to_database |
Migrate JSON files to SQLite |
rebuild_search_index |
Optimize search performance |
# List conversations
{
"tool": "list_conversations",
"arguments": {
"session_key": "YOUR_SESSION_KEY",
"org_id": "YOUR_ORG_ID",
"limit": 50,
"sync_to_db": true
}
}
# Search with AI
{
"tool": "semantic_search",
"arguments": {
"query": "discussions about machine learning",
"search_type": "hybrid",
"top_k": 10
}
}
# Export to Obsidian
{
"tool": "export_to_obsidian",
"arguments": {
"conversation_ids": ["conv-id-1", "conv-id-2"],
"vault_path": "/path/to/obsidian/vault"
}
}
Extract single conversation:
Bulk extract all conversations:
View analytics:
| Variable | Description | Default |
|---|---|---|
MCP_DB_PATH |
Database location | data/db/conversations.db |
MCP_EXPORT_DIR |
Export directory | exports/ |
NOTION_API_KEY |
Notion integration | Optional |
sessionKey valueorg_id in Network tab API calls| Operation | JSON Files | SQLite Database |
|---|---|---|
| Search 1K convos | 2.3s | 0.23s |
| Load conversation | 150ms | 45ms |
| Export 100 convos | 5.2s | 1.8s |
The server uses sentence transformers for AI-powered search:
Export conversations with:
Process multiple conversations:
{
"tool": "bulk_operations",
"arguments": {
"operation": "analyze",
"conversation_ids": ["id1", "id2", "id3"],
"params": {}
}
}
"Session expired" error
update_session toolChrome extension not connecting
Database locked error
Search not finding results
rebuild_search_index toolEnable detailed logging:
LOG_LEVEL=DEBUG poetry run python -m src.direct_api_server
Contributions are welcome! Please:
# Install dev dependencies
poetry install --with dev
# Run tests
poetry run pytest
# Format code
poetry run black src/
poetry run ruff src/
MIT License - see LICENSE file
Note: This tool is not affiliated with Anthropic. Use responsibly and respect rate limits.
Run in your terminal:
claude mcp add mcp-claude-context-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.