# AI agent database access, compared

Source: https://osevel.com/learn/ai-database-access-compared/ · reviewed 2026-11-28; facts about other products are from their own docs, checked 2026-11-21.

## Connection string in the agent’s config

The agent connects with an existing login, often the admin’s.

- Agent holds a database password: Yes, in its config
- Agent can write: Everything that login may do
- Every change recorded, rows before and after: Only the database’s own logs
- Risky statements wait for a person: Only if the client asks before a tool call
- Way back: Backups or point-in-time recovery
- Fits: A throwaway local database.

## A read-only database user

A separate login that can only read.

- Agent holds a database password: Yes, a read-only one
- Agent can write: No
- Every change recorded, rows before and after: Nothing to record
- Risky statements wait for a person: Nothing to approve
- Way back: Nothing to undo
- Fits: Questions, reports and query writing.

## The database provider’s MCP server

An MCP server from your database host, such as Supabase’s or Neon’s.

- Agent holds a database password: An access token for the provider
- Agent can write: Yes, unless read-only mode is on
- Every change recorded, rows before and after: See the provider’s docs
- Risky statements wait for a person: The client’s tool prompts; Neon tests migrations on a branch first
- Way back: The provider’s branches, backups or recovery
- Fits: Development and testing; Supabase recommends read-only mode for real data.
- Source: [Supabase MCP server](https://supabase.com/docs/guides/ai-tools/mcp)
- Source: [Neon MCP server](https://neon.com/docs/ai/neon-mcp-server)

## OsBase

Osevel’s bridge between the agent and the database, with the rules enforced in the database.

- Agent holds a database password: No
- Agent can write: Yes, by level, per agent
- Every change recorded, rows before and after: Yes
- Risky statements wait for a person: Yes
- Way back: One change or a whole session
- Fits: Agents writing to development and production databases.
