mit einem Klick
adb-mcp-server-setup
// Create or update a Codex MCP server entry for Oracle Autonomous Database, refresh ADB bearer token, and optionally bootstrap default DB tools (LIST_SCHEMAS, LIST_OBJECTS, GET_OBJECT_DETAILS, EXECUTE_SQL).
// Create or update a Codex MCP server entry for Oracle Autonomous Database, refresh ADB bearer token, and optionally bootstrap default DB tools (LIST_SCHEMAS, LIST_OBJECTS, GET_OBJECT_DETAILS, EXECUTE_SQL).
| name | adb-mcp-server-setup |
| description | Create or update a Codex MCP server entry for Oracle Autonomous Database, refresh ADB bearer token, and optionally bootstrap default DB tools (LIST_SCHEMAS, LIST_OBJECTS, GET_OBJECT_DETAILS, EXECUTE_SQL). |
Two-stage flow:
mcp_servers.<name> in ~/.codex/config.toml and refresh token env setup.DBMS_CLOUD_AI_AGENT.CREATE_TOOL pattern) and optionally execute that SQL with SQLPlus. Do not use a SQLPlus MCP server in this flow.Voice: Direct, clear, and conversational. Address the reader as "you."
Formality level: Casual-professional. Write as a knowledgeable colleague explaining something to a peer, not as a consultant writing a report.
None:adb$feature={"name":"mcp_server","enable":true}oci session authenticate --region <region> --profile-name DEFAULT
user in OCI config as part of this skill flow.oci --profile DEFAULT --auth security_token secrets secret-bundle get --secret-id <secret_ocid>
Required inputs:
server_config_nameadb_ocidregiondb_usernamedb_passworddb_password empty to let the CLI prompt securelydb_username_secret_ociddb_password_secret_ocidoci_profile (optional)OCI commands usage:
--auth security_token for session-auth profiles, with fallback to default OCI CLI auth.db_username or db_passworddb_password is not supplied, allow the secure CLI prompt at runtime instead of re-asking laterauto_approve unless user explicitly wants to override defaults.db_service_name or a full connect string) when needed.Use this structure for the first Stage 1 message when starting setup or when most Stage 1 fields are still missing:
Using adb-mcp-server-setup to create the MCP config.
**Prerequisites:**
- Confirm the target ADB has free-form tag `adb$feature={"name":"mcp_server","enable":true}`.
- In OCI Console, use a free-form tag with Namespace set to `None`.
- If you want to use Vault secrets, authenticate OCI CLI first:
`oci session authenticate --region <region> --profile-name DEFAULT`
**Inputs:** Provide all inputs at once or step-by-step.
- `server_config_name`: Name for this MCP server configuration (e.g., `my_adw_prod`)
- `adb_ocid`
- `region`: OCI region of the database
- Choose one credential path:
- Direct DB credentials:
- `db_username`
- `db_password`
- Leave `db_password` empty to use the secure CLI prompt, or provide it directly if needed.
- Or Vault-backed credentials:
- `db_username_secret_ocid`
- `db_password_secret_ocid`
- `oci_profile` (optional)
Rules for this message:
**Prerequisites:** and **Inputs:** labels exactly.Use these only when the user explicitly asks to run the setup locally.
Stage 1 (secure prompt):
python3 scripts/setup_adb_mcp_server.py \
--server-name <server_config_name> \
--adb-ocid <adb_ocid> \
--region <region> \
--db-username <db_username> \
--backup
Stage 1 (Vault):
python3 scripts/setup_adb_mcp_server.py \
--server-name <server_config_name> \
--adb-ocid <adb_ocid> \
--region <region> \
--db-username-secret-ocid <vault_secret_ocid_for_username> \
--db-password-secret-ocid <vault_secret_ocid_for_password> \
--oci-profile <optional_profile_name> \
--backup
Stage 2 SQL only (direct credentials):
python3 scripts/setup_adb_mcp_server.py \
--server-name <server_config_name> \
--adb-ocid <adb_ocid> \
--region <region> \
--db-username <db_username> \
--bootstrap-tools \
--backup
Stage 2 SQL only (Vault credentials):
python3 scripts/setup_adb_mcp_server.py \
--server-name <server_config_name> \
--adb-ocid <adb_ocid> \
--region <region> \
--db-username-secret-ocid <vault_secret_ocid_for_username> \
--db-password-secret-ocid <vault_secret_ocid_for_password> \
--oci-profile <optional_profile_name> \
--bootstrap-tools \
--backup
Stage 2 SQLPlus execution (direct credentials):
python3 scripts/setup_adb_mcp_server.py \
--server-name <server_config_name> \
--adb-ocid <adb_ocid> \
--region <region> \
--db-username <db_username> \
--bootstrap-tools \
--run-bootstrap-tools \
--db-service-name '<db_service_name>' \
--backup
Stage 2 SQLPlus execution (Vault credentials):
python3 scripts/setup_adb_mcp_server.py \
--server-name <server_config_name> \
--adb-ocid <adb_ocid> \
--region <region> \
--db-username-secret-ocid <vault_secret_ocid_for_username> \
--db-password-secret-ocid <vault_secret_ocid_for_password> \
--oci-profile <optional_profile_name> \
--bootstrap-tools \
--run-bootstrap-tools \
--db-service-name '<db_service_name>' \
--backup
Use this exact structure before any Stage 2 question:
Stage 1 completed successfully.
Server created: <server_config_name> Config updated: <config_path> Backup created: <backup_path> Token env var set: <token_env_var> (<platform_persistence_note>)
Do you want to run Stage 2 bootstrap of default DB tools (LIST_SCHEMAS, LIST_OBJECTS, GET_OBJECT_DETAILS, EXECUTE_SQL)? Recommended: Say Yes if this database has not been bootstrapped previously.
If yes, choose one:
db_service_name or an optional full connect stringPlatform persistence note values:
via launchctlvia shell startup file when availablevia setx for future VS Code processesset in the Codex process environment before launchUse this exact structure:
Stage 2 completed successfully.
Bootstrap mode: <sql_only_or_sqlplus_executed> Bootstrap SQL path: <bootstrap_sql_path> Default DB tools bootstrapped: LIST_SCHEMAS, LIST_OBJECTS, GET_OBJECT_DETAILS, EXECUTE_SQL SUCCESS: The default database MCP tools are now registered and ready to use. You can run verification/tool calls after reloading Codex.
Next step: Restart Codex now so updated MCP config/token env are loaded before verification/tool calls. On Windows with the VS Code extension, restart VS Code.
401 ADB-00015 or an invalid credential error after Stage 1 previously succeeded, re-run Stage 1 to refresh the token and then restart Codex or VS Code.LIST_OBJECTS_15. Use the tool names discovered in the active MCP session instead of assuming the unsuffixed database tool name is callable directly.LIST_OBJECTS against a known schema over LIST_SCHEMAS; LIST_SCHEMAS can be less reliable when the client exposes suffixed tool names.EXECUTE_SQL must use the Oracle sample input name query, not query_text.references/oracle-adb-mcp.md