Smart Context MCP server
io.github.Arrayo/smart-context-mcp·v1.21.0·4 starsReduces AI agent token usage by 90% via context compression and task checkpoint persistence.
4 stars129 downloads/wk
Reviews
Write oneNobody has reviewed Smart Context yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Smart Context tools (22, 3 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
build_indexBuild a lightweight symbol index for the project. Speeds up smart_search ranking and smart_read symbol lookups. Pass incremental=true to only reindex files with changed mtime (much faster for large repos). Pass warmCache=true to preload frequently accessed files after indexing. Without incremental, rebuilds from scratch. Sends progress notifications during indexing for large projects.
cross_projectWork with multiple related projects (monorepos, microservices, shared libraries). Modes: discover (list related projects), search (search across projects), read (read files from multiple projects), symbol (find symbol definitions across projects), deps (get cross-project dependency graph), stats (usage statistics). Requires .devctx-projects.json config file in project root.
git_blameGet symbol-level git blame attribution. Modes: symbol (blame for specific file symbols), file (aggregated file stats), author (find symbols by author), recent (recently modified symbols). Returns author, email, date, commit, and authorship percentage for each symbol. Requires git repository and symbol index.
global_memoryOpt-in cross-project memory persisted to ~/.devctx/global.db (override with DEVCTX_GLOBAL_DB). Enable via DEVCTX_GLOBAL_MEMORY=true. Stores canonical decisions, recurring patterns, playbook drafts, notes, and repo-local noise hints so an agent can carry insights between repos without re-deriving them. Content is scrubbed for likely secrets/JWTs/API keys/emails/home paths before being persisted. Pr
smart_codeSemantic code navigation and refactoring for JS/TS via TypeScript LanguageService. Actions: definition, references, implementations, diagnostics, impact, rename. Prefer symbol name (+ optional filePath) over line/character when possible. Returns compact locations (file, start/end 1-based) — never full file bodies. impact combines semantic direct hits with import-graph transitive expansion and rela
smart_contextPREFERRED for multi-file tasks. Gets curated context in one call — replaces the manual search → read → read cycle. Combines search + graph expansion + selective reading. Primary files always include content (signatures) in balanced mode — reduces follow-up smart_read calls. Options: intent, maxTokens (budget, default 12000), diff (true for HEAD or branch name), detail (minimal/balanced/deep), incl
smart_doctorwrite actionRun an operational health check for local devctx state. Aggregates repo hygiene, SQLite `storageHealth`, retention/compaction hygiene, and legacy JSON/JSONL cleanup guidance into one inspect-only result with explicit remediation steps. Use this when `.devctx/state.sqlite` is missing, oversized, locked, corrupted, or when you want a release/preflight check for local state durability.
smart_editBatch edit multiple files with pattern replacement. Supports literal string replacement or regex patterns. Use for bulk refactoring, removing patterns (comments, console.log, etc.), or renaming across files. Optional dryRun shows preview without modifying files. Returns match count and results per file.
smart_metricsInspect token metrics recorded in project-local SQLite storage by default. Returns aggregated totals, per-tool savings, recent entries, adoption analysis, and `productQuality` signals measured from `smart_turn` orchestration events (continuity recovery, blocked-state remediation coverage, context-refresh signals, checkpoint persistence). Supports time windows (`24h`, `7d`, `30d`, `all`), optional
smart_outputPersistent output/artifact store so command output survives the context window and never needs a rerun to be re-read. Kinds: shell, test, build, lint, diff. Actions: save (kind+content, plus optional command/label/exitCode), search (query/kind/status → metadata + matching line snippets, never full bodies), excerpt (id + query|line → surrounding lines with 1-based numbers), summary (id → counts, de
smart_playbookwrite actionRun a declarative workflow (playbook) that composes other smart_* tools in one call. Built-in playbooks: preflight-merge (smart_review + smart_test affected + checkpoint), debug-flake (last_failure + curated debug context + affected tests), refactor-safe (curated context + affected tests + checkpoint), doc-sync (ADR search + docs context), ramp-up (status + doctor + ADR overview). Override or add
smart_readRead a file with token-efficient modes. ALWAYS prefer outline/signatures/symbol/explain over full. Reading cascade: outline → signatures → symbol → explain → range → full (last resort). Mode guide: outline (~90% savings): file structure, exports, top-level symbols — use first for orientation. signatures (~85% savings): function signatures with parameters and return types — use when you need the AP
smart_read_batchRead multiple files in one call. Each item accepts path, mode (prefer outline/signatures/symbol/explain — full saves 0 tokens), symbol, startLine, endLine, maxTokens (per-file budget). Optional global maxTokens budget with early stop when exceeded; when that happens, `budgetDetails` reports the batch-level stop point, marks `scope="batch"`, and includes `actions`. Max 20 files per call.
smart_resumeLightweight entry point for the first prompt of a substantial task. Equivalent to smart_turn(phase=start, ensureSession=true, verbosity=minimal): rehydrates the most recent persisted session for this project, classifies prompt continuity, and returns a compact recommendedPath. Prefer this over smart_turn(start) when you just want to recover context cheaply at the beginning of a session. SKIP for o
smart_reviewCode review preflight in one call. Given a git ref (default HEAD), returns per-file: additions/deletions, changeType, callers (importedBy), affected tests (testOf), changed symbols, and offline heuristic findings (TODO/FIXME, console.log, print, debugger, eval, dynamic Function, process.exit, "as any"/": any", alert, hardcoded secret patterns). Summary aggregates issuesBySeverity, coverageGap (fil
smart_searchSearch code with ranked, deduplicated results and index boosting. Best for: finding where a symbol is defined/used, understanding call chains, locating implementations. NOT ideal for: exact string matching (use Grep), finding files by name (use Glob), broad multi-word queries (generates noise). Optional intent adjusts ranking. `mode` controls search strategy: `needle` = exact literal only (no rege
smart_shellwrite actionRun a diagnostic shell command from an allowlist. Allowed: pwd, ls, find, rg, git (status/diff/show/log/branch/rev-parse), npm/pnpm/yarn/bun (test/run/lint/build/typecheck/check). Blocks shell operators, pipes, and unsafe commands. For large diffs: output is split by file (up to 8 files, 60 lines each); prefer git diff --stat first, then git show -- <file> per file.
smart_statusDisplay the current session context including goal, status, recent decisions, touched files, and progress. Returns a formatted summary of what has been done and what is being tracked in the active session. Use this to understand the current state of work without modifying the session. Supports format=detailed (default, full formatted output) or format=compact (minimal JSON). Optional maxItems limi
smart_summaryMaintain compressed conversation state across turns. Actions: get (retrieve current/last session), update (create or replace a session; omitted fields are cleared), append (add to existing session), auto_append (append only if something meaningful changed), checkpoint (event-driven orchestration that decides whether to auto-persist), reset (clear session), list_sessions (show all sessions), compac
smart_testTest orchestration tied to the import graph. Three actions: (1) action="affected" — given a git diff (default HEAD), expand changed files through the import graph (max 2 hops by default) and return the list of test files that should re-run; no execution. (2) action="run" — execute a test runner from an allowlist (npm-test, npm-run, pnpm-test, pnpm-run, yarn-test, yarn-run, bun-test, bun-run, node-
smart_turnOrchestrate start/end of a meaningful agent turn for multi-session tasks where context continuity matters. SKIP for single-session point-in-time tasks (reviewing a specific commit, answering a quick question, one-off lookup) — the setup overhead exceeds the benefit if the session will never be resumed. USE when: the task spans multiple chat sessions, you may return to it the next day, or the codeb
warm_cachePreload frequently accessed files into OS cache to reduce cold-start latency. Analyzes last 30 days of access patterns and warms the top 50 most-used files (configurable via DEVCTX_WARM_FILES env). Skips files >1MB. Returns warmed/skipped counts. Use after build_index or before starting intensive work sessions.
Public scan report
scanner v0.1.10 · 2026-10-15 · same rubric, same numbers if you re-run it
- Code scan98 source files scanned20/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 27 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- mediumeval / new Function used
exec.evalsrc/review/heuristics.js: …: 'high', re: EVAL_RE, message: 'use of eval()' }, { kind: 'new-function', severity…
How Smart Context compares
Against every graded Productivity MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 85/100
- higher than 65% of 1,299 Productivity servers
- Tools
- 22
- the typical Productivity server has 7
- Tools that change things
- 14%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 4
- more than 68% of 854 Productivity servers
- Downloads a week
- 129
- more than 62% of 427 Productivity servers with a package
What its tools let an agent do: 19 read · 3 change
Release history: 2 versions in the registry since 2026-06-11, latest 2026-09-18, typically one every 99 days.
Install Smart Context in Claude Code, Cursor or VS Code
Runs npx -y smart-context-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add smart-context-mcp -- npx -y smart-context-mcp
What the publisher says
From the Smart Context repository's README, as published. We do not edit it. Read it on GitHub
smart-context-mcp
MCP server that reduces AI agent token usage by up to 90% through intelligent context compression (measured on this project).
What it is
An MCP (Model Context Protocol) server that provides specialized tools for reading, searching, and managing code context efficiently. Instead of loading full files or returning massive search results, it compresses information while preserving what matters for the task.
Real metrics from production use:
- ~7M tokens → ~800K tokens (approximately 89% reduction)
- 1,500+ operations tracked across development
- Compression ratios: 3x to 46x depending on tool
- Context overhead is tracked separately so reports can show gross and net savings
Workflow-level savings:
- Debugging: ~85-90% token reduction
- Code Review: ~85-90% token reduction
- Refactoring: ~85-90% token reduction
- Testing: ~85-90% token reduction
- Architecture: ~85-90% token reduction
Real adoption in non-trivial tasks:
- Approximately 70-75% of complex tasks use devctx tools
- Most used: smartread (850+ uses), smartsearch (280+ uses), smart_shell (220+ uses)
- Primary reasons for non-usage: task too simple, no index built, native tools preferred
See Workflow Metrics and Adoption Metrics for details.
Latest Release: 1.21.0
Minor release built around a semantic engine. MCP grows from 20 → 22 tools (smartcode + smartoutput). SQLite schema bumps 8 → 9 (new outputs table; auto-migrates on first run). Zero new runtime dependencies — the TypeScript LanguageService comes from the typescript package you already have, and degrades to a fallback provider when it isn't there.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Grade history
- 2026-09-19restoreC → Ascore 85: eval / new Function used
Smart Context: common questions
- Is Smart Context MCP server safe?
- Yes, by our scan: it is graded A (85/100). Read the Smart Context safety report
- How do I install Smart Context?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Smart Context need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Smart Context maintained?
- The last commit was 47 days ago (2026-09-18). The latest release is v1.21.0.
- What can I use instead of Smart Context?
- Servers from other publishers that do the same job: Easy Notion MCP server.
- How does Smart Context compare with other Productivity MCP servers?
- safety score 85/100 (higher than 65% of 1,299 Productivity servers); tools 22 (the typical Productivity server has 7); tools that change things 14% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Smart Context
Same job from other publishers: the closest match first, then the best rated.
- Easy NotionMarkdown-first Notion MCP server. ~6-7x fewer response tokens vs official Notion MCP. 43 tools.not reviewedGrowingB