Blog

Oracle MCP Server: Connect Oracle Database to AI Agents Safely

Written by Nic Davidson | May 17, 2026

Last updated: May 2026

An Oracle MCP server is a service that exposes Oracle Database data as tools an AI agent can call through the Model Context Protocol (MCP). Rather than handing an LLM direct credentials to a database holding ERP, financial, or healthcare records, you put an MCP server between the agent and Oracle. The agent discovers what queries it can run, calls them as named tools, and the MCP server translates those calls into safe, governed SQL — with Virtual Private Database policies, Database Vault realms, Data Redaction, and audit logging applied automatically.

The pragmatic path to a production-grade Oracle MCP server is built on a foundation that already exists in most enterprise environments: an auto-generated REST API over the Oracle schema. Tools like DreamFactory have been doing exactly this for years — connect a database, get a fully documented, role-protected REST API in minutes, no code written. The MCP server is then a thin surface on top of that same generated API, exposing the endpoints to AI agents instead of (or alongside) human developers. DreamFactory's framing: "turn your database into an auditable, governed API layer for AI" — the API layer is the foundation; the AI surface is the addition. This guide covers what an Oracle MCP server is, the three common setup approaches, the Oracle-specific governance features that make production deployment cleaner than it looks, and how the auto-generated-API-plus-MCP pattern handles the governance plumbing.

Quick summary

  • What an Oracle MCP server does: Exposes Oracle Database (on-premises, Oracle Cloud, Exadata) as MCP tools an AI agent can call.
  • What sits underneath: A REST API over the Oracle schema. The MCP tools are usually just the same REST endpoints exposed via MCP rather than HTTP.
  • Oracle advantage: VPD, Database Vault, and Data Redaction give you row- and column-level controls that continue to apply to both REST and MCP traffic.
  • Three approaches: community MCP example (prototyping), custom MCP server via the SDK (full control), or an AI Data Gateway like DreamFactory (auto-generated REST API + built-in MCP server, production-ready).
  • Production must-haves: identity via Entra ID / OAuth / SAML / LDAP, VPD policies, Data Redaction, query allow-listing, per-call audit, on-premises or air-gapped deployment for regulated data.
  • Brand principle that matters here: "Data stays put." The gateway model means Oracle records never leave your perimeter — the LLM client sees only the results of governed tool calls.

What is the Model Context Protocol (MCP)?

The Model Context Protocol is an open standard, introduced by Anthropic and rapidly adopted across the LLM ecosystem, that defines how AI models discover and call external tools at runtime. An MCP server exposes tools (callable functions with typed parameters and semantic descriptions); an MCP client — Claude Desktop, Claude Code, the Claude API with MCP enabled, ChatGPT, Cursor, Windsurf, or any other MCP-capable agent — consumes those tools.

As DreamFactory describes the pattern: MCP gives teams "a single reusable port for multiple AI assistants" rather than bespoke integrations per LLM platform. The same MCP-exposed Oracle tools work across every MCP-capable client.

For databases, MCP solves a problem that has dogged AI integration since LLMs got tool-use: how to expose data to an agent safely. Direct database credentials are too dangerous; bespoke integrations don't scale. MCP gives you a structured middle ground — named tools, semantic descriptions, type-safe parameters — that constrains what the agent can do while keeping the developer experience simple.

The foundation: auto-generated REST APIs over Oracle

Before discussing MCP-specific patterns, it's worth being explicit about the layer underneath. Every production MCP server for Oracle is, in practice, a REST API for Oracle plus a thin MCP surface on top. The MCP server exposes tools; those tools resolve to HTTP calls; the HTTP calls hit a REST API that talks to Oracle.

