As organizations increasingly integrate AI into their workflows, one challenge keeps surfacing:
How do we securely and efficiently connect large language models (LLMs) to enterprise data in a standard fashion?
This is where MCP (Model Context Protocol) comes in.
Model Context Protocol (MCP) is an open standard that enables LLMs to securely access external systems such as databases, APIs, and files through a unified interface.
Think of MCP as a universal adapter for AI, eliminating the need to build custom integrations for every data source.
Why MCP Matters
MCP is not just a technical convenience—it’s a shift in how we interact with data:
- Faster development - no need for custom connectors
- Improved accessibility - non-technical users can query data using plain English
- Built-in governance - auditing and monitoring are part of the architecture
- Reduced risk - access is controlled via database privileges
MCP in Oracle DB: Two Approaches
Oracle provides two primary ways to work with MCP, depending on your environment.
1. Autonomous Database (ADB) MCP (Easiest Option)
Oracle Autonomous Database includes a built-in MCP server that can be enabled with a simple configuration.
How to enable:
In OCI go to the ADB page and under Tags, add a free-form tag to your database:
Key: adb$feature
Value: {"name":"mcp_server","enable":true}
This approach is ideal for:
- Cloud-first environments
- Quick setup with minimal configuration
- Built-in scalability and management
For additional information see
- Blog by Mark Hornick: Announcing the Oracle Autonomous AI Database MCP Server
- Product documentation: https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/mcp-server.html for additional details.
2. SQLcl MCP Server (Flexible Option)
For all supported non-Autonomous databases (e.g., Oracle 19c, 23/26ai), Oracle provides MCP support via SQLcl.
Requirements:
- SQLcl version 25.2 or later
- Java 17+
Key capabilities include:
-
list-connections– discover saved database connections -
connect/disconnect– manage sessions -
run-sql– execute SQL and PL/SQL -
run-sqlcl– run SQLcl-specific commands
This option is ideal for:
- On-prem or hybrid environments
- Advanced customization scenarios
Additional SQLcl MCP Resources:
- The Download page: https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/
- Terence Bennett has a very detailed blog (that also describes his DreamFactory solution) How to Set Up an MCP Server for Oracle Databases
- For hands-on experience try Oracle LiveLab here: Exploring the SQLcl MCP Server
- See documentation https://docs.oracle.com/en/database/oracle/sql-developer-command-line/25.2/sqcug/using-oracle-sqlcl-mcp-server.html
- And a nice blog by Sakthi Gopinath & Sugandha Kher here: AI Driven SQL Made Simple with Oracle SQLcl MCP Server
- There are lots of material in Jeff Smith’s blog https://www.thatjeffsmith.com/. You can start with AI Tips for getting started with Oracle Database, Take 2! or search for MCP related posts there
Autonomous vs SQLcl MCP Comparison
Key Advantages of Oracle MCP
Oracle’s MCP implementation brings enterprise-grade capabilities that go beyond basic integrations:
- Natural language queries eliminate the need for SQL expertise
- Automatic SQL generation reduces development effort
-
Audit trails (via
DBTOOLS$MCP_LOG) track all LLM interactions -
Session monitoring through
V$SESSION - Support for complex workflows, including schema exploration and performance tuning
Connecting MCP Clients
To use MCP, you connect a client (AI tool or IDE) to the MCP server.
In most cases you can ask the AI tool to help you configure the MCP connection and it will guide you.
Popular options include:
- VS Code with SQL Developer Extension (see option A here)
- Claude Desktop (see option B here)
- VS Code with Codex (see option C here) or just Codex desktop or Codex CLI (here)
- VS Code with Cline or Copilot (See VS Code & Cline and VS Code and Copilot)
Example: VS Code + Cline Setup (Autonomous DB, Windows)
Here’s a simplified configuration example:
On Windows verify you have npx.cmd by running:
Add this MCP server config in Cline (Edit Config) where Oracle_ADW_DB is the database name:
{
"mcpServers": {
"Oracle_ADW_DB": {
"command": "C:\\Program Files\\nodejs\\npx.cmd",
"args": [
"-y",
"mcp-remote",
"https://<YOUR-REGION>/adb/mcp/v1/databases/<YOUR_ADB_OCID>",
"--allow-http"
],
"transport": "streamable-http"
}
}
}What’s Happening Here
npx mcp-remote→ acts as MCP client proxy- Connects to remote Oracle MCP endpoint
- Streams requests/responses between LLM and DB
streamable-http→ enables bidirectional communication
Steps:
- Replace the region and database OCID
- Save config and restarted VS Code, then checked connection in Cline MCP panel.
- Verify connection in the MCP panel
- Run a simple test query:
SELECT USER, SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM dual;What Happens Internally
- LLM generates intent
- MCP client maps to
run-sqltool- SQL is sent to MCP server
- DB executes query
- Results returned as structured response
This is fundamentally different from:
- Direct JDBC execution
- ORM-based queries
- API wrappers
Security Best Practices
When connecting LLMs to databases, security is critical.
A recommended approach is to create a read-only MCP user with minimal privileges:
CREATE USER MCP_USER IDENTIFIED BY "<password>";
GRANT CREATE SESSION TO MCP_USER;
GRANT SELECT ON APP_SCHEMA.TABLE_1 TO MCP_USER;
GRANT SELECT ON APP_SCHEMA.TABLE_2 TO MCP_USER;
For easier management, you can use roles:
⚠️ Important: Always follow the principle of least privilege. LLMs generate actions based on intent, not risk awareness, so unrestricted access can lead to unintended operations.CREATE ROLE MCP_READ_ROLE;
GRANT SELECT ON APP_SCHEMA.TABLE_1 TO MCP_READ_ROLE;
GRANT MCP_READ_ROLE TO MCP_USER;
In my case I granted the MCP User full privileges in its schema and specific read only grants on other resources.
Auditing and Observability
Oracle MCP provides native observability hooks:
1. Interaction Logging
-
Table:
DBTOOLS$MCP_LOG -
Tracks:
- Prompts
- Generated SQL
- Execution metadata
2. Session Monitoring
SELECT * FROM V$SESSION WHERE PROGRAM = 'SQLcl-MCP';
This allows:
- Real-time tracking of MCP sessions
- Integration with existing monitoring tools
Final Thoughts
MCP represents a major step forward in bridging AI and enterprise data.
With Oracle’s built-in support, especially in Autonomous Database, you can enable secure, auditable, and AI-driven data access in minutes.
As AI adoption grows, MCP is quickly becoming a foundational component of modern data architectures.

