llm-mcp-rag  by KelvinQiu802

Augmented LLM for RAG and MCP agents

Created 5 months ago
360 stars

Top 77.7% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides an augmented Large Language Model (LLM) agent that integrates with the Model Context Protocol (MCP) and Retrieval Augmented Generation (RAG) without relying on popular frameworks like LangChain or LlamaIndex. It's designed for users who need a simplified, self-contained solution for building LLM agents capable of interacting with external tools and retrieving information from knowledge bases.

How It Works

The core architecture features an Agent class that orchestrates interactions between an LLM (specifically OpenAI's models) and multiple MCPClient instances. The MCPClient facilitates communication with MCP services, allowing the agent to discover and invoke tools. RAG is implemented via an EmbeddingRetriever that embeds documents and queries, storing them in a VectorStore for efficient similarity search. Retrieved information is then injected into the LLM's context to enhance responses.

Quick Start & Requirements

  • Install: Clone the repository (git clone git@github.com:KelvinQiu802/ts-node-esm-template.git), then run pnpm install and pnpm add dotenv openai @modelcontextprotocol/sdk chalk.
  • Prerequisites: Requires Node.js with ESM support and an OpenAI API key.
  • Setup: Assumes familiarity with Node.js package management and OpenAI API setup.

Highlighted Details

  • Supports multiple MCP server configurations.
  • Simplifies RAG implementation for context injection.
  • Demonstrates a task flow: web page reading, summarization, and file saving.
  • Includes a local document query and context injection example.

Maintenance & Community

No specific details on contributors, community channels, or roadmap are provided in the README.

Licensing & Compatibility

The project's licensing is not explicitly stated in the README. Compatibility for commercial use or closed-source linking is therefore undetermined.

Limitations & Caveats

The project appears to be a simplified implementation, and its robustness for complex, production-level agent orchestration is not detailed. The lack of explicit licensing information may pose a barrier to commercial adoption.

Health Check
Last Commit

5 months ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
32 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Simon Willison Simon Willison(Coauthor of Django), and
1 more.

Lumos by andrewnguonly

0%
2k
Chrome extension for local LLM web RAG co-piloting
Created 1 year ago
Updated 7 months ago
Feedback? Help us improve.