The setup and diagnostics tools are your first stop when configuring a new apex-mcp installation, troubleshooting connection problems, or verifying that Oracle permissions are correctly granted. They do not create APEX components — instead, they inspect the environment, report problems with actionable remediation steps, and apply automated fixes where possible. Use them before starting development on a new APEX instance, or any time something unexpected happens.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TechFernandesLTDA/apex-mcp/llms.txt
Use this file to discover all available pages before exploring further.
Setup Tools
apex_setup_guide
Show a complete setup guide for connecting apex-mcp to Oracle Autonomous Database. Call this first if you are setting up the server for a new project — it explains all prerequisites, required credentials, and configuration steps in one structured response. This tool takes no parameters. Returns: JSON guide covering:- Prerequisites (Oracle ADB, wallet download steps, APEX workspace creation)
- All required environment variables with descriptions, examples, and the exact
.mcp.jsontemplate - Minimum database permissions needed
- Quick-start checklist (10 steps from install to first app)
- Troubleshooting tips for the most common Oracle errors (
ORA-28759,ORA-01017,TNS-03505, etc.)
The guide includes a ready-to-paste
.mcp.json template with all required environment variable keys. Copy it to your project root and fill in your specific values.apex_check_requirements
Verify that all apex-mcp requirements are met in the current environment. Runs a checklist ofPASS / FAIL tests and returns remediation steps for each failure.
This tool takes no parameters.
Checks performed:
fastmcpPython package is installedoracledbPython package is installed- All six required environment variables are set (
ORACLE_DB_USER,ORACLE_DB_PASS,ORACLE_DSN,ORACLE_WALLET_DIR,ORACLE_WALLET_PASSWORD,APEX_WORKSPACE_ID) - Wallet directory exists and contains the required files (
tnsnames.ora,sqlnet.ora,cwallet.sso) - Database connection is active (if
apex_connecthas already been called) APEX_APPLICATIONSdictionary view is accessible (if connected)WWV_FLOW_PAGE_PLUGSinternal table is accessible (if connected — required for editing existing apps)
summary (e.g., "8 passed, 1 failed"), all_good boolean, an array of checks (each with check, status, detail, and fix), and a next_step recommendation.
Environment variable values are masked in the output (only the first 3 characters are shown) to avoid leaking credentials in logs or chat history.
apex_check_permissions
Check what database permissions the current user has for APEX operations. VerifiesSELECT, EXECUTE, UPDATE, and DELETE privileges on all key APEX objects and reports which features are available vs. which require additional grants.
This tool takes no parameters. Requires an active database connection.
Objects checked:
- APEX dictionary views (
SELECT):APEX_APPLICATIONS,APEX_APPLICATION_PAGES,APEX_APPLICATION_PAGE_REGIONS,APEX_APPLICATION_PAGE_ITEMS,APEX_APPLICATION_PAGE_PROC,APEX_APPLICATION_AUTHORIZATION,APEX_APPLICATION_LOV - APEX packages (
EXECUTE):APEX_UTIL,WWV_FLOW_IMP,WWV_FLOW_IMP_SHARED,WWV_IMP_WORKSPACE,WWV_FLOW_IMP_PAGE - Internal tables (
SELECT/UPDATE/DELETE):WWV_FLOW_PAGE_PLUGS,WWV_FLOW_STEP_ITEMS,WWV_FLOW_STEPS
user, dsn, a permissions array (each entry includes object, privilege, granted, and needed_for), a summary count, and a grant_script_if_needed field containing SQL to run as ADMIN or SYS if any grants are missing.
apex_fix_permissions
Attempt to automatically grant the permissions required for inspect and edit operations on APEX internal tables. ExecutesGRANT statements for UPDATE/DELETE on WWV_FLOW_PAGE_PLUGS, WWV_FLOW_STEP_ITEMS, and WWV_FLOW_STEPS for the currently connected user.
This tool takes no parameters. Requires an active database connection.
Returns: JSON with current_user, a grants array (each entry has statement, status, and optionally error), grant_script (the complete SQL to run manually if needed), and a human-readable summary.
apex_refresh_templates
Refresh Universal Theme 42 template IDs by querying the live database. Template IDs are workspace-specific — they vary between APEX instances and can change after APEX upgrades. apex-mcp auto-discovers them on everyapex_connect, but call this tool explicitly when you switch to a different workspace or APEX instance without reconnecting.
This tool takes no parameters. Requires an active database connection.
Returns: JSON with status, a discovered object (the new template ID map), a changed boolean, and a message indicating whether values changed.
Template IDs are automatically refreshed every time
apex_connect is called, so you only need apex_refresh_templates explicitly when you change the target workspace mid-session without reconnecting.apex_health_check
Run a comprehensive health check on the apex-mcp environment. Checks database connectivity and latency, APEX workspace accessibility, template ID validity, session state, and configuration completeness. Assigns an overall status ofpass, warn, or fail.
This tool takes no parameters.
Checks performed:
| Check | Pass | Warn | Fail |
|---|---|---|---|
database_connection | Connected, latency < 500ms | Connected, latency ≥ 500ms | Not connected |
apex_workspace | Workspace accessible, app count returned | — | Exception querying workspace |
template_ids | PAGE_TMPL_STANDARD > 0 | IDs not discovered yet | — |
session_state | Active session, finalized, or idle (all pass) | — | — |
configuration | All required env vars set | — | Any required env var missing |
status ("pass", "warn", or "fail") and a checks array where each entry has check, status, and detail.
apex_get_audit_log
Return recent audit log entries for the current session. Useful for debugging, reviewing what tools have been called, and compliance tracing.Maximum number of entries to return, sorted newest first. Default is 50.
status, count, and an entries array where each entry includes the timestamp, tool name, status, and duration.
