Context Pilot
Syncs secure notes from Bitwarden (never logins or passwords).
Syncs repositories, wikis, and packages from a self-hosted Gitea instance.
Syncs repositories, releases, READMEs, and issues from GitHub.
Syncs documents, sheets, and slides from Google Drive via a service account.
Syncs automations, scenes, and entities from Home Assistant.
Syncs deployments, services, and configmaps from a Kubernetes cluster (never secrets).
Receives memories pushed from n8n workflows via inbound webhooks.
Syncs pages and databases from Notion via API.
Syncs Markdown notes with frontmatter from an Obsidian vault.
Syncs OCR'd documents from a Paperless-ngx instance as searchable memories.
Fetches and indexes articles from RSS or Atom feeds.
Syncs messages from a Telegram bot via Bot API.
Click on "Install 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., "@Context Pilotsave this idea: use redis for caching"
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.
What is Context Pilot?
Context Pilot gives your AI assistant persistent, structured memory. It stores knowledge as searchable memories with tags, connects to external sources (GitHub, Gitea, Paperless-ngx, Email, local folders), and serves context to Claude Code via an MCP Server — all through a clean web UI.
Key idea: Instead of repeating yourself, teach your AI once. Context Pilot remembers.
Quick Start
Docker (recommended)
docker pull applehell/contextpilot:latest
docker run -d --name context-pilot \
-p 8080:8080 -p 8400:8400 \
-v context-pilot-data:/data \
applehell/contextpilot:latestWeb UI: http://localhost:8080 | Health: http://localhost:8080/health
Docker Compose
services:
context-pilot:
image: applehell/contextpilot:latest
container_name: context-pilot
restart: unless-stopped
ports:
- "8080:8080" # Web UI
- "8400:8400" # MCP streamable-http server
volumes:
- context-pilot-data:/data
- /path/to/docs:/mnt/docs:ro # optional: folder for indexing
environment:
- CONTEXTPILOT_DATA_DIR=/data
volumes:
context-pilot-data:docker compose up -dFrom Source
git clone https://github.com/applehell/contextpilot.git
cd contextpilot
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python -m src.webCLI Options
python -m src.web # Web UI + MCP Server
python -m src.web --no-mcp # Web UI only
python -m src.web --port 9090 # Custom web port
python -m src.web --mcp-port 8500 # Custom MCP portFeatures
Web UI — 8 Tabs
Tab | Description |
Dashboard | Stats cards, top tags, size distribution, connector health, import, live activity (SSE), context preview |
Memories | Full CRUD with Markdown editor, search, filters, tags, TTL, pin, bulk ops, compact view, collapsible sidebar |
Skills | Connected MCP skill registry with status indicators |
Graph | Interactive knowledge graph (vis.js) with search, physics toggle, navigation buttons, node detail panel |
Secrets | Scan memories for API keys, passwords, tokens (OWASP patterns) |
Sources | Connector Store (17 sources), folder mapping, webhooks, auto-sync scheduler |
Assembler | Templates, auto-suggest, 6 compressors, manual block assembly, export (CLAUDE.md, Markdown) |
Settings | Profiles, MCP server control, DB maintenance, import/export hub, scheduler, system info |
Memories
Capability | Details |
Create & Edit | Modal editor with Markdown support (EasyMDE), live preview |
Search | Full-text search via SQLite FTS5 + hybrid semantic search |
Tags | Clickable tag filtering, color-coded top tags, bulk tag operations |
Categories |
|
TTL | Time-to-live with auto-expiry, color-coded lifetime indicators (urgent/soon/limited/permanent) |
Pin | Pin important memories to the top |
Relations | Cross-references between memories, bidirectional graph edges |
Versioning | Track changes with diff view, restore previous versions |
Compact View | Toggle between detail and compact mode (persisted in localStorage) |
Bulk Ops | Multi-select, bulk delete, bulk TTL, bulk tag editing |
Backup | Create, list, restore, delete backups via API |
Export | JSON, CLAUDE.md, Markdown export (all or filtered by tag) |
Connector Store — 17 Sources
Category | Connector | What it syncs |
Documents | Paperless-ngx | OCR'd documents via REST API |
Microsoft Excel | Spreadsheets as markdown tables (openpyxl) | |
Google Drive | Docs, Sheets, Slides via service account | |
Development | GitHub | Repos, releases, READMEs, issues |
Gitea | Self-hosted repos, wikis, packages | |
Knowledge | Obsidian Vault | Markdown notes with frontmatter |
Bookmarks | Web pages fetched and indexed | |
RSS / Atom Feeds | Feed articles (no external deps) | |
Notion | Pages and databases via API | |
KeePass | Notes, titles, URLs only (never passwords) | |
Bitwarden | Secure Notes only (never logins) | |
Communication | Email (IMAP) | Emails from any IMAP server |
Telegram | Bot messages via Bot API | |
Microsoft Teams | Channel messages via Graph API | |
Infrastructure | Kubernetes | Deployments, services, configmaps (never secrets) |
Dockge | Docker Compose stacks (env values redacted) | |
Smart Home | Home Assistant | Automations, scenes, entities |
Local | Folder Mapping | Directories with extension filter, PDF extraction |
Each connector tracks sync history (last 20 runs), supports TTL for auto-expiring synced memories, and exposes a health dashboard (GET /api/connectors/health).
Import
Upload files directly from the dashboard or settings:
Format | Source |
| Claude Code instruction files |
| GitHub Copilot instruction files |
| memory-mcp MCP Server databases |
| Context Pilot JSON export |
Profiles — Complete Isolation
Every profile is a fully isolated workspace:
profiles/{name}/
data.db <- Memories, tags, FTS index, templates, relations, versions, activity
connector_*.json <- Connector configs (Paperless, GitHub, Gitea, Email, ...)
folders.json <- Folder source configuration
webhooks.json <- Webhook configuration
embeddings.db <- Semantic search index (TF-IDF)Switch instantly via header dropdown
Create with knowledge import from existing profiles
Export/import as ZIP archive (full profile backup & restore)
Rename, delete, duplicate from Settings
Context Assembler
The Assembler optimizes your memories for AI consumption within a token budget:
Feature | Description |
Templates | Save reusable filter + budget combos (tag filter, key prefix, token budget) |
Auto-Suggest | Analyzes memory clusters and proposes templates automatically |
Compression | 6 compressors: bullet extract, code compact, YAML struct, Mermaid, table, dedup |
Weight-Based Priority | Blocks ranked by usage history and feedback scores |
Duplicate Detection | Find and remove duplicate or near-duplicate memories |
Export | Generate CLAUDE.md or Markdown from templates |
MCP Integration |
|
More Features
Feature | Description |
Setup Wizard | 7-step animated onboarding for fresh installs |
Knowledge Graph | Interactive vis.js network with search, physics toggle, navigation buttons |
Secrets Scanner | Detects API keys, passwords, tokens, private keys (OWASP patterns) |
Live Activity | Real-time SSE event stream with color-coded category badges |
Keyboard Shortcuts |
|
Global Search |
|
Dark Mode | System preference detection + manual toggle, smooth transitions |
Compact View | Toggle dense memory list, persisted per browser |
Collapsible Filters | Sidebar sections fold to save space |
Skeleton Loading | Shimmer animations across all loading states |
Responsive | Desktop, tablet, mobile with bottom nav bar and safe area insets |
PWA Ready | Web app manifest, standalone display mode |
Security | DOMPurify (XSS), Security Headers, non-root Docker, secrets redaction |
Inbound Webhooks | Push memories from external services (n8n, Home Assistant) |
Auto-Sync Scheduler | Automatic connector sync on configurable intervals |
Analytics | Top memories, tag stats, connector stats, memory growth, token usage |
MCP Server
Context Pilot includes a built-in MCP Server (Model Context Protocol) that lets Claude Code access your memories directly.
20 MCP Tools
Claude Code --> MCP Server (streamable-http, Port 8400)
|
|-- Memory CRUD
| memory_set / memory_get / memory_delete
| memory_search / memory_list
|
|-- Skills
| register_skill / unregister_skill
| list_registered_skills / heartbeat
| get_skill_context
|
|-- Context Assembly
| assemble_context / list_blocks
| assemble_template / list_templates / suggest_templates
| get_context_for_task
|
|-- Intelligence
| capture_learnings / get_related_memories
| submit_feedback / get_block_weightProfile-aware: The MCP server follows profile switches in real-time — no restart needed.
How it works:
Start Context Pilot -> MCP Server starts on port 8400
Auto-registers in
~/.claude.jsonClaude Code can now read/write your memories
Stop app -> auto-deregistration
Claude Code Plugin
The context-pilot plugin adds deep integration with Claude Code — auto-profile detection, slash commands, and a skill file that teaches Claude how to use ContextPilot optimally.
Installation
git clone https://github.com/applehell/context-pilot-plugin.git \
~/.claude/plugins/cache/context-pilot/1.0.0What It Does
Component | Description |
SessionStart Hook | Auto-detects the right profile based on your working directory |
| Dashboard, template assembly, search, profile switch, suggest, status |
| Quick-save a memory from your session |
Skill File | Teaches Claude all 20 MCP tools, best practices, and when to use what |
MCP Config | Auto-registers the ContextPilot MCP server |
Commands
/context-pilot # Show dashboard (profile, memories, templates)
/context-pilot bugfix-context # Assemble the "bugfix-context" template
/context-pilot search docker # Search memories for "docker"
/context-pilot profile smarthome # Switch to smarthome profile
/context-pilot suggest # Auto-suggest new templates
/context-pilot status # Show connector health
/context-pilot-learn infra/nginx Reverse proxy config for port 443 || infra,nginxProfile Auto-Detection
Working Directory Contains | Profile |
|
|
|
|
(default) | Keep current profile |
Configuration
# Shell config (~/.claude/context-pilot.conf)
CONTEXTPILOT_URL=http://your-server:8080
CONTEXTPILOT_MCP_URL=http://your-server:8400/mcp/Docker
Available on Docker Hub
Tag | Description |
Latest stable release |
Volumes
Mount | Purpose |
| Database, profiles, configs (persistent) |
| Optional: local folder for indexing (read-only) |
Build from Source
git clone https://github.com/applehell/contextpilot.git
cd contextpilot
docker build -t contextpilot .
docker compose up -dArchitecture
Browser --> Web UI (FastAPI, Port 8080)
|-- Dashboard Stats, Import, Live Activity SSE, Context Preview
|-- Memories CRUD, Search, Editor, Tags, TTL, Compact View
|-- Skills Skill Registry, Status Indicators
|-- Knowledge Graph Interactive vis.js network, Search, Navigation
|-- Secrets Scanner, Redacted View
|-- Sources Connector Store (17), Folder Mapping, Webhooks, Scheduler
|-- Assembler Templates, Auto-Suggest, Compression, Export
|-- Settings Profiles, MCP, DB, Import/Export, Scheduler
Claude Code --> MCP Server (streamable-http, Port 8400)
|-- 20 tools: memory CRUD, search, templates, assembly,
| skill registry, feedback, context-for-task, learnings
|
--> Plugin (context-pilot)
|-- SessionStart hook (auto-profile detection)
|-- /context-pilot + /context-pilot-learn commands
|-- Skill file (best practices + tool guidance)
Connectors --> 17 sources (GitHub, Gitea, Paperless, Obsidian, Email,
Notion, Teams, Telegram, RSS, Excel, Google Drive,
KeePass, Bitwarden, Kubernetes, Dockge, Bookmarks, HA)
Storage --> SQLite (WAL mode + FTS5, Schema v13)Data Paths
# Local
~/.contextpilot/
profiles.json <- Profile registry
profiles/<name>/data.db <- Per-profile database + configs
# Docker (CONTEXTPILOT_DATA_DIR=/data)
/data/
profiles.json
profiles/<name>/data.dbAPI Reference
Endpoint | Method | Description |
| GET | System metrics and health check |
| GET | Aggregated dashboard stats |
| GET | Detailed stats (tags, sizes, growth) |
| GET | MCP server registration status |
| GET | Fresh install detection |
Endpoint | Method | Description |
| GET | List memories (pagination, sort, source filter) |
| POST | Create memory |
| GET | Read single memory |
| PUT | Update memory |
| DELETE | Soft-delete memory (trash) |
| GET | Full-text search + tag/source filter |
| GET | List memory sources with counts |
| GET | Memory count per category |
| GET | Related memories (cross-references) |
| GET | Version history |
| POST | Pin/unpin memory |
| POST | Bulk delete |
| POST | Bulk TTL update |
| POST | Bulk tag operations |
| GET | Hybrid/semantic/keyword search (mode param) |
| GET | Export as JSON |
| GET | All tags |
| GET | Quick filter presets |
Endpoint | Method | Description |
| GET | List all connectors with config and schema |
| GET | Connector details + schema |
| POST | Configure connector |
| PUT | Update connector config |
| POST | Test connection |
| POST | Sync data |
| POST | Enable/disable |
| GET | Sync history (last 20) |
| DELETE | Remove connector config |
| GET | Health dashboard for all connectors |
| GET/POST | List/add folder sources |
| PUT/DELETE | Update/remove folder source |
| POST | Scan single folder |
| POST | Scan all folders |
Endpoint | Method | Description |
| GET/POST | List/create templates |
| DELETE | Delete template |
| POST | Assemble with compression + weighting |
| GET | Auto-suggest templates from memory clusters |
| POST | Manual block assembly |
| POST | Token estimation |
| POST | Test compressor |
| GET | Find duplicate memories |
| POST | Preview context assembly with budget |
| GET | Export as CLAUDE.md |
| GET | Export as Markdown |
Endpoint | Method | Description |
| GET/POST | List/create profiles |
| POST | Switch active profile (by ID) |
| PUT/DELETE | Rename/delete |
| POST | Duplicate profile |
| GET | Export profile as ZIP |
| POST | Import profile from ZIP |
Endpoint | Method | Description |
| GET | Recent events |
| GET | SSE real-time stream |
| GET | Event statistics |
| GET | Secrets scan |
| GET | Redacted memory view |
| GET | Graph data (vis.js format) |
Endpoint | Method | Description |
| POST | Upload CLAUDE.md |
| POST | Upload Copilot.md |
| POST | Upload SQLite DB |
| POST | Upload JSON export |
Endpoint | Method | Description |
| GET | Overview dashboard data |
| GET | Most accessed memories |
| GET | Most frequent tags |
| GET | Per-connector statistics |
| GET | Daily memory count growth |
| GET/POST | List/create backups |
| POST | Restore backup |
| DELETE | Delete backup |
| GET/POST | List/create webhooks |
| PUT/DELETE | Update/delete webhook |
| POST | Inbound webhook (push memories) |
Endpoint | Method | Description |
| GET | Database statistics |
| POST | Compact database |
| POST | Rebuild search index |
| POST | Remove old trash entries |
| POST | Remove expired memories |
| GET | List trashed memories |
| POST | Restore from trash |
| POST | Purge all trash |
| POST | Register MCP in ~/.claude.json |
| POST | Deregister MCP |
| GET/POST | Auto-sync scheduler control |
Project Structure
src/
core/ Core logic
assembler.py 3-phase token-budget assembler
analytics.py Usage analytics engine
backup.py Backup & restore manager
block.py Block data model
claude_config.py ~/.claude.json reader/writer
compress_detect.py Shared compression hint detection
compressors/ 6 compressors (bullet, code, yaml, mermaid, table, dedup)
context.py Context builder for auto-assembly
dependency_detector.py Cross-memory dependency detection
duplicates.py Duplicate / near-duplicate finder
embeddings.py TF-IDF embeddings + hybrid search
events.py Global EventBus with SSE broadcast
log.py Logging setup + logger factory
relevance.py Relevance scoring engine
scheduler.py Auto-sync scheduler (APScheduler)
secrets.py Secrets detector (OWASP patterns)
skill_registry.py MCP skill lifecycle tracker
token_budget.py tiktoken wrapper
webhooks.py Inbound webhook processor
weight_adjuster.py Usage-based weight adjustment
connectors/ 17 external service connectors
github.py, gitea.py Development sources
paperless.py, excel.py Document sources
gdrive.py Google Drive (service account JWT)
obsidian.py, notion.py Knowledge sources
rss.py, bookmarks.py Web sources
keepass.py, bitwarden.py Secure notes (never passwords)
email_imap.py, telegram.py Communication sources
teams.py Microsoft Teams (Graph API)
kubernetes.py, dockge.py Infrastructure sources
homeassistant.py Smart Home source
storage/ SQLite persistence (Schema v13)
db.py DB engine + migrations (v1-v13)
memory.py MemoryStore (CRUD + FTS5)
memory_activity.py Access tracking & usage stats
profiles.py Profile manager
folders.py Folder source manager + file indexer
relations.py Cross-reference / relation store
templates.py Assembly template store
versions.py Memory version history
usage.py Usage-based weighting store
settings.py Key-value settings store
project.py Project context store
web/ Web app (FastAPI + vanilla JS)
app.py App factory: logging, static mounts, router wiring
deps.py Shared dependencies (stores, profile dir, index state)
__main__.py Entry point (web + MCP process launcher)
routers/ API endpoints, grouped by domain
memories.py Memory CRUD, search, tags, bulk ops, trash
connectors.py Connector store, test/sync/health
profiles.py Profile lifecycle, switch, export/import
assembly.py Templates, assemble, compress, duplicates, export
analytics.py Analytics, backups, maintenance
system.py Health, dashboard, MCP register, scheduler
events.py Events + SSE stream
folders.py Folder sources + scan
graph.py Knowledge graph data
import_routes.py CLAUDE.md / Copilot.md / SQLite / JSON import
projects.py Project context
templates/index.html Single-page frontend
static/app.js Frontend logic
static/style.css Themes (light + dark)
interfaces/ External interfaces
mcp_server.py MCP Server (20 tools, streamable-http transport)
cli.py Click CLI
importers/ Memory import
claude.py CLAUDE.md parser
copilot.py copilot-instructions.md parser
sqlite.py memory-mcp SQLite importer
tests/ 2100+ testsDevelopment
python3 -m venv .venv && source .venv/bin/activate
pip install -e '.[dev]'
pytest tests/ -v
python -m src.web --reload # Hot-reloadTech Stack
Layer | Technology |
Backend | Python 3.11+, FastAPI, Uvicorn |
Frontend | Vanilla JS, vis.js (graph), EasyMDE (editor), DOMPurify (XSS) |
Database | SQLite (WAL mode, FTS5, Schema v13) |
Realtime | Server-Sent Events (SSE) |
AI Integration | MCP Server (FastMCP, 20 tools), tiktoken |
Connectors | requests, openpyxl, PyJWT, pykeepass, PyYAML |
Security | DOMPurify, Security Headers, secrets scanner, non-root Docker |
Deployment | Docker (arm64 + amd64), 2100+ tests |
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/applehell/contextpilot'
If you have feedback or need assistance with the MCP directory API, please join our Discord server