Back to Blog

1 minute read

MCP + RAG: Semantic code search over your GitHub repos

Nemanja Vasić

Software Engineer

Building a Retrieval-Augmented Generation (RAG) system for source code presents unique challenges compared to standard plain-text document retrieval. Because code is inherently structured and symbolic, relying on signatures, annotations, and structural context rather than standard sentences, it requires an entirely different approach to parsing, chunking, and embedding.

Our software engineer, Nemanja Vasić , shares valuable insights into building a specialized RAG pipeline in his latest article. By delving into the mechanics behind semcode, an MCP (Model Context Protocol) server designed for semantic code search across GitHub repositories, developers can gain a deeper understanding of how to treat code as queryable data.

In his post, Nemanja breaks down both the ingestion and retrieval phases, explaining how Tree-sitter is used to parse code into self-contained “Code Symbols”, why a hybrid approach using both dense (meaning-based) and sparse (exact-token) embeddings is crucial for code, and how server-side Reciprocal Rank Fusion (RRF) in Qdrant ensures highly accurate search results.

Elevate your understanding of applying RAG, MCP, and hybrid search to software codebases by reading the full breakdown.

Original article

Find out more

Tags:


Nemanja Vasić

Software Engineer

Nemanja is a seasoned Software Developer with over 5 years of professional experience in the information technology industry. His current tech stack comprises ReactJs, NextJs, Javascript, NodeJs, Java, Spring Boot, and MongoDB, among others.

He holds a degree from the Faculty of Technical Sciences, University of Novi Sad, and has a proven track record of delivering high-quality software solutions.

Related posts.