Skip to Content
Home

dev-agent

Local semantic code search for Cursor and Claude Code via MCP.

Get Started · View on GitHub 

New in v0.10.6 — PageRank-based file ranking, subsystem detection, and dependency path tracing via traceTo. See what’s new →

Built by engineers, for engineers. An MCP server that gives your AI tools semantic code search — find code by meaning, not keywords. Everything runs locally. Your code never leaves your machine.

What it does

Your AI tool gets 5 MCP tools that understand your codebase:

ToolWhat it does
dev_searchHybrid search (BM25 + vector + RRF) — returns code snippets, not just file paths
dev_refsFind callers/callees of any function
dev_mapCodebase structure with hot paths (most referenced files)
dev_patternsCompare coding patterns against similar files
dev_statusRepository indexing status, health checks, and Antfly stats

How it works

  1. Index — Scanner parses your code (ts-morph for TypeScript, tree-sitter for Go), extracts functions, classes, types, imports, and call graphs
  2. Embed — Antfly generates vector embeddings locally via Termite (ONNX, BAAI/bge-small-en-v1.5)
  3. Search — Hybrid search combines BM25 keyword matching with vector similarity, fused via Reciprocal Rank Fusion (RRF)
  4. Auto-update — File watcher detects changes and re-indexes automatically while the MCP server is running

Why it helps

Instead of grep chains and reading entire files, your AI tool can ask conceptual questions:

QuestionWithout dev-agentWith dev-agent
”Where do we handle auth?”grep -r "auth" → 200 matchesdev_search "authentication" → 5 ranked results with code
”What calls this function?”Manual file readingdev_refs "validateUser" → callers + callees
”What’s in this codebase?”ls, find, read READMEsdev_map → structure with component counts

The key difference: semantic search finds code by meaning, not text matching. “Where do we handle errors?” finds try/catch blocks, error middleware, and validation functions — even if none contain the word “error.”

Quick Start

Install

npm install -g @prosdevlab/dev-agent

Setup and index

dev setup dev index

Connect to your AI tool

dev mcp install --cursor # For Cursor dev mcp install # For Claude Code

Features

  • Hybrid Search — BM25 keyword + vector semantic, fused with RRF
  • Code Snippets — Search returns actual code, not just file paths
  • Call Graph — Callers/callees extracted from AST at index time
  • Multi-Language — TypeScript, JavaScript, Go, Markdown
  • 100% Local — Antfly runs on your machine. No data leaves.
  • Auto-Index — File watcher re-indexes on save while MCP server runs
  • 1,600+ Tests — Production-grade reliability

MIT License

Read the story behind dev-agent → 

Last updated on