Production data exposure
Most text-to-database tools send records or user data through an external model. ANDI sends structural schema metadata—not your documents.
ANDI compiles natural-language intent into validated, index-aware, read-only BSON—without sending your production records to an LLM.
“Find Alex's language and wallet balance.”
email = ${target_email}$matchindex first$lookupusers → wallets$project2 fieldsZero records sent to the modelExecution stays inside your environment
A standardized tool call does not make a generated query correct, efficient, or safe to execute against production.
Most text-to-database tools send records or user data through an external model. ANDI sends structural schema metadata—not your documents.
Raw LLM output breaks on nested $lookup, $unwind, $facet, and $group stages. ANDI compiles against the schema and validates the result.
Prompt injection should never become a database command. ANDI rejects insert, update, delete, $out, and $merge at the core engine.
They solve different layers of the stack—and work best together.
MCP gives every agent the same doorway. ANDI checks what comes through it.
ANDI separates model reasoning from runtime execution so every stage can be inspected, constrained, and validated.
Split the goal into filters, projections, aggregation, and sort.
↓Resolve real collection keys and isolate local BSON types.
↓Map cross-collection references into correct joins.
↓Order $match before memory-heavy stages to preserve indexes.
↓Bind runtime inputs and emit executable, read-only BSON.
✓Runtime values are declared as typed placeholders, then bound locally at execution time. The model never gets a chance to turn an email address into query logic.
intent = {
"goal": "Find the preferred language and
wallet balance for this user",
"runtime_inputs": [{
"email": "${target_email}",
"datatype": "string"
}],
"projection": [
"preferred_language",
"wallet.balance"
]
}
plan = andi.build_nlp_query(intent=intent)
result = andi.run_query_executor(
plan,
target_email="alex@example.com"
)Give product teams and agents one flexible read layer—without handing them unrestricted access to your cluster.
ANDI is open-source, MIT licensed, and works with the MongoDB connection you already have.
View ANDI-AI on PyPI$ pip install andi-aifrom andi import Andi agent = Andi(db_session="", analyzed_schemas=[]) agent.initialize_connection( connection_string="mongodb://localhost:27017", database_name="production") agent.analyze_schemas(["users", "wallets"])# Your records stay here. Your agent gets a safe plan.No. MCP is a transport standard; ANDI is the query compiler and safety layer. Wrap ANDI in an MCP server to give any compatible agent a standardized, production-safe MongoDB tool.
No. ANDI reasons over structural schema metadata. Query execution happens locally through the native MongoDB driver, so production documents and returned results do not need to leave your environment.
ANDI supports read-only find() and aggregate() workloads, including filters, projections, sorting, limits, joins, unwinds, and grouping. Mutating operations are intentionally denied.
No. Use the MCP server as the universal connection layer and call ANDI inside it. MCP provides the pipe; ANDI provides the engine and guardrails.
Predictable queries. Local data. Guardrails all the way down.