<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-a-local-first-rag-engine-for-ai-coding-assistants-nrv6je5uv" -->

---
title: Building a Local-First RAG Engine for AI Coding Assistants
description: AmanCMCP is a local-first search engine for codebases designed to provide AI coding assistants with better context. It combines hybrid search (keyword and...
canonical: https://daily.dev/posts/building-a-local-first-rag-engine-for-ai-coding-assistants-nrv6je5uv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building a Local-First RAG Engine for AI Coding Assistants | daily.dev
og:description: AmanCMCP is a local-first search engine for codebases designed to provide AI coding assistants with better context. It combines hybrid search (keyword and...
og:url: https://daily.dev/posts/building-a-local-first-rag-engine-for-ai-coding-assistants-nrv6je5uv
og:image: https://api.daily.dev/og/posts/NrV6jE5uV.png
og:image:alt: Building a Local-First RAG Engine for AI Coding Assistants
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a Local-First RAG Engine for AI Coding Assistants

**[Niraj Kumar](https://daily.dev/sources/zrrzmmpzvfmdslwfilgcz)** · [@nirajkvinit](https://daily.dev/nirajkvinit) · 2 min read · 3 upvotes · 0 comments

## Summary

AmanCMCP is a local-first search engine for codebases designed to provide AI coding assistants with better context. It combines hybrid search (keyword and semantic), code-aware parsing using tree-sitter, and local embeddings via Ollama. Written as a single Go binary, it works with any MCP-compatible client like Claude Code or Cursor, runs entirely on your machine without cloud dependencies, and targets sub-100ms query performance on 50,000+ files.

## Content

Every AI coding assistant has the same problem.
They can write code, explain algorithms, and debug errors. But ask "where is authentication handled?" and they're lost.

The assistant doesn't know your codebase. It sees files one at a time. No memory. No structure.

Solutions exist. Most require cloud indexing, Python dependency stacks, or lock you into one IDE.

I'm building AmanCMCP. A search engine for codebases that runs entirely on your machine.

What's different:
- Hybrid search that adapts, Combines keyword matching with semantic understanding. 
- Detects query type automatically — error codes get precision search, natural language gets meaning-based search.
- Code structure, not text blobs - Parses with tree-sitter. Chunks by functions and classes, not line counts. A file becomes logical pieces, not arbitrary splits.
- Single binary Written in Go. Download and run. No Python environments. No dependency conflicts.
- Works with any MCP client -  Claude Code, Cursor, or any compatible assistant. Not locked to one tool.
- Local embeddings Vector search via Ollama on your hardware. No API costs. No data leaving your machine.

This weekend I'll be building this MCP server.
Sub-100ms queries on 50,000+ files. Designed for laptops, not data centers.

AI assistants are only as good as the context they receive. That context shouldn't require cloud servers, subscription fees, or giving up control of your code.

![architecture](https://media.daily.dev/image/upload/s--7PoaFdxk--/f_auto/v1766846190/ugc/content_e13631ca-f810-4d8b-adff-66077c1d3d51?_a=BAMAK+ZW0)

Read More: 👇 

[Local First RAG Engine](https://dev.to/nirajkvinit1/building-a-local-first-rag-engine-for-ai-coding-assistants-okp)

hashtag#AI hashtag#OpenSource hashtag#DeveloperTools hashtag#BuildInPublic hashtag#Golang hashtag#RAG hashtag#LocalFirst hashtag#LLM hashtag#DevTools hashtag#AIAssistant

## Similar posts on daily.dev

- [Building a Practical AI Agent with RAG, MCP, and Ollama How I built \(and iterated on\) a production‑ready AI agent that actually works with real data](https://daily.dev/posts/building-a-practical-ai-agent-with-rag-mcp-and-ollama-how-i-built-and-iterated-on-a-production-r-1v9gmzmqj) · The Miners · 2 upvotes · 0 comments
- [Medium](https://daily.dev/posts/medium-kz1oa1nub) · Medium · 1 upvotes · 0 comments
- [Local RAG for Agents: Integrating Private Knowledge Bases with Awesome-LLM-Apps](https://daily.dev/posts/local-rag-for-agents-integrating-private-knowledge-bases-with-awesome-llm-apps-gdqud2z89) · SitePoint · 0 upvotes · 0 comments
- [Build a Coding Assistant with Weaviate MCP: RAG over Code & Docs](https://daily.dev/posts/build-a-coding-assistant-with-weaviate-mcp-rag-over-code-docs-y9occpmhd) · Weaviate · 0 upvotes · 0 comments

---

Tags: [#ai](https://daily.dev/tags/ai), [#golang](https://daily.dev/tags/golang), [#rag](https://daily.dev/tags/rag), [#mcp](https://daily.dev/tags/mcp), [#ollama](https://daily.dev/tags/ollama)

[View this post on daily.dev](https://daily.dev/posts/building-a-local-first-rag-engine-for-ai-coding-assistants-nrv6je5uv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/building-a-local-first-rag-engine-for-ai-coding-assistants-nrv6je5uv","headline":"Building a Local-First RAG Engine for AI Coding Assistants","text":"AmanCMCP is a local-first search engine for codebases designed to provide AI coding assistants with better context. It combines hybrid search (keyword and semantic), code-aware parsing using tree-sitter, and local embeddings via Ollama. Written as a single Go binary, it works with any MCP-compatible client like Claude Code or Cursor, runs entirely on your machine without cloud dependencies, and targets sub-100ms query performance on 50,000+ files.","url":"https://daily.dev/posts/building-a-local-first-rag-engine-for-ai-coding-assistants-nrv6je5uv","datePublished":"2025-12-27T14:37:03.223Z","dateModified":"2025-12-27T14:37:20.315Z","author":{"@type":"Person","name":"Niraj Kumar","url":"https://daily.dev/nirajkvinit","image":"https://media.daily.dev/image/upload/s--QdgacqS0--/f_auto/v1769543872/avatars/avatar_ZRRZMmPZvFmdSLWfILGcZ?_a=BAMAMiiu0","description":"Platform Engineer. Fullstack AI Solutions Architect","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":990}},"image":"https://media.daily.dev/image/upload/s--RovGFEE2--/f_auto/v1766846223/posts/NrV6jE5uV?_a=BAMAK+ZW0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/zrrzmmpzvfmdslwfilgcz","name":"Niraj Kumar"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Niraj Kumar","item":"https://daily.dev/sources/zrrzmmpzvfmdslwfilgcz"},{"@type":"ListItem","position":3,"name":"Building a Local-First RAG Engine for AI Coding Assistants"}]}
```

