MCP has gained traction in the AI community because of its ability to standardise how AI models interact with external tools to fetch and execute
The Model Context Protocol (MCP) is an open standard that enables AI models (like GPT or other LLMs) to interact safely with external tools, APIs, and data sources. Instead of hard-coded integrations, MCP provides a standardized way for models to call services and exchange context.
it simplifies the life of developers by providing the standardized protocol for the integration with tools
Oracle’s SQLcl (SQL Command Line) can now act as an MCP server, bridging the gap between large language models and Oracle Databases. This means an AI assistant can query or update Oracle data securely through SQLcl, without exposing raw JDBC connections.
With MCP support, SQLcl provides:
- Connections tool – LLMs can establish DB connections.
- SQL tool – LLMs can run SQL queries on behalf of users.
The VS Code Extension for SQL Developer automatically registers SQLcl as an MCP Server for AI coding assistants like Copilot or Cline.
SQLcl 25.2.2 Download Link
How MCP Works with SQLcl
MCP Basics
- The model (e.g., ChatGPT) acts as the MCP client.
- SQLcl runs as the MCP server.
- They communicate using JSON-RPC over stdin/stdout, following the MCP specification.
SQLcl MCP Server
SQLcl exposes database functionality—query execution, schema browsing, and metadata retrieval—via MCP. Instead of typing commands, the LLM sends requests such as:
- “List all tables in schema HR”
- “Run SELECT COUNT() FROM orders WHERE status = ‘OPEN’”*
SQLcl executes the query and returns structured JSON to the model.
Benefits of SQLcl as MCP Server
- Safe AI-to-DB integration: LLMs don’t get direct JDBC access; they only request what SQLcl allows.
- Schema-aware prompts: The AI can browse metadata via SQLcl before generating queries.
- Automation friendly: Works in pipelines where an LLM agent needs to validate or transform database data.
- Cross-tool orchestration: Same MCP client can connect to multiple servers (SQLcl, file system, REST API) for richer workflows.
Setup
Install Java
java --version
If the version is lower than 17, download & install the latest JDK, verify the installation again with the command above
Install SQLcl
- Download : SQLcl Download Link
- Unzip the file in a known directory
- Run SQLcl from a terminal in the installation directory:
sql /nolog
Configure SQLcl
connect asvignesh@localhost:1521/ORCLPDB1
conn -save local -savepwd
In my setup, Oracle 19c is running in a Podman
Using cline with VSCode as MCP Client
- Install VSCode
- Install Cline Extension
- Configure SQLcl as an MCP Server:
- Open Cline → MCP Servers → Installed → Configure MCP Servers.
- Add configuration in the JSON file:

- Add the below setings, adjust your installation path
{
"mcpServers": {
"SQLcl": {
"command": "/Users/asvignesh/Dev/sqlcl/bin/sql",
"args": [
"-mcp"
],
"disabled": false,
"autoApprove": [
"list-connections",
"run-sql"
]
}
}
}
Save the file. SQLcl will now appear in the Installed MCP Servers list.

Let’s play with the DB
Click on New Task
Click Manage MCP Servers from the bottom left and select the SQLcl

Example Interactions
Create table : “create table vignesh with standard template in local database”

Insert Data : “Insert 10 records with sample data”

Verified records manually

Query Data : ” check in vignesh if there is record with name sample 11″
it responded with
"CNT"
0
Tried with existing name
Record with NAME = 'Sample 9' exists in table VIGNESH.
Executed check: SELECT /* LLM in use is claude-3.5-sonnet */ COUNT(*) AS cnt FROM VIGNESH WHERE UPPER(NAME) = 'SAMPLE 9';
Result: CNT = 1
Security Considerations
- Run MCP server locally, not exposed to internet.
- Configure role-based DB users with least privilege.
- Monitor logs for AI-generated queries to prevent unsafe operations.
Conclusion
By running SQLcl as an MCP server, Oracle developers and DBAs can unlock a new era of AI-augmented database interaction. Instead of brittle connectors, the Model Context Protocol provides a safe, extensible, and standards-based bridge between AI models and Oracle SQL.