Oracle SQLcl MCP Server: Setup for Claude Desktop, Cline and Other Apps
Lets Claude and Cline query Oracle Database and run SQLcl commands through the connections you saved in SQLcl, using 6 documented tools.
This is Oracle's own MCP server, built into SQLcl and started with the -mcp option. It runs on your computer, and your AI app starts and stops it for you. It has 6 tools: list saved connections, connect, disconnect, run SQL and PL/SQL, run SQLcl commands, and describe the current schema.
You need SQLcl 25.2.0 or higher and Java 17 or 21. The server only uses connections saved in SQLcl with their password, for example conn -save NAME -savepwd user/pass@//host:1521/service. It starts at the strictest restrict level (4), which blocks host commands and scripts.
Good for
- Oracle developers who want to ask questions about their data in plain language
- DBAs who run SQL and SQLcl commands from an assistant
- Analysts who explore schemas and tables on an Oracle database
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install Oracle SQLcl MCP
Claude Code
- 1
Copy this prompt.
Add the Oracle SQLcl MCP server to Claude Code. Run this command: claude mcp add sqlcl -- PATH/bin/sql -mcp Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Oracle SQLcl 25.2.0 or higher, Java 17 or 21.
Read-only mode: There is no documented read-only switch. Give the saved connection a database user that has only the privileges you want the assistant to use.
Replace PATH/bin/sql with the full path to the sql program in your SQLcl install. SQLcl starts the server when your app launches it, so you do not run it yourself. If you connect through tnsnames.ora, add a TNS_ADMIN environment variable that points to the folder holding it. Needs SQLcl 25.2.0 or higher and Java 17 or 21. The assistant reaches your database through connections saved in SQLcl with their password (conn -save NAME -savepwd ...). To loosen the default restrict level 4, put -R and a level from 0 to 3 before -mcp in the args. In Claude Desktop, open Settings, then Developer, then Edit Config, paste the block, and restart the app.
From the vendor's docs. Source.
Tools
Lists the Oracle connections saved in SQLcl
Finds the saved Oracle Database connections on your computer and lists them, so the assistant can pick one to use. It does not connect to anything by itself.
Try: “Which Oracle database connections do I have saved?”
Read ·
list-connectionsConnects to one of your saved connections
Opens a connection to the named saved connection you choose. Later queries run as that connection's database user.
Try: “Connect to my hr_dev connection.”
Network ·
connectCloses the current database connection
Ends the active Oracle Database connection. Use it when you want to switch to a different database or user.
Try: “Disconnect from the database.”
Network ·
disconnectRuns SQL queries and PL/SQL blocks
Runs standard SQL and PL/SQL against the connected database as its database user. That includes inserts, updates and deletes if the user is allowed to make them.
Try: “Show all employees hired last month in the HR schema.”
Delete ·
run-sqlRuns SQLcl commands and extensions
Runs SQLcl-specific commands rather than plain SQL. The server starts at restrict level 4, which blocks host commands and scripts. Adding -R with 0 to 3 in the args opens more commands.
Try: “Describe the EMPLOYEES table.”
Write ·
run-sqlclDescribes the schema of the current connection
Returns detailed information about the schema you are connected to. Oracle does not list the exact fields it returns.
Try: “What does this schema contain?”
Read ·
schema-information
From the official docs
Permissions
high risk · 4 things to watch
High risk
It can run any SQL your database user can run, including changes and deletes. Use a database user with only the privileges you want the assistant to have.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It runs SQL as your database user
Oracle describes it as running SQL and SQLcl commands, so it can change or delete data if the user can. Use a connection whose user has only the privileges you accept. docs.oracle.com
Query results go to your AI provider
Rows the assistant reads are sent to the model behind your AI app. Keep production data and personal data out of reach. docs.oracle.com
Default restrict level blocks host commands and scripts
Oracle says the server starts at level 4, the most restrictive. Adding -R 0, 1, 2 or 3 to the args loosens it, and -R 0 gives full access. Leave the default unless you need scripts. It limits which commands run, not what SQL can change. docs.oracle.com
Oracle advises against pointing it at production
Oracle recommends a database user with minimum privileges and a sanitized read-only replica instead of production. It also logs every interaction to a DBTOOLS$MCP_LOG table, so you can audit what the assistant ran. docs.oracle.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only mode is documented. Limit what the assistant can do with the privileges of the database user in the connection. |
|---|---|
| Talks to | Your Oracle Database, through the saved SQLcl connection |
| Sign-in and keys | Uses the connections saved in SQLcl (stored in ~/.dbtools), which must be saved with their password. The server itself takes no API key. |
| Scopes |
|
Questions
What do I need installed?
SQLcl 25.2.0 or higher and Java 17 or 21. The server is built into SQLcl, so there is nothing else to install. Your AI app starts it with the -mcp option.
Which apps does it work with?
Oracle documents Claude Desktop and Cline in VS Code. If you use GitHub Copilot in VS Code, SQL Developer for VS Code sets the server up for you.
How does it connect to my database?
It uses the connections you saved in SQLcl. If you connect through tnsnames.ora, add the TNS_ADMIN variable that points to its folder.
Can I make it read-only?
Not with a setting. No read-only mode is documented, so connect with a database user that only has read privileges.
Does it run on my computer or in the cloud?
It runs on your computer, started by your AI app. Your queries go from there to your database.
Is there a hosted Oracle option?
Yes. Oracle also offers a managed endpoint inside Autonomous AI Database. This page covers the SQLcl server, which runs on your computer.
Which tools does it give the assistant?
Six: list-connections, connect, disconnect, run-sql, run-sqlcl and schema-information. Oracle lists no others.
Can it run scripts or host commands?
Not by default. It starts at restrict level 4, which blocks both. Add -R with 0, 1, 2 or 3 to the args to allow more, and -R 0 gives full access.
Information
updated Nov 1, 2026
- Publisher
- Official
- Transport
- stdio
Other Oracle MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 5Hide
- Starting and Managing the SQLcl MCP Server · docs.oracle.com
- docs.oracle.com · docs.oracle.com
- docs.oracle.com · docs.oracle.com
- docs.oracle.com · docs.oracle.com
- docs.oracle.com · docs.oracle.com