Back to Home
Srinivs-p icon

aiAgents_database

by Srinivs-p

Overview

Intelligent database querying system enabling natural language interaction with Oracle databases via AI agents, vector search, and Retrieval-Augmented Generation (RAG).

Installation

Run Command
python example_mcp_server.py

Environment Variables

  • LLM_API_KEY
  • LLM_MODEL
  • LLM_PROVIDER
  • EMBEDDING_MODEL
  • CHUNK_SIZE
  • CHUNK_OVERLAP
  • TOP_K_RESULTS
  • MCP_SERVER_URL
  • MCP_SERVER_PORT
  • VECTOR_DB_TYPE

Security Notes

CRITICAL: The MCP server in `mcp/server.py` contains severe SQL injection vulnerabilities in `_handle_query_database` and `_handle_execute_sql` methods. User-provided `query` and `sql` parameters are directly executed via `cursor.execute()` without sanitization or proper parameterization, allowing arbitrary SQL code execution. Additionally, Oracle database credentials are expected to be hardcoded into `db_engine.py` (copied from `db_engine.example.py`), which is a significant security anti-pattern for secret management. The `config/settings.py` also validates for `VECTOR_DB_URL` as required, but the default `chroma` setup in `.env.example` does not provide it, indicating a potential configuration discrepancy or security oversight if other vector DBs are used without proper URL validation.

Similar Servers

Stats

Interest Score0
Security Score2
Cost ClassHigh
Avg Tokens5500
Stars0
Forks0
Last Update2025-11-18

Tags

AI AgentsRAGVector SearchOracle DatabaseNatural Language ProcessingMCP Server