This is where DreamFactory's history matters. The product has been auto-generating REST APIs from databases for over a decade. Connect to an Oracle database, and DreamFactory:

  • Introspects the Oracle schema (tables, views, stored procedures, relationships)
  • Generates a complete REST API with CRUD operations, filtering, sorting, pagination, and bulk operations
  • Generates OpenAPI / Swagger documentation automatically
  • Wraps every endpoint in role-based access control at the table, endpoint, and HTTP-verb level
  • Applies authentication (Entra ID, OAuth 2.0, OpenID Connect, SAML 2.0, LDAP, AD, API keys)
  • Enforces rate limits per user, role, or service
  • Logs every call with calling user, timestamp, and payload for audit

That REST API is useful by itself — human developers integrate with it, mobile apps consume it, internal tools depend on it. The MCP server is the next surface for the same generated endpoints: the agent calls the same governed API the human developer would. One configuration; two surfaces. As DreamFactory's CTO Kevin McGahey demonstrates in the platform's MCP tutorial, the entire pipeline — Oracle credentials in a config file, MCP call, auto-generated API, read-only role, API key, working dashboard built by Claude Code — completes in minutes.

What an Oracle MCP server does specifically

An Oracle MCP server is an MCP server whose tools wrap Oracle queries — typically via the auto-generated REST API described above. Instead of exposing a generic "run any SQL" tool (high risk), a well-designed server exposes named, scoped tools — for example, "find_customer_by_email", "list_open_invoices_for_account", "search_documents_by_topic" (using Oracle 23ai vector search).

The agent reads the tool descriptions, picks the right one for the user's question, and calls it with structured parameters. The MCP server resolves the call to the matching REST endpoint, which translates it into a parameterised query against Oracle, applies the configured RBAC and field-level redaction, and returns the result. Oracle's governance features — VPD, Database Vault, Data Redaction — continue to enforce policies at the database layer. The agent never writes or sees raw SQL.

The DreamFactory phrasing for this principle is "containment by design" — every AI action is bounded by the policies you set, and every action leaves an auditable trail. Or in the company's own positioning: "governance travels with every request."

Why teams expose Oracle to AI agents

Oracle Database backs many of the most critical business systems in the world — ERP, financial systems, healthcare records, government services. The data sitting in Oracle is exactly the data product teams now want LLM agents to be able to read, but it's also the data with the strictest governance and audit requirements. Common AI use cases that justify the MCP investment:

  • Customer service copilots over enterprise data: A support agent's assistant queries customer accounts, recent orders, billing, and ticket history without leaving the chat — and without giving the LLM unrestricted access to ERP data.
  • Compliance and audit assistants: Auditors and compliance officers ask natural-language questions and the agent calls allow-listed compliance tools that return appropriately scoped results.
  • Financial analytics: Non-technical finance staff query general ledger, AP, AR, and reporting data through natural language with full row-level enforcement of who-sees-what.
  • Healthcare clinical assistants: Clinical staff query patient records, subject to HIPAA controls enforced via VPD, Database Vault, and Data Redaction.
  • Legacy modernisation: This is where the REST-API-generation foundation matters most. The Vermont Agency of Transportation, for example, uses DreamFactory to expose an Oracle database alongside a 1970s-era IBM S370 mainframe through a unified, air-gapped REST API — without re-platforming either system. The MCP server sits on top of that same API.
  • Document search with Oracle 23ai AI Vector Search: Agents combine traditional structured queries with semantic search over text stored in Oracle.

The common thread: high-value, regulated data that previously needed custom dashboards, manual SQL, or hand-coded backend endpoints, now consumable by an LLM agent through a constrained, governed set of tools. DreamFactory's customers in this space include ExxonMobil, Toyota, Saint-Gobain, PPG, Deloitte, Google Cloud, the National Institutes of Health, and the Vermont Agency of Transportation.

The three ways to set up an Oracle MCP server

Approach Best for What gets generated Time to set up Production-ready?
Community MCP example for Oracle Prototyping, exploration A small MCP server with read-only query tools ~1 hour No — needs hardening
Custom MCP server (TypeScript / Python SDK) Specialised tools, custom PL/SQL logic Whatever you build Days to weeks Yes if you build the controls
DreamFactory AI Data Gateway Production, regulated industries, enterprise Oracle workloads A full REST API over Oracle, OpenAPI-documented, role-protected, rate-limited, audit-logged — plus an MCP server exposing the same endpoints to AI agents Minutes Yes — designed for it

