CICADA
mcp-name: io.github.wende/cicada
Code Intelligence: Contextual Analysis, Discovery, and Attribution
Context compaction for AI code assistants – Give your AI structured, token-efficient access to 17+ languages including Elixir, Python, TypeScript, JavaScript, Rust, and more.
Up to 50% less waiting · Up to 70% less tokens · Up to 99% less explanations to do Tighter context = Better Quality
Quick Install · Security · Developers · AI Assistants · Docs
</div>Why CICADA?
The core problem: AI code assistants waste context on blind searches. Grep dumps entire files when you only need a function signature, leaving less room for actual reasoning.
The Context Compaction Approach
Instead of raw text dumps, CICADA gives your AI structured, pre-indexed knowledge:
| Traditional Search | CICADA |
|---|---|
| Grep dumps entire files | Returns only signatures + call sites |
| Misses aliased imports | Tracks all reference types |
| No semantic understanding | Keyword search finds verify_credentials when you ask for "authentication" |
What You Get
- AST-level indexing – Module/function/class definitions with signatures, specs, docs
- 17+ language support – Elixir, Python, TypeScript, JavaScript, Rust, Go, Java, Kotlin, Scala, C/C++, Ruby, C#, Visual Basic, Dart, PHP, Erlang (beta)
- Complete call-site tracking – Aliases, imports, dynamic references across all supported languages
- Semantic search – Find code by concept with keyword extraction or embeddings (Ollama integration)
- Git + PR attribution – Surface why code exists, not just what
- Dependency analysis – Bidirectional tracking (what calls this, what does this call)
- Automatic language detection – Works seamlessly across polyglot codebases
Install
# 1. Install uv (if needed)
# curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install cicada-mcp
# In your repo
cicada claude # or: cicada cursor, cicada vs, cicada gemini, cicada codex, cicada opencode, cicada zeduvx cicada-mcp claude # or cursor, vsor
claude mcp add cicada uvx cicada-mcpgemini mcp add cicada uvx cicada-mcpcodex mcp add cicada uvx cicada-mcpkimi mcp add --transport stdio cicada -- cicada-mcpUses your editor's built-in MCP management to install CICADA.
</details> </div>Available commands after installation:
cicada [claude|cursor|vs|gemini|codex|opencode|zed]- One-command interactive setup per projectcicada-mcp- MCP server (auto-started by editor)cicada serve- Start REST API server for HTTP access to all MCP toolscicada status- Show index status, PR index, link status, agent files, MCP configscicada stats [repo]- Display usage statistics (tool calls, tokens, execution times)cicada watch- Watch for file changes and automatically reindexcicada index- Re-index code with custom options (-f/--force,--keywords,--embeddings,--watch)cicada index-pr- Index pull requests for PR attributioncicada run [tool]- Execute any of the 7 MCP tools directly from CLIcicada agents install- Install Claude Code agents to./.claude/directorycicada link [parent_dir]- Links current repository to an existing indexcicada clean- Completely removes cicada integration from your folder as well as all settings
Ask your assistant:
# Elixir
"Show me the functions in MyApp.User"
"Where is authenticate/2 called?"
# Python
"Show me the AuthService class methods"
"Where is login() used in the codebase?"
# Both languages
"Find code related to API authentication"Privacy & Security
- 100% local: parsing + indexing happen on your machine; no external access.
- No telemetry: CICADA doesn't collect usage or any telemetry.
- Read-only tools: MCP endpoints only read the index; they can't change your repo.
- Optional GitHub access: PR features rely on
ghand your existing OAuth token. - Data layout:
Your repo only gains an editor config (
~/.cicada/projects/<repo_hash>/ ├─ index.json # modules, functions, call sites, metadata ├─ config.yaml # indexing options + mode ├─ hashes.json # incremental indexing cache └─ pr_index.json # optional PR metadata + reviews.mcp.json,.cursor/mcp.json,.vscode/settings.json,.gemini/settings.json,.codex/mcp.json, or.opencode.json).
For Developers
Wire CICADA into your editor once, and every assistant session inherits the context.
Install & Configure
cd /path/to/project
cicada claude # or cicada cursor / cicada vs / cicada gemini / cicada codex / cicada opencode / cicada zedEnable PR Attribution (optional)
brew install gh # or apt install gh
gh auth login
cicada index-pr . # incremental
cicada index-pr . --clean # full rebuildUnlocks questions like "Which PR introduced line 42?" or "What did reviewers say about billing.ex?"
Automatic Re-indexing with Watch Mode
Enable automatic reindexing when files change by starting the MCP server with the --watch flag:
** .mcp.json**
{
"mcpServers": {
"cicada": {
"command": "cicada-mcp",
"args": ["--watch"],
"env": {
"CICADA_CONFIG_DIR": "/home/user/.cicada/projects/<hash>"
}
}
}
}When watch mode is enabled:
- A separate process monitors
.ex,.exs(Elixir) and.py(Python) files for changes - Changes are automatically reindexed (incremental, fast)
- 2-second debounce prevents excessive reindexing during rapid edits
- The watch process stops automatically when the MCP server stops
- Excluded directories:
deps,_build,node_modules,.git,assets,priv,.venv,venv
CLI Cheat Sheet
Note: Language detection is automatic – CICADA detects Elixir (mix.exs) and Python (pyproject.toml) projects automatically.
| Command | Purpose | Run When |
|---|---|---|
cicada claude | Configure MCP + incremental re-index | First setup, after local changes |
cicada status | Check index health, link status, agent files | After setup, troubleshooting |
cicada stats | View usage statistics and token metrics | Monthly reviews, optimization |
cicada watch | Monitor files and auto-reindex on changes | During active development |
cicada index --keywords . | Rebuild with keyword indexing | After large refactors or enabling keywords mode |
cicada index --embeddings . | Rebuild with embeddings (semantic search) | When you want Ollama-powered semantic analysis |
cicada index-pr . | Sync PR metadata/reviews | After new PRs merge |
Troubleshooting
<details> <summary><b>"Index file not found"</b></summary>Run the indexer first:
cicada index /path/to/projectEnsure indexing completed successfully. Check for ~/.cicada/projects/<hash>/index.json.
Use the exact module name as it appears in code (e.g., MyApp.User, not User).
If module was recently added, re-index:
cicada index .Troubleshooting checklist:
-
Verify configuration file exists:
# For Claude Code ls -la .mcp.json # For Cursor ls -la .cursor/mcp.json # For VS Code ls -la .vscode/settings.json -
Check paths are absolute:
cat .mcp.json # Should contain: /absolute/path/to/project # Not: ./project or ../project -
Ensure index exists:
ls -la ~/.cicada/projects/ # Should show directory for your project -
Restart editor completely (not just reload window)
-
Check editor MCP logs:
- Claude Code: --debug
- Cursor: Settings → MCP → View Logs
- VS Code: Output panel → MCP
Setup GitHub CLI:
# Install GitHub CLI
brew install gh # macOS
sudo apt install gh # Ubuntu
# or visit https://cli.github.com/
# Authenticate
gh auth login
# Index PRs
cicada index-prCommon issues:
- "No PR index found" → Run
cicada index-pr . - "Not a GitHub repository" → Ensure repo has GitHub remote
- Slow indexing → First-time indexing fetches all PRs; subsequent runs are incremental
- Rate limiting → GitHub API has rate limits; wait and retry if you hit limits
Force rebuild:
cicada index-pr --cleanError: "Keyword search not available"
Cause: Index was built without keyword extraction.
Solution:
# Re-index with keyword extraction
cicada index . # or --keywordsVerify:
cat ~/.cicada/projects/<hash>/config.yaml
# Should show:
# indexing:
# mode: keywordsMore detail: PR Indexing, Incremental Indexing.
<details> <summary><b>Python Indexing</b></summary>Requirements:
- Node.js (for scip-python indexer)
- Python project with pyproject.toml
First-time setup: CICADA automatically installs scip-python via npm on first index. This may take a minute.
Known limitations (Beta):
- First indexing may be slower than Elixir (SCIP generation step)
- Large virtual environments (.venv) are automatically excluded
- Some dynamic Python patterns may not be captured
Performance tips:
# Ensure .venv is excluded
echo "/.venv/" >> .gitignore
# Use keywords mode for quickest indexing
cicada index --keywords .Report issues: GitHub Issues with "Python" label
</details>For AI Assistants
CICADA ships 7 focused MCP tools designed for efficient code exploration across Elixir, Python, and Erlang codebases.
🧭 Which Tool Should You Use?
| Need | Tool | Notes |
|---|---|---|
| Start exploring | query | 🚀 START HERE - Smart discovery with keywords/patterns + filters (scope, recent, path) |
| View a module's complete API | search_module | Functions, signatures, specs, do |
…