Monday, October 5, 2026

#1181 - OIC MCP Gateway fronting AI DB MCP Server

Introduction 


This post details how easy it is to use the new OIC MCP Gateway to govern access to AI DB based tools. Justt enable the AI DB MCP server and add a couple of tools!

I already have one tool available in the DB; this queries purchase orders in my orders table.


I can list the available tools, using the following SQL -



This tool is one I used in a previous post on AI DB Private Agent Factory.

Net, net - I have at least 1 tool in the DB; mcp server is also enabled -

The MCP Server URL format for AI DB is as follows - 

https://dataaccess.adb.<region-identifier>.oraclecloudapps.com/adb/mcp/v1/databases/<database-ocid>

I use this in the OIC MCP Gateway - MCP Server configuration page -

Note the security policy I selected -API Key Based Authentication.

This is purely for a quick test. I get the key as follows - Postman POST request - https://dataaccess.adb.us-phoenix-1.oraclecloudapps.com/adb/auth/v1/databases/myDB OCID/token

Request body - 

{
  "grant_type": "password",
  "username": "my DB User",
  "password": "my DB password"
}
 
This gives me the token I can use in the OIC MCP Server configuration -


Now to creating a new tool in AI DB. Remember our DB table, orders? I'll create a PLSQL based tool that will create a row in that table. 

First the PLSQL function - 

Now the PLSQL to create expose it as a tool - 

Refresh the MCP Server connection in OIC - 

Here is the tool payload, I'll create a business policy to deny large orders - 

I now update the Internal MCP Gateway to include the new AI DB MCP Server - 

In postman - I test the new tool, via the Internal Gateway - 

I enter the order details - 

I run, and then check for a new row in the DB table, orders -

I now try with an order over 10k.

 








"content": [
{"type": "text",
"text": "Tool 'AI_DB_MCP_SERVER__CREATE_ORDER_TOOL'
is not allowed by policy 'business'.
reason: Order price exceeds the maximum allowed."
}
],
"isError": true
}

 

Summa Summarum

The OIC MCP Gateway is a compelling addition to the OIC toolkit, and please note, this gateway is not just for OIC based MCP servers. The example above is for an AI DB based MCP server, but please consider this as just a placeholder for any standard 3rd party (in respect of OIC), MCP server.









No comments: