Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Running SQLcl in RESTRICT Mode Via MCP on Codex

Jon DixonFeb 8 2026 — edited 2 days ago

I am trying to get SQLcl RESTRICT mode (-R) working via MCP on Codex (CLI and App). I have included the setup and what I am seeing below. Has anyone got the restrict command working from Codex?

Codex config.toml

[mcp_servers.sqlcl]
command = "/opt/homebrew/Caskroom/sqlcl/25.4.1.022.0618/sqlcl/bin/sql"
args = ["-mcp", "-R 1"]
startup_timeout_sec = 30.0

Connect to DEMO

› connect to DEMO
• Connecting to the DEMO SQLcl saved connection now and then I’ll confirm the session state.

• Called sqlcl.connect({"connection_name":"DEMO","model":"gpt-5"})
└ ### DATABASE CONNECTION ESTABLISHED ###
Successfully connected to: **DEMO**

### DATABASE ENVIRONMENT CONTEXT ###

**1. Oracle Database Version:**
23.26.1.1.0
**2. Access Mode:**
The Oracle database is currently in 'null' mode

• Connected to DEMO successfully.

- Oracle version: 23.26.1.1.0
- Character set: AL32UTF8

Try Running a Script

run COMPILE_ALL_PLSQL_AND_VIEWS.sql
• Running COMPILE_ALL_PLSQL_AND_VIEWS.sql in the active DEMO connection now, then I’ll report the compile results.

• Called sqlcl.run-sqlcl({"model":"gpt-5","sqlcl":"@COMPILE_ALL_PLSQL_AND_VIEWS.sql"})
└ **SP2-0738: Restricted command:**
"@COMPILE_ALL_PLSQL_AND_VIEWS.sql"
not available

This post has been answered by thatJeffSmith-Oracle on Feb 18 2026
Jump to Answer
Comments
Post Details
Added on Feb 8 2026
2 comments
198 views