π MCP Server
Details
The Oracle AI Optimizer and Toolkit (the AI Optimizer) exposes a built-in Model Context Protocol (MCP) server using FastMCP. At startup, the server automatically 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
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 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.
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)
SQLcl Installation
The project’s all-in-one image (src/Dockerfile) and server image (src/server/Dockerfile) already include SQLcl and Java. No additional SQLcl installation is required in the container or on the container host.
When running the AI Optimizer directly on macOS, install a supported Java runtime and the SQLcl Homebrew cask:
Add the following lines to ~/.zshrc so SQLcl can find Java and the AI Optimizer can find the sql binary when started from an interactive shell. The SQLcl path is resolved from the currently installed cask version:
Open a new terminal, activate the project environment, and verify the installation:
Start or restart the AI Optimizer from an environment that inherits this PATH.
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 AIO_SQLCL_HOME:
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.
