IDE Integration
Details
Any IDE or coding agent that supports MCP can connect directly to the AI Optimizer and use the same RAG tools, prompts, and resources that the built-in client uses. For tools that do not support MCP, a limited OpenAI-style compatibility path is available.
Supported IDEs
| Tool | Type | Primary Integration |
|---|---|---|
| VS Code | Editor / Agent Host | MCP |
| JetBrains AI Assistant | IDE Assistant | MCP |
| Continue | Code Assistant | MCP |
| Cursor | AI-First Editor | MCP |
| Claude Code | Coding Agent | MCP |
| Windsurf / Cascade | IDE Agent | MCP |
| Cline | Autonomous Agent | MCP |
| aider | Terminal Assistant | OpenAI-style compatibility layer |
Prerequisites
- Install and configure the AI Optimizer.
- Configure at least one usable language model.
- Configure a database if you want Vector Search or NL2SQL features.
- If you want Vector Search, embed your documents first — see Split & Embed.
- Install Oracle SQLcl if you want NL2SQL tools.
- Start the API Server — see API Server.
If AIO_API_KEY was not set before startup, retrieve the generated key from the API Server page or via Configuration.
Verify the server before connecting an IDE:
MCP Integration
This is the preferred path for any IDE or agent that supports MCP.
Get the Client Configuration
The server generates a ready-to-use client configuration:
Example output:
Paste the oracle-ai-optimizer entry into your IDE’s MCP server configuration. Refer to your tool’s MCP documentation for the exact location — most tools expose this under a dedicated MCP or AI server settings panel.
Note
IDE clients connect as the server client by default. Use Copy Client Settings on the API Server page to push your GUI client settings to that client before connecting.
After adding the server, verify the connection:
Available MCP Tools
| Tool | Purpose |
|---|---|
optimizer_vs-discovery | List available vector stores |
optimizer_vs-retriever | Retrieve relevant chunks from vector stores |
optimizer_vs-grade | Grade document relevance |
optimizer_vs-rephrase | Rephrase queries using conversation history |
SQLcl tools (sqlcl_*) are registered automatically when SQLcl is available and a database is configured. They provide read-only database access: schema inspection, SQL execution, and session metadata.
OpenAI-Style Compatibility
Some tools — primarily terminal assistants like aider — do not support MCP and need an OpenAI-style endpoint.
The AI Optimizer exposes /v1/chat/completions and /v1/chat/streams, but these are Optimizer-specific endpoints, not drop-in OpenAI wire-compatible routes:
- Authentication uses
X-API-Key, notAuthorization: Bearer. - Model selection comes from the client’s saved settings, not the
modelfield in the request body. - Responses return a custom
{role, content, route, vs_metadata, token_usage}object, not the OpenAIchoicesenvelope. - Streaming uses custom SSE event types, not OpenAI delta events.
For tools that cannot speak MCP or accommodate a custom auth header, the recommended path is the Spring AI sample or a thin reverse-proxy adapter.
aider
aider does not support MCP and sends Authorization: Bearer, which the Optimizer does not accept directly. Use a reverse proxy to rewrite the auth header, or point aider at the Spring AI sample endpoint instead.
Tool Configuration
Each client maintains independent settings, including which tools are enabled. Set tools_enabled per client:
tools_enabled | Behavior |
|---|---|
[] | LLM only |
["Vector Search"] | RAG, no database access |
["NL2SQL"] | Database queries only |
["Vector Search", "NL2SQL"] | Combined multi-tool workflow |
Enabling Vector Search also depends on vector search settings such as which store to query and whether discovery, rephrase, and grade nodes are active. Models under 7B parameters automatically disable rephrase and grade. See VecSearch Flow and Chatbot for details.
Use the client header on chat requests to isolate conversation history and settings across IDE sessions:
Tool Routing
When both tools are enabled the runtime routes automatically based on question semantics. See VecSearch Flow and NL2SQL Agent for how each path works.
Troubleshooting
403 Forbidden — The X-API-Key header is missing or incorrect. Retrieve the key from the API Server page.
MCP tools not visible — Check /mcp/healthz and confirm tools are registered:
NL2SQL tools missing — Verify SQLcl is in PATH and a database is configured. Check server logs for the SQLcl proxy registration message.
Model not found — Confirm the model is enabled in Configuration → Models and list configured models to verify: