๐Ÿ”— MCP Server

Details
You are currently viewing the documentation for a stable release. If you are working with the main development branch, select v0.0.0.

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

  1. SQLcl must be installed and the sql binary must be on the system PATH
  2. At least one database must be configured with valid credentials (username, password, and DSN)

How It Works

At startup, the AI Optimizer:

  1. Discovers the sql binary on the system path
  2. Creates connection store entries for each configured database
  3. Launches SQLcl as a child process using stdio transport
  4. 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:

export AIO_SQLCL_HOME=/path/to/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.

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.