Introduction
With the rapid evolution of AI, databases are no longer limited to traditional SQL-only interactions. Oracle has taken a major step forward by introducing MCP (Model Context Protocol) support in SQLcl, allowing AI tools like Claude Desktop to interact directly with Oracle databases using natural language.
In this blog, I’ll walk you through a hands-on, end-to-end setup of Oracle SQLcl MCP Server with an on-prem / OCI-hosted Oracle 19c database, and show how conversational AI can query enterprise databases securely.
This guide is ideal for Oracle DBAs, Cloud Architects, and AI-curious professionals who want to explore NLP-driven database access.
Image source:-https://blogs.oracle.com/database/introducing-mcp-server-for-oracle-database
Architecture Overview
AI Client (Claude Desktop)
⬇️ MCP Protocol
SQLcl MCP Server (Local Machine)
⬇️ JDBC
Oracle Database 19c (OCI / On-Prem)
The AI never connects to the database directly. SQLcl acts as a secure MCP bridge, translating natural language into database operations.
Prerequisites
Before starting, ensure you have:
Oracle Database 19c (On-Prem or OCI Compute VM)
Windows laptop or desktop
Internet access to download tools
Basic Oracle SQL knowledge
Step 1: Install JDK 17 (Required for SQLcl)
Oracle SQLcl requires Java 17.
Download JDK 17 for Windows from Oracle
Install using the
.exeSet
JAVA_HOMEand updatePATH
Verify:
Step 2: Install Oracle SQLcl
Download SQLcl from Oracle
Unzip it to a directory (example):
C:\AI\sqlcli
SQLcl is portable—no installer required.
Step 3: Install Claude Desktop
Claude Desktop will act as the AI MCP client.
Download Claude Desktop
Install and launch once
Close it before MCP configuration
Step 4: Prepare Oracle Database 19c
Verify PDBs
Ensure your PDB (e.g., ORCLPDB) is in READ WRITE mode.
Listener and Network Setup
Ensure port 1521 is open
Disable firewall (lab use only):
Confirm connectivity from Windows:
Step 5: Create SQLcl Connection
Launch SQLcl:
Create and save a connection:
Validate:
Step 6: Start SQLcl MCP Server
You should see:
This process must remain running.
Step 7: Configure Claude Desktop for MCP
Edit Claude configuration file:
Restart Claude Desktop and allow MCP access when prompted.
Step 8: Follow Least Privilege (Best Practice)
Instead of SYSTEM, create an application user:
Create sample data:
Create a separate SQLcl MCP connection for this user.
This ensures:
AI only sees approved schemas
SYS/SYSTEM access is avoided
Step 9: Test NLP Queries via Claude
Now the magic ✨
Ask Claude:
Claude:
Understands intent
Calls SQLcl MCP
Executes SQL
Returns results
No SQL typing required.
Security Considerations
✔ SQLcl connections are local-only ✔ Credentials stored in user profile ✔ Secure with OS file permissions ✔ Use separate DB users ✔ Optional: Oracle Wallet for credentials
AI never gets raw database access.
Why This Matters
This setup demonstrates:
Conversational AI for ad-hoc querying
AI + Oracle DB without exposing credentials
Perfect for DBAs, Support, and Architects
Final Thoughts
Oracle SQLcl MCP Server bridges the gap between enterprise databases and modern AI—securely, locally, and powerfully.
If you’re running Oracle 19c today, you can already start experimenting with conversational data access.