MCP Client Configuration
Details
The Oracle AI Optimizer and Toolkit (the AI Optimizer) exposes a built-in Model Context Protocol (MCP) server at /mcp. External MCP clients can connect to this endpoint and use the tools, prompts, and resources registered by the AI Optimizer, including Vector Search tools and SQLcl tools when NL2SQL is configured.
The recommended way to configure a client is to copy the generated JSON from the MCP Configuration page or request the client-specific configuration from the API Server.
Prerequisites
Start the AI Optimizer API Server.
Retrieve or configure the API key. If
AIO_API_KEYwas not set before startup, get the generated key from the API Server page.Confirm that the MCP server is healthy:
If you need Vector Search, split and embed documents first. See Split & Embed.
If you need NL2SQL tools, install SQLcl and configure a database. See MCP Server.
Get the Generated Configuration
In the UI, open Configuration -> MCP Server, expand Client Configuration, and select the target client:
- Cline for VS Code
- LangGraph
- Claude Desktop
You can also request the same JSON from the API Server:
Supported client values include:
| Client | Query value | Notes |
|---|---|---|
| Cline for VS Code | cline | Streamable HTTP configuration with a type field |
| LangGraph | langgraph | Streamable HTTP configuration without the type field |
| Claude Desktop | claude-desktop | Local mcp-remote bridge configuration |
Use the generated JSON as the source of truth. It includes the correct URL, path prefix, and X-API-Key header for the running API Server.
Cline for VS Code
Cline can connect to hosted MCP servers over Streamable HTTP. Get the Cline configuration:
Example output:
To add it in Cline:
- Open VS Code.
- Open the Cline panel.
- Click the MCP Servers icon.
- Open the Configure tab.
- Click Configure MCP Servers.
- Add the
oracle-ai-optimizerentry undermcpServers. - Save the file and confirm that the Optimizer tools appear in Cline.
If you use the Cline remote-server form instead of editing JSON, use:
| Field | Value |
|---|---|
| Server Name | oracle-ai-optimizer |
| Server URL | http://localhost:8000/mcp |
| Transport Type | Streamable HTTP |
| Header | X-API-Key: <your API key> |
LangGraph
LangGraph MCP integrations expect the Streamable HTTP endpoint and authentication headers. Get the LangGraph-specific configuration:
Example output:
The LangGraph variant intentionally omits the type key. Use the url and headers values when creating a Streamable HTTP MCP client or when wiring the Optimizer MCP server into an AgentSpec/LangGraph workflow.
Minimal Python example:
Claude Desktop
Claude Desktop typically starts MCP servers as local processes. For the Optimizer’s remote HTTP endpoint, the generated configuration uses mcp-remote as a local bridge.
Get the Claude Desktop configuration:
Example output:
To add it in Claude Desktop:
- Install Node.js so that
npxis available from the shell. Start the bridge between Claude Desktop and an HTTP/SSE/Streamable HTTP MCP endpoint. The default command to create this bridge to the AI Optimizer MCP would be the following:
- Open Claude Desktop -> Settings -> Developer -> Edit Config.
- Add the
oracle-ai-optimizerentry undermcpServersinclaude_desktop_config.json. - Save the file.
- Restart Claude Desktop.
- Start a new conversation and allow the Optimizer tools when Claude asks for permission.
Verify the Connection
From the AI Optimizer side, confirm that tools are registered:
In the MCP client, ask a question that should require an Optimizer tool. For Vector Search, ask about content that exists in an embedded vector store. For NL2SQL, ask a database question only after SQLcl tools are visible.
Troubleshooting
403 Forbidden โ The X-API-Key header is missing or incorrect. Copy the JSON again from the MCP Configuration page or confirm AIO_API_KEY.
Connection refused โ The API Server is not running, or the client is using the wrong host or port. The default local endpoint is http://localhost:8000/mcp.
Tools are not visible โ Check the MCP health and tools endpoints:
NL2SQL tools are missing โ Confirm that SQLcl is installed, the sql binary is on PATH, and at least one database is configured.
Claude Desktop cannot start the server โ Confirm that npx is available to Claude Desktop. If needed, use the full path to npx in the command field.