Back to Home
luisrodriguesphd icon

mcp-rag-agent

Verified Safe

by luisrodriguesphd

Overview

This system provides Retrieval-Augmented Generation (RAG) capabilities, allowing an AI agent to answer questions based on a corpus of internal policy documents using hybrid search with MongoDB Atlas.

Installation

Run Command
python -m mcp_rag_agent.mcp_server.server

Environment Variables

  • MONGODB_ATLAS_CLUSTER_URI
  • MONGODB_ATLAS_DB_NAME
  • OPENAI_API_KEY
  • EMBEDDING_MODEL_NAME
  • EMBEDDING_DIMENSION
  • TEXT_MODEL_NAME
  • EVALUATION_MODEL_NAME
  • MCP_SERVER_NAME
  • MCP_SERVER_HOST
  • MCP_SERVER_PORT
  • SEMANTIC_WEIGHT
  • FEATURE_FLAG_MCPSERVER_ENABLED
  • FEATURE_FLAG_WEBSEARCH_ENABLED
  • INGESTED_DOC_DIRECTORY
  • EVALUATION_DOC_DIRECTORY
  • MONGODB_USERS_COLLECTION
  • MONGODB_CONVERSATIONS_COLLECTION
  • MONGODB_MESSAGES_COLLECTION
  • MONGODB_DOCUMENTS_COLLECTION
  • MONGODB_VECTOR_COLLECTION
  • MONGODB_VECTOR_INDEX_NAME

Security Notes

The project uses standard practices for handling sensitive information by loading API keys and database URIs from environment variables, preventing hardcoded secrets. It relies on external cloud services (OpenAI, MongoDB Atlas), necessitating secure configuration of these services (e.g., IP whitelisting, access controls). No 'eval' or other directly exploitable dangerous functions were found. The general security posture is good for a modern Python application.

Similar Servers

Stats

Interest Score13
Security Score9
Cost ClassHigh
Avg Tokens1750
Stars1
Forks0
Last Update2025-12-23

Tags

RAGAI AgentVector SearchMongoDBLangChain