Enterprise AI is evolving rapidly from conversational assistance to intelligent systems capable of securely interacting with enterprise data and executing context-aware actions. While AI agents can provide value through natural language interactions, their true business impact comes from their ability to access trusted data sources and transform information into actionable insights.
Oracle Fusion AI Agent Studio provides a powerful framework for building and extending AI-driven experiences within the Oracle ecosystem. However, modern enterprise use cases often require agents to go beyond application boundaries and interact directly with structured, real-time data sources. This is where integrating Oracle Autonomous Database (ADB) MCP Server becomes highly valuable.
By connecting Oracle Fusion AI Agent Studio with an Autonomous DB MCP Server, organizations can enable AI agents to securely access enterprise data using a standardized protocol layer. Instead of relying on tightly coupled integrations or custom code-heavy approaches, the Model Context Protocol (MCP) introduces a more scalable pattern for exposing database capabilities to AI agents in a controlled and reusable manner.
The business value of this integration is significant. AI agents can retrieve operational insights, query business data, support data-driven decision making, and enrich user interactions with contextual information stored in enterprise databases. This allows organizations to accelerate AI adoption while maximizing the value of existing Oracle data investments.
Security and governance remain central to any enterprise AI implementation. Database access cannot be unrestricted or opaque. By leveraging Autonomous Database security controls, managed credentials, authentication mechanisms, and MCP-based connectivity, enterprises can establish a secure integration model that supports controlled access, observability, and compliance requirements. This ensures that AI agents interact with enterprise data within defined governance boundaries.
In this blog, we will explore how to integrate Oracle Fusion AI Agent Studio with an Autonomous DB MCP Server, walk through the configuration process, and demonstrate how this architecture enables secure, scalable, and business-ready AI agent experiences powered by enterprise data.
On a high-level, the steps involved are as follows:
- Enable MCP Server in AI Autonomous Database
- Create Agent Tool in Database
- Create MCP Tool in AI Agent Studio
- Create an Agent Team
- Create an Agent
- Publish AI Agents
So let us crack on!!!
Enable MCP Server for Oracle AI Autonomous Database
This post assumes that you already have an Oracle AI Autonomous Database provisioned. If you don’t. please follow my blog Oracle Autonomous Database 23ai on Oracle Cloud to provision one [ Note: This is an old post. You can follow along the steps to provision Oracle Autonomous Database 26ai ]. To use MCP-compatible AI clients with Autonomous AI Database through MCP endpoints, one of the key requirements is that you must be on Autonomous AI Database 26ai and 19c. You can find more on the the correct database version, privileges, authentication credentials, network and security controls and tool registration readiness, in the post Prerequisites for MCP Server.
To enable MCP server for the Autonomous AI Database, login to you OCI console and navigate to Oracle AI Database > Autonomous AI Database.

Select the Autonomous AI Database for which you want to enable MCP Server.

Navigate to the tab called Tags.

Click Add to add a new tag.

Add a new tag with the following details.
| Namespace | free-form tag |
| Key | adb$feature |
| Value | {“name”:”mcp_server”,”enable”:true} |
Screenshot below.

This is all you need to do to make the Autonomous AI Database MCP server enabled. You should see the new tag added.

Next step is to create an Agent Tool for the AI Autonomous Database.
Create Tool in Database
To create a tool in your AI Autonomous Database for a , you need have the necessary privileges. It is highly recommended that for your Oracle Database 26ai as MCP server, you should create a dedicated, low-privileged user for the MCP server that utilizes schema-level grants rather than administrative roles. This ensures the server can only execute specifically registered tools and access required vector data through a restricted, secure connection.
For this demonstration, I will be using a low-privileged user, called OICINTEGRATION, specifically for the MCP server connection.
Login to your database using a privileged used [ e.g. ADMIN ] and execute the following GRANT privileges to the user.
GRANT EXECUTE ON DBMS_CLOUD_AI_AGENT TO <your_user>;</your_user>
I grant necessary privileges.