1. Community MCP examples

The MCP ecosystem includes community implementations that connect to Oracle via the Oracle JDBC driver or python-oracledb and expose a small set of read tools — schema inspection, parameterised query execution. Configure Claude Desktop to launch the server, and you're querying Oracle from a Claude conversation within an hour.

These are useful for prototyping. They are not production-ready: they typically connect as a single Oracle user (no identity layer), don't integrate with VPD or Database Vault beyond what the connection user has access to, don't enforce query allow-listing beyond read-only, and don't include an audit log scoped to MCP calls. Use them to learn the shape of MCP access to Oracle, then move to a controlled deployment.

2. Custom MCP server via the SDK

The MCP SDKs (TypeScript and Python) let you build an Oracle MCP server from scratch. You define each tool, write the underlying SQL or PL/SQL, handle identity and authentication, and add your own governance. Plan on days to weeks of engineering for a tightly-scoped server plus the ongoing work of audit integration, prompt logging, and operational hardening.

This makes sense when your tools need to wrap existing PL/SQL packages, complex stored procedures, or Oracle-specific patterns (materialised views, advanced queueing) that don't translate well to generic MCP examples.

3. DreamFactory AI Data Gateway — REST API plus MCP, auto-generated

DreamFactory's AI Data Gateway takes the API-generation foundation the product has had for years and adds the MCP surface on top. Connect it to an Oracle Database (on-premises, Oracle Cloud, or Exadata) and:

  1. DreamFactory introspects the Oracle schema and auto-generates a full REST API — CRUD operations, OpenAPI documentation, related-data retrieval, filtering, sorting, pagination, bulk operations, stored procedure exposure.
  2. The same configuration wires the REST endpoints into DreamFactory's built-in MCP server, making them callable from Claude Desktop, Claude Code, ChatGPT, Cursor, Windsurf, or any other MCP-capable client.
  3. Authentication, RBAC, field-level redaction, rate limiting, and audit logging are applied at the gateway layer — applying equally to REST consumers (humans, mobile apps, integrations) and MCP consumers (AI agents).
  4. Oracle's own governance (VPD, Database Vault, Data Redaction, TDE, FGA) continues to apply at the database layer, stacked underneath.

In the DreamFactory MCP tutorial, CTO Kevin McGahey demonstrates this end-to-end: an empty directory with database credentials, a single call to the DreamFactory MCP, and within minutes Claude Code has built a complete dashboard backed by an auto-generated, role-protected, API-key-authenticated, audit-logged API. "Database to API to app in minutes" is the company's framing — and the live tutorial backs it.

The trade-off versus a custom MCP server: less per-tool customisation in exchange for the API and governance plumbing being solved. For most enterprise Oracle deployments — especially in regulated industries (banking, healthcare, government) — this is the standard path.

Oracle-specific governance: how to leverage what you already have

Oracle's strength is governance. A well-designed Oracle MCP server doesn't reinvent these controls; it inherits them. DreamFactory's design principle here matches Oracle's: data stays put. The records never leave your perimeter, so the existing Oracle controls remain the source of truth.

Virtual Private Database (VPD)

VPD applies policy functions that automatically add WHERE clauses to queries based on the calling user's session context. Define a VPD policy once at the table level ("customers are visible only to the sales reps in their region"), and every query — human-driven, agent-driven, BI-tool-driven — has that filter applied transparently. DreamFactory's gateway layer adds per-table, per-endpoint, per-HTTP-verb RBAC on top, but the underlying VPD policy continues to enforce row-level scope.

Database Vault

Oracle Database Vault enforces separation-of-duties and realm-based access — even a DBA can't read data they're not authorised for. For AI agent traffic mediated by DreamFactory's REST API plus MCP layer, Database Vault remains the layer that prevents privilege escalation: queries issued by DreamFactory still respect realm boundaries.

