The Model Context Protocol (MCP) is transforming how AI works with external systems, offering significant benefits for Oracle developers.
Previously, connecting AI tools like GitHub Copilot to Oracle Database was challenging and required complex custom configurations.
With MCP now integrated into Oracle SQLcl, developers can easily and securely link their AI assistants to Oracle Database from any MCP-supported platform.
This integration reduces time spent on repetitive setup tasks, streamlines database interactions, and enables faster, more intelligent AI-assisted development for the Oracle community. It’s an exciting time to be an Oracle developer!
Introduction
In November 2024, Anthropic introduced the Model Context Protocol (MCP), which quickly gained traction. Before MCP was introduced, large language models (LLMs) could not directly access external data sources or APIs. Developers had to enhance user queries with extra information before sending them to the models.
What makes MCP so popular is how it simplifies adding context to LLMs.
Without this protocol, developers had to create custom solutions for every tool, API, and integration, resulting in significant duplication of work.
This fragmentation led to developers writing unique code for each LLM provider, resulting in inefficiencies throughout the development process. With MCP, the development process is much more streamlined, benefiting all developers.
This article explores the Model Context Protocol (MCP): its definition, functionality, capabilities, and why it represents a transformative technology for AI integration.
What is Model Context Protocol (MCP)?
Imagine having a universal interface or port for AI applications called Model Context Protocol (MCP). It's an open standard designed to help applications, especially AI models, easily connect with different data sources and tools, similar to how a USB-C port allows you to connect various devices.
It uses a client-server setup where AI clients or hosts (such as IDE extensions or AI assistants) communicate with lightweight MCP servers.
These servers provide specific capabilities organized into three key components:
Resources: These are contextual data sources that the AI can access, such as files or query results.
Prompts: These are predefined templates or workflows to guide the AI's tasks.
Tools: These include various AI actions, such as running database queries or sending emails.
MCP uses standardized formats for requests and responses (specifically JSON-RPC 2.0), making it easy for AI models to discover, authenticate, and use external services clearly and consistently.
MCP creates a structured, user-friendly interface between large language models (LLMs) and external resources such as databases, APIs, files, and other data sources. This eliminates the need for custom integrations by handling the connection process automatically.
If you're looking to build agents or complex workflows using LLMs and want to connect your models to various tools and data sources, MCP is the ideal solution.
MCP Server for Oracle Database
In July 2025, Oracle introduced the MCP Server for Oracle Database, developed by the team led by Jeff Smith and Kris Rice. The MCP Server provides MCP support through Oracle SQLcl, enabling safer and more streamlined AI integration with databases across MCP-supported platforms. This represents a significant advancement toward more integrated and efficient database-AI interactions.
Read the announcement: Introducing MCP Server for Oracle Database
Oracle quickly assessed MCP and recognized its strong potential for developers.
By integrating Oracle Database into Oracle core developer tools, we've made Oracle Database seamlessly accessible to developers from any MCP-supported platform, powered by our modern command-line interface, Oracle SQLcl.
Oracle SQLcl (SQL Developer Command Line)
Oracle SQLcl is a user-friendly command-line tool for interacting with the Oracle Database. It pairs perfectly with popular tools like the Oracle SQL Developer extension for Visual Studio Code.A key feature of SQLcl is its ability to act as an MCP Server, allowing AI assistants to connect securely to your Oracle Database. Plus, it keeps your credentials safe right on your machine!
You can run your SQL and PL/SQL queries and scripts efficiently and securely, streamlining database interactions.
MCP for Oracle Database Getting Started!
With MCP support now integrated into SQLcl, it’s very easy to connect AI assistants to the Oracle Database. In the next slides, we’ll take a walkthrough through the setup process and show you MCP in action with Oracle Database. This way, you can start enjoying its powerful features right away!
Architecture Diagram
Prerequisites
Before we dive in, here's a quick reminder to make sure you have:
- Oracle Database Instance
- Oracle SQLcl (25.2+)
- Java Runtime Environment (JDK 17+)
- Visual Studio Code (VS Code)
- AI Client (Example: GitHub Copilot in VS Code)
- Network Access
How to Install and Configure MCP for Oracle Database?
- Set Up an Oracle Database Instance
- Install the MCP Server (Oracle SQLcl 25.2+)
- Create a Low-Privilege Database User
- Save the Database Connection in SQLcl
- Set up the AI client and integrate it with the LLM, such as GitHub Copilot in Visual Studio Code.
Set Up an Oracle Database Instance
If you don’t have an instance, you can download and run Oracle Database Free for any purpose using the link provided.
You can also try the ready-to-run Docker setup available in my GitHub repository.
Demasy Labs- Oracle Database Docker
To create a connection to your Oracle Database instance, use the SQL Developer Extension.
Install the MCP Server (Oracle SQLcl 25.2+)
Install Oracle SQLcl (SQL Developer Command Line) version 25.2 or higher. The great news is that it already includes the MCP server feature, so you won't need a separate installation for that.
Download Oracle SQLcl version 25.2 or later from the official Oracle website.
Create a Low-Privilege Database User
To enhance security, creating a dedicated low-privilege user for your MCP connections is a great idea.
This approach helps you avoid using high-privilege accounts for AI access. Instead, create a user with only the minimum permissions required for the specific tasks.
This approach not only keeps your sensitive data safe but also reduces potential security risks and makes it easier to manage your environment.
CREATE USER demasylabs IDENTIFIED BY "Demasy1986";
ALTER USER demasylabs QUOTA 50M ON USERS; -- limit space, if applicable
GRANT CONNECT TO demasylabs;
GRANT CREATE SESSION TO demasylabs;
GRANT SELECT ANY TABLE TO demasylabs;
GRANT CREATE ANY TABLE TO demasylabs;
Save the Database Connection in SQLcl
Open SQLcl and save your connection details for easy access later!
CONNECT -save demasylabs -savepwd demasylabs/Demasy1986@localhost:1521/FREEPDB1
show version
cm list
conn -name "docker-demasylabs"
Set up your AI client GitHub Copilot
Just install and turn on the GitHub Copilot and GitHub Copilot Chat extensions in VS Code. It's very helpful!
Set up your AI client, GitHub Copilot, in VS Code to connect to SQLcl running as an MCP server.
How does MCP work with Oracle Database?
Flow Diagram
How GitHub Copilot in VS Code Works with Oracle Database Through the MCP Server in SQLcl
- First, send a natural language prompt in VS Code.
- Next, Copilot taps into MCP to find and connect to a saved database session.
- Then, the SQLcl MCP Server processes the request by translating the natural language request into SQL and running it.
- Finally, the Oracle Database executes the query and sends the results back to Copilot in VS Code.
Demasy Labs
Step#1
Step#2
Step#3
Step#4
Step#5
Step#5
You have completed the lab. You’ve just seen MCP in action with Oracle Database. This demonstration represents just the beginning of what MCP can do with Oracle Database.
Conclusion
Connecting the MCP Server with Oracle SQLcl is an exciting step toward making our database interactions smoother and more AI-friendly.
By setting up a secure link between popular AI tools like GitHub Copilot in VS Code and Oracle Database, developers can execute queries, automate tasks, and enhance productivity.
We walked you through the setup process: installing SQLcl, creating a dedicated low-privilege user, configuring saved connections, and connecting everything with an AI client.
This setup demonstrates how MCP can transform your development workflow by providing a flexible and secure foundation for innovation.
As AI-enhanced database operations become increasingly prevalent, this approach makes Oracle Database more accessible and efficient for developers.
In Part II, I’ll dive into customizing MCP workflows, agent orchestration, and advanced Oracle SQLcl CLI scenarios.
Your Oracle Database is ready for AI.
Top comments (0)