Before creating the agent tool, we first need to define a PL/SQL procedure or function that will be invoked when the tool is executed.
For this example, I will create a simple function named GET_ORDER_DETAILS , which retrieves the details of all sales orders. The function definition is shown below.
CREATE OR REPLACE FUNCTION GET_ORDER_DETAILS (
) RETURN CLOB AS
v_sql CLOB;
v_json CLOB;
BEGIN
v_sql := 'SELECT NVL(JSON_ARRAYAGG(JSON_OBJECT(*) RETURNING CLOB), ''[]'') ' ||
'FROM ( ' ||
' SELECT o.order_id AS order_number, o.order_tms AS order_date, c.full_name AS customer_name, ' ||
' oi.line_item_id AS line_number, p.product_name AS product, p.unit_price AS unit_price, oi.quantity AS quantity ' ||
' FROM orders o,order_items oi,products p,customers c ' ||
' WHERE o.order_id = oi.order_id ' ||
' AND oi.product_id = p.product_id ' ||
' AND o.customer_id = c.customer_id ' ||
' ORDER BY o.order_id, oi.line_item_id ' ||
')';
EXECUTE IMMEDIATE v_sql
INTO v_json ;
RETURN v_json;
END;
I compile the function.

I tested the function to validate the output. Notice that the result has been intentionally cast to the JSON data type, as this will serve as the output payload when the Agent Tool is invoked.

Next, we use the DBMS_CLOUD_AI_AGENT.CREATE_TOOL procedure to register the tool, that our agent can use. The syntax of this procedure is shown below. You can find more on each of the parameters from the Oracle documentation here.
DBMS_CLOUD_AI_AGENT.CREATE_TOOL(
tool_name IN VARCHAR2,
attributes IN CLOB,
status IN VARCHAR2 DEFAULT NULL,
description IN CLOB DEFAULT NULL
);
I register the tool.
BEGIN
DBMS_CLOUD_AI_AGENT.CREATE_TOOL (
tool_name => 'GET_ALL_ORDERS',
attributes => '{"instruction": "Returns a JSON summary of all orders",
"function": "GET_ORDER_DETAILS"}'
);
END;
Tool is now registered successfully.

Next step is to register the tool in AI Agent Studio.
Create Tools
To create the Tool, login to Oracle Fusion instance and navigate to Tools > AI Agent Studio. From the navigation-pane at the bottom, click on Tools.

Click on Add.

From the dropdown list, select Tool Type as ‘MCP’.

Type in a Tool Name. Tool Code should auto-populate from the tool name you enter. Enter a Description. Select the Product Family and Product. For this example, I’ll select SCM and Order Management respectively, since we are fetching the invoice details from our MCP server.

In the Authorization section, we will need to add the authentication details for the MCP server. Click Add.

Enter the Instance URL. The instance URL will be the instance URL of the AI Autonomous Database which we have enabled as MCP server. It’ll have the following form.
https://dataaccess.adb.<region-identifier>.oraclecloudapps.com/adb/mcp/v1/databases/<database-ocid>
Replace <region-identifier> with the region where you have provisioned the AI Autonomous Database. You can get the <database-ocid> from Oracle AI Database > Autonomous AI Database > Autonomous AI Database Information > OCID.

Add the Instance URL. Transport Type defines the communication method. Two options are available.
- Server Sent Events (SSE): Enables real-time, one-way streaming of data from a server to a client.
- StreamableHTTP: Enables servers to independently handle multiple client connections using the HTTP POST and GET requests.
We will select StreamableHTTP as we will be using HTTP POST/GET requests.

Next, select the Credential Type as Client Credentials, as I’ll be using OAuth 2.0-based authentication and confidential applications using Client Credential Grant Type. I have explained how to create a Confidential Application to Connect to OIC using Client Credential Grant Type in this blog. I would recommend to use JWT if you are doing this in production instance.

Next, we need to add the Token URL. The token URL is in the format below. Replace <region-identifier> and <database-ocid>.
https://dataaccess.adb.<region-identifier>.oraclecloudapps.com/adb/auth/v1/databases/<database-ocid>/token
Add Token URL.
Add the Token URL.

Next we need to add the Client Credentials Connection Configuration. This is in JSON format and is in the following format. We will hard-code the value for grant type:”password”. Add the AI Autonomous Database username and password.
{
“grant_type”:”password”,
“username”:”<db-username>”,
“password”:”<db-password>”
}
Click Update. On successful connection, the tools that you have registered for the MCP server ai the database level will be displayed.

To test the tool, click on Tool Preview.

The Tool Preview window will pop-up. The tool we registered at the database level returns all orders, hence it does not expect an input parameter. I populate the input payload as {} and click on Preview.

I see that the output payload has been returned. I can now confirm that the tool is working as expected. Close the preview window.

Select the AI-Enabled tool ( which in my case is called GET_ALL_ORDERS) and click Create.

We have successfully created the MCP tool.
Create Agent Team
Next step is to create the AI Agent Team. To create the AI Agent Team, navigate to the Agent Teams tab. and click on the Add(+) button.

Under the Details tab, provide a Name for your Agent Team. Agent Team Code should auto-populate. Under Family, select the pillar in which you want to create the Agent in. Select the Product. For this demonstration, I have used SCM and Order Management for the Family and Product respectively. Since we are creating a supervisor agent, I will select the agent Type as Supervisor. Add a Description.

Under the LLM tab, you can select the Large Language Model you want to use for NLP. You can chose to use the default model(GPT-4.1 Mini). Note that this model is free to use.

Or you can chose from the list of other available LLMs. Note that there might be additional charges to use these models. I would highly recommend checking with your Oracle CSM on the usage costs, in case you want to use any of these models.

If you are using one of the paid models, you have the flexibility to restrict the usage.

Under the Security tab, you can specify who should have access to use this Agent Team. This is for testing purposes, so I add users having the Application Implementation Consultant role to have access to the agent. In your real-world scenario, add the roles appropriately.

Click on Create to create your Agent Team.
Add Agent to the Agent Team
Once you have created the Agent Team, next step would be to create the Agent. From the tools panel on the left, click on Agents, as highlighted in the screenshot below. Then click on New Worker Agent, as we want to create a worker agent for this demo. Based on your requirement, you can also chose to add a Supervisor Agent.

The Agent creation panel pops up. Enter the Agent Name, Agent Code, Family and Product. Enter a Description for the Agent. Use the Agent Persona and Role to set the character profile(tone, style, attitude, and behavioral patterns) of the agent.

Use Prompt section to instruct the agent about its tasks, roles and responsibilities. Add guidelines for agent responses.

I will leave default values for remainder of the tabs and click on Create. This will create the Agent. Note that we are yet to add our tool to the agent.

To add the tool, select Tools. From the left-hand pane, search for the tool that you created earlier, and add the tool. Click Add.

The tools window pops up. Click Add. Repeat these steps if you want to add more tools to the agent.

Notice that our tool has been added.

Next step is to publish the agent team. However, before publishing the agent team and making it available for business users, you need to test the agent. Click on the Debug button to bring up the chat panel.

The formatted output is presented to the user.

This is exactly the value we see in our AI Autonomous Database.

We have successfully tested the agent. Next step would be to publish the agent.
Publish Agent Team
To publish the agent team, click on the Publish button on the top-right-hand corner.

You should be able to verify the status from the Agent Teams page. Note that since we have created the Agent Teams from scratch, it has been tagged as a Custom Agent Team.

There you go, we have successfully created a custom AI Agent to call an Oracle Integration exposed as an MCP Server from Oracle AI Agent Studio.
Hope this was helpful. Happy Learning.
References



Leave a Reply