Data Redaction

Oracle's Data Redaction feature redacts sensitive column values at query time based on policies. DreamFactory adds a second, gateway-level redaction layer configured per role — so even if a sensitive column slips past database-level redaction in one configuration path, it's still masked before the REST or MCP response leaves the gateway.

Transparent Data Encryption (TDE)

TDE encrypts data at rest in Oracle's tablespaces. It's invisible to the API and MCP layers, but it ensures that compromised disk-level access doesn't translate into plaintext data exposure.

Fine-Grained Audit (FGA) plus DreamFactory's per-call audit

Oracle's Fine-Grained Audit logs every query touching specific columns or matching specific predicates. DreamFactory's gateway logs every REST API and MCP call with calling user, timestamp, and full payload. Together, they give compliance teams an SQL-side audit (Oracle) plus an API-call-side audit (DreamFactory), joinable by user and time window, for end-to-end traceability.

How an Oracle MCP server works end-to-end

  1. User prompts the agent: "Show me the outstanding invoices for account 12345."
  2. Agent reads available tools. It sees a tool called "list_open_invoices_for_account" — backed by an auto-generated REST endpoint — with a single parameter account_id.
  3. Agent decides to call the tool with account_id=12345.
  4. MCP server resolves the call to the REST endpoint, validates the parameter, and DreamFactory's gateway evaluates RBAC: is this role allowed to call this endpoint with this verb on this table?
  5. Oracle executes the query via the generated REST handler. VPD adds the region/department filter; Database Vault verifies the realm; Data Redaction masks sensitive columns; TDE handles disk-level encryption transparently.
  6. DreamFactory applies any gateway-level field redaction configured for the role.
  7. DreamFactory logs the interaction — prompt, tool selected, parameters, query, row count returned, any redactions applied — alongside Oracle's own FGA log.
  8. Agent receives the result and uses it to compose the final response.

Common pitfalls when exposing Oracle to AI agents

  • Using a single shared Oracle service account with no identity layer. Lose per-user enforcement and you lose VPD's filtering, Database Vault's realm enforcement, and Data Redaction's role-based masking. Use DreamFactory's identity integration (Entra ID, OAuth, SAML, LDAP) from day one so the calling user drives RBAC decisions.
  • Granting unrestricted SQL access. The shortcut that turns into an incident. Constrain to named tools backed by the auto-generated REST endpoints, with DreamFactory's per-endpoint allow-list enforcing it.
  • Re-implementing VPD or Database Vault at the gateway. These are mature, well-tested Oracle features. Configure them once in the database; let Oracle enforce them. DreamFactory's gateway adds complementary controls — not replacement controls.
  • Skipping per-call audit. Production deployments need both Oracle's FGA and DreamFactory's per-API-call log. Either alone misses half the picture.
  • Forgetting about writes. Most deployments should be read-only. If writes are needed, isolate them behind explicit user confirmation and allow-listed stored procedures (DreamFactory exposes these as scoped REST endpoints).
  • Running on the public internet. Oracle workloads in regulated industries should keep MCP traffic on-premises or in an air-gapped environment — DreamFactory deploys via Linux installer, Docker, or Kubernetes (Helm chart), and the Vermont Agency of Transportation runs this pattern in production today.

When to choose which approach

  • Exploring AI access to Oracle: Community MCP example.
  • Need very specific tools wrapping existing PL/SQL packages and stored procedures: Custom MCP server via the SDK.
  • You need a production REST API over Oracle anyway, and want AI access too: DreamFactory. The REST API generation alone justifies the platform; the MCP layer is included.
  • Going to production on Oracle in a regulated industry: DreamFactory's AI Data Gateway — the governance integration (Entra ID / OAuth / SAML / LDAP identity, per-table RBAC, per-role redaction, per-call audit, air-gapped deployment) is the whole reason the category exists.
  • Large enterprise Oracle stack with strict audit requirements: DreamFactory, almost always. The combination of REST API generation, gateway identity layer, and the existing Oracle controls (VPD, Database Vault, Data Redaction, TDE) is what makes AI safe to deploy.

