/ 디렉터리 / 플레이그라운드 / contextplus
● 커뮤니티 ForLoopCodes ⚡ 바로 사용

contextplus

제작: ForLoopCodes · ForLoopCodes/contextplus

Give your coding agent a persistent semantic map of the repo — AST + embeddings + memory graph + shadow undo — so it stops re-reading the whole codebase.

Context+ (ForLoopCodes/contextplus) is a TypeScript MCP exposing 17 tools for repo understanding: tree-sitter AST trees, file skeletons, semantic identifier search, blast-radius analysis, a memory graph for long-running projects, and shadow restore points for safe edits. Works with Ollama or cloud embeddings.

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

contextplus.replay ▶ 준비됨
0/0

설치

클라이언트 선택

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "contextplus": {
      "command": "npx",
      "args": [
        "-y",
        "contextplus"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config 열기. 저장 후 앱 재시작.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "contextplus": {
      "command": "npx",
      "args": [
        "-y",
        "contextplus"
      ],
      "_inferred": true
    }
  }
}

Cursor는 Claude Desktop과 동일한 mcpServers 스키마 사용. 프로젝트 설정이 전역보다 우선.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "contextplus": {
      "command": "npx",
      "args": [
        "-y",
        "contextplus"
      ],
      "_inferred": true
    }
  }
}

Cline 사이드바의 MCP Servers 아이콘 클릭 후 "Edit Configuration" 선택.

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "contextplus": {
      "command": "npx",
      "args": [
        "-y",
        "contextplus"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop과 같은 형식. Windsurf 재시작 후 적용.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "contextplus",
      "command": "npx",
      "args": [
        "-y",
        "contextplus"
      ]
    }
  ]
}

Continue는 맵이 아닌 서버 오브젝트 배열 사용.

~/.config/zed/settings.json
{
  "context_servers": {
    "contextplus": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "contextplus"
        ]
      }
    }
  }
}

context_servers에 추가. 저장 시 Zed가 핫 리로드.

claude mcp add contextplus -- npx -y contextplus

한 줄 명령. claude mcp list로 확인, claude mcp remove로 제거.

사용 사례

실전 활용법: contextplus

How to make a new agent productive in a large repo fast

👤 Tech leads using Cursor/Claude Code on a monorepo ⏱ ~20 min intermediate

언제 쓸까: The agent wastes 30% of context reading and re-reading files.

사전 조건
  • Node + bun or npm — brew install bun or use npm
  • An embeddings provider (Ollama local, OpenAI, Gemini, or Groq) — ollama pull nomic-embed-text for offline
흐름
  1. Build the context tree
    Run get_context_tree on the repo root. Summarize the top-level layers.✓ 복사됨
    → AST tree with file headers
  2. Skeleton-only reads
    Use get_file_skeleton on src/auth/ to see just signatures — don't read bodies yet.✓ 복사됨
    → Function signatures without bodies
  3. Ask a semantic question
    semantic_identifier_search: 'where is JWT verification implemented and called?'✓ 복사됨
    → Ranked implementations + call sites

결과: Agent operates with a mental model of the repo using ~5x less context.

함정
  • First-run indexing is slow — Run the initial scan once; incremental updates are fast
  • Embeddings model mismatch between index and query — Stick with one embedding model; re-index if you change it
함께 쓰기: filesystem · github

How to refactor with shadow restore points

👤 Devs worried about letting agents edit code ⏱ ~15 min intermediate

언제 쓸까: You want agent edits but also want a one-click undo that doesn't dirty git.

흐름
  1. Capture a restore point
    Create a restore point named 'before-auth-refactor'.✓ 복사됨
    → Point id returned
  2. Let the agent edit
    propose_commit: refactor JWT verification to use the new key rotation helper.✓ 복사됨
    → Files edited + validation passed
  3. Rollback if wrong
    undo_change back to 'before-auth-refactor'.✓ 복사됨
    → Files reverted, git history clean

결과: Fearless refactors without polluting git history.

함정
  • Restore points live in .contextplus/ — don't check this in — Add .contextplus/ to .gitignore
함께 쓰기: github

How to assess blast radius before deleting a function

👤 Engineers cleaning up dead code ⏱ ~10 min intermediate

언제 쓸까: You want to know exactly who imports or uses a symbol before removing it.

흐름
  1. Ask for the blast radius
    get_blast_radius for function 'legacyFormatPrice' in src/pricing.ts.✓ 복사됨
    → Every file/line that imports or calls it
  2. Plan removal
    For each call site, suggest the replacement. Any site without a clean swap, flag as risky.✓ 복사됨
    → Migration checklist

결과: A deletion PR with zero surprises.

함정
  • Dynamic imports (require, string refs) aren't detected — Supplement with a grep pass for the function name
함께 쓰기: github

How to persist decisions across sessions with the memory graph

👤 Any agent user on a long-running project ⏱ ~15 min advanced

언제 쓸까: You keep re-explaining the same architectural choices to the agent.

흐름
  1. Seed memory
    upsert_memory_node: 'We chose Postgres over MongoDB because of transactional invariants in the billing flow.'✓ 복사됨
    → Node created with embedding
  2. Create relations
    create_relation: link that decision to files src/billing/*.ts with edge type 'implements'.✓ 복사됨
    → Edge created
  3. Retrieve next session
    search_memory_graph: 'why are we using Postgres?'✓ 복사됨
    → Decision surfaces with supporting files

결과: Durable project memory that outlives the chat.

함정
  • Memory graph grows stale — Run prune_stale_links monthly
함께 쓰기: memory-service

조합

다른 MCP와 조합해 10배 효율

contextplus + github

Use blast-radius findings to populate a tracking issue

Run get_blast_radius on LegacyAuth then create a GitHub tracking issue with each call site as a checklist item.✓ 복사됨
contextplus + memory-service

Persist long-term decisions across projects using mcp-memory-service as the shared store

Whenever Context+ captures a new architectural decision, mirror it into mcp-memory-service.✓ 복사됨

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
get_context_tree root: str, depth?: int First call in a new repo session free
get_file_skeleton path: str Cheap file overview free
semantic_code_search query: str, k?: int Find code by meaning 1 embedding + 1 vector search
semantic_identifier_search query: str Locate a function/class 1 vector search
get_blast_radius symbol: str, file?: str Before deleting/renaming free
run_static_analysis path?: str Unused code + type errors free
propose_commit files: Edit[] Apply edits with validation free
list_restore_points See available rollbacks free
undo_change restore_point_id: str Revert a shadow edit free
upsert_memory_node content: str, tags?: str[] Save a durable fact 1 embedding
search_memory_graph query: str, traversal?: int Recall past decisions 1 vector search

비용 및 제한

운영 비용

API 쿼터
Depends on embedding provider: Ollama free, OpenAI ~$0.02/1M tokens
호출당 토큰
Skeleton reads: 100-500 tokens. Full searches: 500-2000
금액
Free (open source) + embedding costs if using cloud providers
Use Ollama with nomic-embed-text for zero marginal cost.

보안

권한, 시크릿, 파급범위

최소 스코프: Filesystem read/write to the indexed repo
자격 증명 저장: Embedding provider keys via env
데이터 외부 송신: Embeddings go to your chosen provider (or stay local with Ollama)
절대 부여 금지: Do not index directories with secrets like .env

문제 해결

자주 발생하는 오류와 해결

Indexing is extremely slow

Add large directories (node_modules, dist) to .contextplusignore; use Ollama locally.

Semantic search returns irrelevant results

Your query is too abstract — include a concrete symbol or filename hint.

undo_change fails with 'point not found'

Shadow points are per-session by default. Persist across sessions via the config flag.

Tree-sitter grammar missing for a language

Check the supported extensions list; files of unsupported types are skipped but indexed as plain text.

대안

contextplus 다른 것과 비교

대안언제 쓰나단점/장점
mcp-language-serverYou want LSP semantics (rename, references) rather than embedding-based searchNo memory graph, no shadow undo
codebase-memory-mcpYou prefer a knowledge-graph view over per-file skeletonsDifferent index shape; 66 languages

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기