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.
Net, net - I have at least 1 tool in the DB; mcp server is also enabled -
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 -
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 -
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 -
"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
}
