/ Verzeichnis / Playground / contextplus
● Community ForLoopCodes ⚡ Sofort

contextplus

von 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.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

contextplus.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

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

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

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

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

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

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

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

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

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

Continue nutzt ein Array von Serverobjekten statt einer Map.

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

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add contextplus -- npx -y contextplus

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: 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

Wann einsetzen: The agent wastes 30% of context reading and re-reading files.

Voraussetzungen
  • 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
Ablauf
  1. Build the context tree
    Run get_context_tree on the repo root. Summarize the top-level layers.✓ Kopiert
    → 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.✓ Kopiert
    → Function signatures without bodies
  3. Ask a semantic question
    semantic_identifier_search: 'where is JWT verification implemented and called?'✓ Kopiert
    → Ranked implementations + call sites

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

Fallstricke
  • 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
Kombinieren mit: filesystem · github

How to refactor with shadow restore points

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

Wann einsetzen: You want agent edits but also want a one-click undo that doesn't dirty git.

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

Ergebnis: Fearless refactors without polluting git history.

Fallstricke
  • Restore points live in .contextplus/ — don't check this in — Add .contextplus/ to .gitignore
Kombinieren mit: github

How to assess blast radius before deleting a function

👤 Engineers cleaning up dead code ⏱ ~10 min intermediate

Wann einsetzen: You want to know exactly who imports or uses a symbol before removing it.

Ablauf
  1. Ask for the blast radius
    get_blast_radius for function 'legacyFormatPrice' in src/pricing.ts.✓ Kopiert
    → 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.✓ Kopiert
    → Migration checklist

Ergebnis: A deletion PR with zero surprises.

Fallstricke
  • Dynamic imports (require, string refs) aren't detected — Supplement with a grep pass for the function name
Kombinieren mit: github

How to persist decisions across sessions with the memory graph

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

Wann einsetzen: You keep re-explaining the same architectural choices to the agent.

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

Ergebnis: Durable project memory that outlives the chat.

Fallstricke
  • Memory graph grows stale — Run prune_stale_links monthly
Kombinieren mit: memory-service

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

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.✓ Kopiert
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.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
Depends on embedding provider: Ollama free, OpenAI ~$0.02/1M tokens
Tokens pro Aufruf
Skeleton reads: 100-500 tokens. Full searches: 500-2000
Kosten in €
Free (open source) + embedding costs if using cloud providers
Tipp
Use Ollama with nomic-embed-text for zero marginal cost.

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: Filesystem read/write to the indexed repo
Credential-Speicherung: Embedding provider keys via env
Datenabfluss: Embeddings go to your chosen provider (or stay local with Ollama)
Niemals gewähren: Do not index directories with secrets like .env

Fehlerbehebung

Häufige Fehler und Lösungen

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.

Alternativen

contextplus vs. andere

AlternativeWann stattdessenKompromiss
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

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen