𝗜 𝗖𝗼𝗻𝗻𝗲𝗰𝘁𝗲𝗱 𝗢𝗿𝗮𝗰𝗹𝗲'𝘀 𝗠𝗮𝗻𝗮𝗴𝗲𝗱 𝗠𝗖𝗣 𝗦𝗲𝗿𝘃𝗲𝗿 𝘁𝗼 𝗔𝗜 𝗖𝗵𝗮𝘁 𝗖𝗹𝗶𝗲𝗻𝘁𝘀
AI assistants now do more than talk. They use the Model Context Protocol (MCP) to call external tools.
I tested Oracle's managed MCP server in OCI. My goal was to create a read-only health check for an Oracle E-Business Suite database. I wanted to ask an AI: "Is the database up?" or "Which managers are down?"
It worked. I have an AI assistant pulling live database health data. Here is what I learned during the process.
The Setup
- Use a managed MCP server in OCI.
- Point it at the database using a read-only user.
- Build custom SQL tools for instance overviews and active sessions.
- Connect an AI chat client via MCP and OAuth.
Key Lessons
Networking and Security The MCP service runs in Oracle's tenancy. It cannot reach your private database alone. You must attach a Private Endpoint to your VCN. To stay safe, connect to a read-only database user. This prevents any accidental writes.
Watch the URL Every OCI MCP server URL includes a date segment like /20250830/. If you use an old date, you get an HTTP 404 error. This error looks like an auth problem, but it is just a bad path. Copy the exact URL from your console.
The OAuth Problem Many web-based chat UIs fail with this server. They try to discover OAuth settings via the server. Oracle returns a 404 for unauthenticated requests. This stops the login flow. Also, headless web UIs lack a browser for interactive login.
Use User Tokens, Not App Tokens I tried using a client-credentials token to skip the browser. It authenticated, but I lacked permissions. Oracle roles attach to users, not apps. You must use an authorization_code (user) token. The user holds the role, so the token works.
Use Desktop Clients Desktop clients like Claude Desktop or VS Code work well because they have built-in browsers for login. Use mcp-remote with static OAuth metadata to bypass the 404 discovery issue.
Quick Tips
- On Windows, use npx.cmd instead of npx.
- Do not run two clients on the same OAuth callback port.
- Avoid using colons in SQL date formatting like TO_CHAR. The system may mistake them for bind variables. Use raw dates instead.
- Use gv$ views instead of v$ to see all RAC instances.
استفاده از MCP مدیریتشده همراه با عاملهای هوش مصنوعی برای انجام وظایف پایگاه داده تحت نظارت مفید است. کلاینت خود را با نحوه استقرار خود مطابقت دهید و همیشه از کاربران فقطخواندنی استفاده کنید.
انجمن یادگیری اختیاری: https://t.me/GyaanSetuAi