Skip to main content
Codanna is a local code intelligence MCP server and CLI for AI coding agents. Semantic search finds code and documents by meaning. Instead of matching exact text, it understands what you’re looking for and returns relevant results even when terminology differs. Search documentation comments on symbols using natural language.
Symbol names don’t always describe their purpose - new(), Default, impl, or abbreviated names like above. Semantic search finds them through their documentation, not the name.

Search with Context

Returns symbols with line ranges, relationships (calls, callers, types), and [symbol_id:X] for follow-up queries.

Language Filtering

Filter results by programming language:
Search markdown and text files indexed in collections.

Writing Good Queries

Be specific:
  • Bad: “error”
  • Good: “error handling in file operations”
Use domain terms:
  • Bad: “make things fast”
  • Good: “performance optimization for indexing”
Add context:
  • Bad: “parse”
  • Good: “parse TypeScript import statements”

Understanding Scores

Similarity scores range from 0 to 1: Use threshold to filter weak results:

Remote Embedding Backend

Use an OpenAI-compatible HTTP embedding server instead of the local fastembed model. Supports OpenAI, Ollama, vLLM, Infinity, and any server implementing POST /v1/embeddings.

Configuration

Set environment variables to enable remote mode:
For servers requiring authentication (OpenAI, cloud providers):
Or configure in settings.toml (except the API key, which is env-var only):
Environment variables take precedence over settings.toml.
API keys are read from CODANNA_EMBED_API_KEY only. They are intentionally not stored in config files, which may be team-shared via profiles.

Switching Between Local and Remote

When you change embedding backends, the stored index dimension may not match the new backend. Codanna detects this and disables semantic search with an error:
Re-index with --force to rebuild with the new backend:

Tested Providers

Next Steps

Relationships

Trace calls, callers, and impact.

Tool Tiers

Which tool to use when.