๐ MCP Server
Details
The Oracle AI Optimizer and Toolkit (the AI Optimizer) exposes a built-in Model Context Protocol (MCP) server. At startup, the server registers tools, prompts, and any configured proxy servers (such as SQLcl for NL2SQL).
MCP Configuration Page
The MCP Configuration page displays:
- Server Health: Connection status, server name, and version
- Client Configuration: JSON configuration block for connecting external MCP clients
- Registered Servers: Dropdown to select between registered MCP server namespaces
- Tools, Prompts, and Resources: Details for each registered item, including input schemas and descriptions
SQLcl MCP Server (NL2SQL)
The AI Optimizer natively supports the Oracle SQLcl MCP Server for Natural Language to SQL (NL2SQL) capabilities. When SQLcl is available and databases are configured, the SQLcl MCP server is automatically registered at startup as a proxy under the sqlcl namespace.
Requirements
- SQLcl must be installed and the
sqlbinary must be on the systemPATH - At least one database must be configured with valid credentials (username, password, and DSN)
How It Works
At startup, the AI Optimizer:
- Discovers the
sqlbinary on the system path - Creates connection store entries for each configured database
- Launches SQLcl as a child process using stdio transport
- Mounts the SQLcl MCP server as a proxy, making NL2SQL tools available alongside the built-in tools
SQLcl Home Directory
By default, the SQLcl connection store is created in a temporary directory. To override this location, set the AIO_SQLCL_HOME or SQLCL_HOME environment variable:
SQLcl Not Found?
If SQLcl is not installed or the sql binary is not on the system path, the NL2SQL functionality will be unavailable. The AI Optimizer will log a warning and continue without it.
Connecting External MCP Clients
The AI Optimizer MCP server can be consumed by external MCP clients such as Claude Desktop, Claude Code, VS Code Copilot, or Cursor.
Use the client configuration from the MCP Configuration page (or the /mcp/client-config endpoint) to configure your client. The configuration provides the Streamable-HTTP URL and the required API key header.
For developing custom MCP tools, see Custom MCP Tools.