How DreamFactory fits in

DreamFactory's foundational capability is instant REST API generation: connect a database, get a complete, documented, role-protected REST API in minutes — no code written. The platform has been doing this for over a decade across 40+ supported data sources (SQL, NoSQL, cloud storage, SOAP services). Customers like ExxonMobil, Toyota, Saint-Gobain, PPG, Deloitte, Google Cloud, AkerBP, Netgear, Miller Industries, the National Institutes of Health, the Vermont Agency of Transportation, D.A. Davidson, and Pillsbury Law use DreamFactory as their data layer.

The AI Data Gateway is the newer chapter — an MCP server built into the platform that exposes the same auto-generated REST API to AI agents (Claude Desktop, Claude Code, ChatGPT, Cursor, Windsurf). The company describes it as "an auditable, governed API layer for AI": keep Oracle intact, generate a governed API on top, and let AI agents query through that layer rather than receiving raw data extracts.

For an Oracle deployment specifically, the platform provides:

  • Auto-generated REST API: CRUD operations, OpenAPI documentation, related-data retrieval, filtering, sorting, pagination, bulk operations, stored procedure exposure. Generated from the Oracle schema in minutes with no code written.
  • Built-in MCP server: the same generated endpoints exposed to MCP-capable clients (Claude Desktop, Claude Code, ChatGPT, Cursor, Windsurf).
  • Authentication: native support for Azure AD / Entra ID, OAuth 2.0, OpenID Connect, SAML 2.0, LDAP, Active Directory, plus API keys and session-based auth.
  • RBAC: per-table, per-endpoint, per-HTTP-verb access control. The same policy applies to REST and MCP traffic.
  • Field-level redaction: configured per role at the gateway, stacking on top of Oracle's Data Redaction policies.
  • Audit: every REST API and MCP call logged with calling user, timestamp, and payload — joinable with Oracle's Fine-Grained Audit for end-to-end traceability.
  • Rate limiting: per user, role, or service to protect downstream Oracle from runaway agent or application traffic.
  • Server-side scripting: pre- and post-process scripts in PHP, Python, or Node.js for custom business logic at the API layer.
  • Deployment: Linux installer (Ubuntu, Debian, CentOS, RHEL, Fedora), Windows (IIS or Apache), Docker, Kubernetes via official Helm chart, or NPX quick install for prototyping. Air-gapped deployment is fully supported.

Vermont Agency of Transportation specifically runs an air-gapped DreamFactory deployment exposing Oracle alongside a 1970s-era IBM S370 mainframe through a unified REST API layer — a striking demonstration of the "data stays put" principle. G2 rates the product 4.7 with badges for "Easiest to Use," "Fastest Implementation," and "Best ROI."

See the DreamFactory AI page or request a demo to see it running against Oracle.

Frequently asked questions

What is an Oracle MCP server?

An Oracle MCP server is a service that exposes an Oracle Database as tools an AI agent can call through the Model Context Protocol (MCP). Instead of giving an LLM direct database credentials, the MCP server wraps queries as named tools with semantic descriptions; an MCP client like Claude reads the available tools and calls them at runtime — letting the AI agent query Oracle without writing raw SQL or PL/SQL.

How do I connect Claude to Oracle Database?

Configure an MCP server that connects to Oracle, then configure Claude Desktop, Claude Code, or the Claude API with MCP enabled to launch that server. For prototyping, a community MCP example is the fastest path; for production, DreamFactory auto-generates a fully documented, secure REST API from your Oracle schema in minutes and exposes the same endpoints to MCP clients via its built-in MCP server — so the agent calls the same governed API a human developer would use.

What is DreamFactory's core capability?

DreamFactory's foundational capability is instant REST API generation: connect a database (Oracle, SQL Server, PostgreSQL, MySQL, Snowflake, Databricks, MongoDB — 40+ supported), and the platform auto-generates a fully documented, role-protected REST API in minutes, with no code written. Authentication, RBAC, rate limiting, audit logging, and OpenAPI documentation are built in. The AI Data Gateway and MCP server sit on top of this same auto-generated API — agents call the same governed endpoints human developers would.

