DEV Community

Naman Khater
Naman Khater

Posted on

Your AI coding assistant is flying blind — here's how to fix it

Let me paint a picture you probably recognize.

You're working in a 200-file project. You ask Copilot to refactor a function. It confidently rewrites it — but breaks three callers in other files because it didn't know they existed. You ask Cursor to trace a bug through your service layer. It guesses the function signatures instead of looking them up.

The AI isn't dumb. It's just working without a map.

Why AI assistants struggle with real codebases

Most AI coding tools operate on what's directly visible — your open tab, maybe a few related files the editor pulls in. They don't have a symbol table. They don't know your dependency graph. They can't answer "where is this function defined?" or "what calls this method?" without scanning every file from scratch.

This is fine for small scripts. It falls apart on anything with real architecture.

MCP changes the game

MCP (Model Context Protocol) lets AI assistants call external tools during a conversation. Instead of the AI guessing at your code structure, it can ask a tool: "find me every reference to processPayment" or "what does the UserService class look like?"

The problem is — who builds these tools? Most MCP servers are built for APIs and databases. Not for code.

I built one for code

CIPHER-Local is a free VS Code extension that turns your workspace into a queryable code intelligence backend. It parses your code with Tree-sitter, indexes everything into SQLite, and exposes 7 MCP tools your AI assistant can call.

Here's what that looks like in practice:

Before CIPHER-Local:

"Refactor the calculateDiscount function"
→ AI rewrites it, misses 4 callers, introduces a type mismatch

After CIPHER-Local:

AI calls resolve_symbol("calculateDiscount") → gets the full definition
AI calls find_references("calculateDiscount") → sees all 4 callers
AI calls get_file_context("pricing.ts") → understands the surrounding module
→ Refactors correctly, updates all call sites

The AI goes from pattern-matching on vibes to working with actual structural knowledge.

The 7 tools your AI gets

Tool What it does
search_symbols Find functions, classes, types by name pattern
resolve_symbol Get the full definition and source of any symbol
find_references Find every import and call site for a symbol
semantic_search BM25 full-text search across your indexed code
get_dependencies See package dependencies (npm, pip, cargo, go.mod, etc.)
get_file_context Get all symbols defined in a specific file
list_namespaces Discover all indexed workspaces

These work with GitHub Copilot, Cursor, Claude Code, and Claude Desktop — anything that speaks MCP.

What gets indexed

13 languages out of the box: TypeScript, JavaScript, Python, Java, Go, Rust, C, C++, C#, Ruby, PHP, Swift, and Kotlin. All parsed with Tree-sitter WASM grammars — no native dependencies, no compilation step.

Nothing leaves your machine

This matters. CIPHER-Local runs entirely on localhost. Your code index lives in a SQLite file in VS Code's storage. There's no cloud sync, no API key, no account creation. It's MIT licensed and the source is on GitHub.

For anyone working on proprietary code, internal tools, or just uncomfortable with cloud-based indexing — this is built for you.

The honest state of things

This is a beta (v0.1.3) built by a solo developer. It works well on the projects I've thrown at it, but I know there are edge cases I haven't hit. Some things I'm actively working on:

  • ONNX-based vector search for smarter semantic queries
  • Better handling of monorepos
  • More granular symbol relationship mapping

If you try it and something breaks, that's genuinely useful feedback. Open an issue or just tell me what language/framework you were using.

Links

  • Install: Search "CIPHER-Local" in VS Code, or grab it from the Marketplace
  • Source: GitHub
  • Works with: GitHub Copilot, Cursor, Claude Code, Claude Desktop

If you're building with MCP or have ideas for code intelligence tools that would make your AI assistant smarter, I'd love to hear about it in the comments.

Top comments (0)