Posts

Building a Retrieval-Augmented Generation (RAG) Application with MCP, Gemini, and ChromaDB in Node.js

Building a Retrieval-Augmented Generation (RAG) Application with MCP, Gemini, and ChromaDB in Node.js Introduction Large Language Models (LLMs) such as Gemini, GPT, and Claude are powerful, but they have one important limitation—they only know what they were trained on and the information provided in the prompt. Suppose your company has an internal document containing leave policies, HR rules, medical policies, or confidential project documentation. If you ask an LLM a question about those documents, it may not know the answer because that information was never part of its training data. This is where Retrieval-Augmented Generation (RAG) becomes useful. Instead of training a new model, RAG retrieves the most relevant information from your own documents and supplies it to the LLM before generating the final answer. In this project, we build a complete RAG application using: Node.js Google Gemini API ChromaDB (Vector Database) Model Context Protocol (MCP) By the end of ...

Model Context Protocol

  Model Context Protocol (MCP): A Beginner's Guide Introduction As Large Language Models (LLMs) such as ChatGPT, Claude, and Gemini become more capable, users expect them to interact with the outside world. They should be able to access databases, read files, query APIs, send emails, and work with enterprise applications. Without a standard way of connecting AI models to these external systems, every AI application would require custom integrations for every service. This is where the Model Context Protocol (MCP) comes in. MCP provides a standardized way for AI models to communicate with external tools and resources, making integrations simpler, reusable, and easier to maintain. What is MCP? Model Context Protocol (MCP) is an open protocol that enables AI models to communicate with external tools, APIs, databases, files, and other services through a standardized interface. Think of MCP as the USB-C of AI integrations . Just as USB-C provides a common way to connect many different...

Agent AI And MCP (Model Context Protocol)

  Building My First AI Agent Using MCP and Gemini – Understanding the Complete Flow When I first started learning AI Agents and the Model Context Protocol (MCP), I found plenty of tutorials that showed how to write the code, but very few explained why each piece exists and how everything works together . This article explains a simple AI Agent built using: Node.js Google Gemini Model Context Protocol (MCP) By the end, you'll understand: What an AI Agent actually is How MCP fits into the architecture Why the LLM doesn't need to see tool implementations How tool selection really works What We Are Building Our project contains only two files. app.js server.js Although the project is small, it demonstrates the same basic architecture used by many production AI agents. The flow looks like this: User │ ▼ app.js │ ┌───────────┴────────────┐ ▼ ▼ Gemini LLM ...