Does DreamFactory work without using MCP at all?

Yes. DreamFactory has been an API generation platform for years and is widely deployed for use cases that have nothing to do with AI — modernising legacy systems (Vermont Agency of Transportation exposes an IBM S370 mainframe and Oracle behind a unified REST API), syncing enterprise systems (Pillsbury Law connects HR to SharePoint), and exposing data products inside large enterprises (ExxonMobil uses DreamFactory to build data product APIs on Snowflake). MCP support is the newest surface; the REST API generation is the foundation.

Does this work with Oracle Database 23ai and AI Vector Search?

Yes. Oracle Database 23ai introduces native vector search, embeddings, and other AI-focused features. DreamFactory's auto-generated REST API and MCP layer can expose both traditional relational queries and the new AI-native capabilities — including vector similarity search — as both REST endpoints and MCP tools. This is particularly useful for hybrid workflows: an agent can do semantic search across documents stored in Oracle, then run a structured query to retrieve related records.

How does Virtual Private Database (VPD) work with an MCP server?

Oracle's Virtual Private Database (VPD) applies policy functions that automatically add WHERE clauses to queries based on the calling user's session context. Configure VPD policies once at the table level; they continue to apply to every query DreamFactory issues against Oracle, alongside DreamFactory's own per-table, per-endpoint, per-HTTP-verb RBAC at the gateway. The two layers stack: gateway controls plus database-native VPD.

How does identity flow from an AI agent to Oracle?

DreamFactory authenticates the calling user via any of OAuth 2.0, OpenID Connect, Azure AD / Entra ID, SAML 2.0, LDAP, or Active Directory. The user's identity drives DreamFactory's RBAC decision (which tools, which endpoints, which HTTP verbs are allowed). Underlying Oracle queries run via DreamFactory's configured Oracle role with the gateway-level policy applied. Audit logs capture user, timestamp, and payload for every API and MCP call.

What about Oracle Database Vault and Data Redaction?

Oracle Database Vault enforces separation-of-duties and realm-based access control. Data Redaction redacts sensitive column values at query time. Both are enforced at the Oracle layer and continue to apply to queries issued by DreamFactory — alongside DreamFactory's gateway-level field redaction (configured per role) and the per-call audit trail. For regulated workloads, you get database-layer governance plus gateway-layer governance, both auditable independently.

What's the safest MCP integration pattern for production Oracle?

Six things in combination: (1) Don't expose raw SQL/PL/SQL — use allow-listed named tools backed by the auto-generated REST endpoints. (2) Authenticate users via Entra ID, OAuth 2.0, SAML, or LDAP — DreamFactory supports all of these natively. (3) Apply VPD, Database Vault, and Data Redaction at the table level so they continue to apply. (4) Restrict to read-only operations unless writes are explicitly required and gated. (5) Log every interaction in Oracle's built-in audit system plus DreamFactory's per-call audit trail. (6) Deploy the gateway on-premises or air-gapped — the same model Vermont Agency of Transportation uses for Oracle plus an IBM S370 mainframe through a unified, governed API layer.

Is an Oracle MCP server safe for regulated industries (banking, healthcare, government)?

Yes, when production controls are in place. Oracle's strength is governance: VPD, Database Vault, Data Redaction, Transparent Data Encryption, fine-grained audit. DreamFactory's gateway adds identity layered on top via SAML / OIDC / Entra ID / LDAP, per-role RBAC at table/endpoint/verb granularity, per-role field redaction, per-user rate limiting, and a per-call audit trail. DreamFactory's regulated-industry customers include the National Institutes of Health, Vermont Agency of Transportation (air-gapped Oracle + IBM mainframe), D.A. Davidson (financial services), and Pillsbury Law (legal). See What is an AI Data Gateway.

Related blog posts