continuum-ai-mcp
v1.0.2
Published
AI Development Memory Layer — Universal Language Support MCP Server
Maintainers
Readme
Continuum
AI Development Memory Layer — Universal Language Support
Give your AI coding assistant persistent memory across context windows. Continuum is a local MCP server that watches your codebase, indexes symbols from 14+ languages, tracks your session state, and lets AI assistants resume exactly where they left off — even after context compaction.
The Problem
AI coding assistants lose all context when their conversation fills up (context compaction). Every time this happens:
- You re-explain the goal from scratch
- The AI re-reads files it already processed
- Architectural decisions get forgotten
- Momentum is lost
Continuum fixes this. It persists session state in a local SQLite database and exposes it through MCP tools so any AI assistant can instantly recover full context.
Architecture
Your Codebase
│ (chokidar file watcher)
▼
FileWatcher ──► IncrementalParser ──► SQLite (knowledge.db)
(14 languages) │
┌─────┴──────┐
│ Symbols │
│ Sessions │
│ Tasks │
│ FTS5 Index │
└─────┬───────┘
│
McpServer (stdio)
10 MCP Tools
│
Claude Code / Cursor / CopilotQuick Start
# 1. Clone
git clone https://github.com/yourusername/continuum
cd continuum
# 2. Install
npm install --legacy-peer-deps
# 3. Configure
cp .env.example .env
# Edit .env: set WATCH_PATHS to your project's src directory
# 4. Run (development)
npm run dev
# 5. Build (production)
npm run build
npm startWire to Claude Code
Create .vscode/mcp.json in your project's root (not inside continuum/):
{
"mcpServers": {
"continuum": {
"command": "node",
"args": ["/absolute/path/to/continuum/dist/mcp/McpServer.js"],
"cwd": "/absolute/path/to/continuum",
"env": {
"WATCH_PATHS": "${workspaceFolder}/src",
"DB_PATH": "/absolute/path/to/continuum/knowledge.db",
"LOG_LEVEL": "info"
}
}
}
}For development (no build step):
{
"mcpServers": {
"continuum": {
"command": "npx",
"args": ["tsx", "src/mcp/McpServer.ts"],
"cwd": "/absolute/path/to/continuum"
}
}
}Reload VS Code (Cmd+Shift+P on Mac / Ctrl+Shift+P on Windows → Developer: Reload Window). Verify: ask Claude "what tools do you have?" — you should see all 10 Continuum tools.
MCP Tools
| Tool | Description |
|------|-------------|
| get_session | 🔄 Core recovery tool. Get full session state — call after any context compaction |
| save_task | 💾 Save structured task state (goal, decisions, next steps, open questions) |
| get_touched_files | 📁 Files modified/created/deleted this session |
| find_related_files | 🔍 Cross-layer search for symbols, features, and files |
| search_symbols | 🔎 Full-text search all indexed symbols (FTS5) |
| get_schema | 🗄️ Live DB schema for a table (MSSQL/PostgreSQL/MySQL, cached 1h) |
| get_dependencies | 🕸️ Symbols defined in a file + outgoing relationships |
| list_languages | 🌍 All supported languages with indexed file/symbol counts |
| get_session_report | 📊 Session metrics: tool calls, files touched, estimated tokens saved |
| health_check | 🩺 Server health, uptime, DB status |
Slash Commands
Create these in your project's .claude/commands/ folder:
| Command | Action |
|---------|--------|
| /resume | Recover full session after compaction — continue without re-explaining |
| /checkpoint | Proactively save task state before context fills |
| /task [description] | Start a task with full codebase context pre-loaded |
| /report | Show session efficiency metrics |
Supported Languages
| Language | Extensions | Symbol Types |
|----------|-----------|--------------|
| TypeScript | .ts, .tsx | class, interface, function, enum, type, method, property |
| JavaScript | .js, .jsx, .mjs, .cjs | class, function, method |
| Python | .py, .pyw | class, function, method, async def |
| Rust | .rs | struct, enum, trait, fn, mod, type, impl |
| Go | .go | func, method, struct, interface, type |
| Java | .java | class, interface, enum, method, constructor |
| C# | .cs | class, interface, enum, struct, record, method, property |
| C/C++ | .c, .cpp, .h, .hpp | class, struct, function, method |
| Ruby | .rb, .rake | class, module, def, method |
| PHP | .php | class, interface, trait, enum, function, method |
| Swift | .swift | class, struct, protocol, enum, func, extension |
| Kotlin | .kt, .kts | class, interface, enum, object, fun |
| SQL | .sql | TABLE, VIEW, PROCEDURE, FUNCTION, TYPE, INDEX |
| Markdown | .md, .mdx | H1 (doc), H2 (section), H3 (subsection) |
Adding a new language: Create a file in src/languages/definitions/yourlanguage.ts, call registerLanguage() with your rules, and import it in LanguageRegistry.ts. No other changes needed.
Database Schema (Optional)
Enable the get_schema tool by setting DB_TYPE in .env:
# PostgreSQL
DB_TYPE=postgres
PG_HOST=localhost
PG_PORT=5432
PG_DATABASE=myapp
PG_USER=myuser
PG_PASSWORD=mypassword
# MSSQL
DB_TYPE=mssql
MSSQL_HOST=localhost
MSSQL_DATABASE=myapp
MSSQL_USER=myuser
MSSQL_PASSWORD=mypassword
# MySQL / MariaDB
DB_TYPE=mysql
MYSQL_HOST=localhost
MYSQL_DATABASE=myapp
MYSQL_USER=myuser
MYSQL_PASSWORD=mypasswordConfiguration Reference
| Variable | Default | Description |
|----------|---------|-------------|
| WATCH_PATHS | ./src | Comma-separated paths to watch |
| DB_PATH | ./knowledge.db | SQLite database location |
| LOG_LEVEL | info | debug | info | warn | error |
| NODE_ENV | development | Set to production for JSON logs |
| DB_TYPE | (none) | mssql | postgres | mysql |
Development
npm run dev # Run with tsx (no build step)
npm run type-check # TypeScript strict check
npm run lint # ESLint
npm run format # Prettier
npm test # Vitest
npm run test:watch # Vitest watch mode
npm run test:coverage # Coverage report
npm run build # Production TypeScript compileDocker
docker build -t continuum .
docker compose up -dHow It Works
- Startup: Continuum creates a new session UUID in SQLite and starts watching your configured paths.
- Indexing: Every file change triggers incremental parsing. The file's MD5 hash is checked — unchanged files are skipped. New symbols are extracted and stored in SQLite with FTS5 indexing.
- Session tracking: Every file change after the initial scan is recorded as a
touched_fileevent (debounced to 5 seconds per path). - MCP tools: Your AI assistant calls tools via stdio.
save_taskcheckpoints the current goal and decisions;get_sessionrecovers them after compaction. - Schema cache:
get_schemafetches live database schema and caches it in SQLite for 1 hour.
Troubleshooting
Claude Code doesn't see the tools
→ Reload VS Code after editing mcp.json. Check npm run dev starts without errors.
File changes not being indexed
→ Ensure WATCH_PATHS includes the directory you're editing. Check LOG_LEVEL=debug for watcher events.
MSSQL connection fails
→ Set LOG_LEVEL=debug and check the error. Ensure trustServerCertificate=true for local SQL Server.
MCP server crashes on startup
→ Ensure no console.log in any source file (breaks stdio MCP transport). Use the logger utility.
Symbols not extracted for my language
→ Open src/languages/definitions/ and check the regex rules. Enable LOG_LEVEL=debug to see what's parsed.
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feat/new-language - Add your language definition in
src/languages/definitions/ - Add tests in
tests/parser.test.ts - Run
npm test && npm run type-check - Submit a PR
License
MIT — see LICENSE
Continuum v1.0 — Model-agnostic · Offline · No cloud dependencies · Production-ready
