Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Oracle APEX MCP Serverdescribe the regions and items on page 1 of application 100"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Oracle APEX MCP Server
MCP (Model Context Protocol) server for Oracle Database and Oracle APEX integration. Provides 25 tools for multi-database management, querying, executing DDL/DML, inspecting database objects, and reading APEX metadata — all through a standardized MCP interface.
Features
Multi-database support: switch between databases on the fly without restarting
TNS names: auto-discovers
tnsnames.orafrom ORACLE_HOME, TNS_ADMIN, or common paths3 connection modes: TNS alias, connection string, or manual (host/port/service)
Oracle Database: query, execute DML/DDL/PL/SQL, transactions, explain plans, compile objects, show errors
Object Inspection: list tables, describe tables (columns, indexes, constraints, triggers), list objects, get source, search, dependencies
APEX Metadata (read-only): list applications, describe apps/pages, workspace users, REST services, ORDS-enabled objects
Connection pooling with configurable min/max/timeout
Thick mode support for legacy Oracle databases (pre-12c crypto)
Requirements
Node.js >= 18.0.0
Oracle Database accessible via network (any version supported by
oracledbdriver)Oracle Instant Client (only if using Thick mode for legacy databases)
Quick Install (auto-registers with Claude Code)
git clone <repo-url>
cd oracle-apex-mcp-server
npm install
npm run install:claudeThat's it. Restart Claude Code and start using it. No manual configuration needed.
The installer will:
Install dependencies
Build the TypeScript project
Register the MCP server in
~/.claude/mcp.json
To register for a specific project instead:
npm run install:project
Windows note: If
npm run buildruns out of memory, use:set NODE_OPTIONS=--max-old-space-size=4096 npx tsc
How It Works
When you start a Claude Code session, the server starts with no pre-configured database. You choose how to connect:
1. Browse available databases from TNS
> list my available oracle databases
(Claude calls oracle_list_tns_entries)
> connect to PROD_DB as user hr
(Claude calls oracle_connect mode=tns tns_alias=PROD_DB username=hr password=...)2. Connect with host/port/service
> connect to oracle on 192.168.1.100 port 1521 service MYDB as user admin
(Claude calls oracle_connect mode=manual host=192.168.1.100 port=1521 service_name=MYDB ...)3. Switch databases anytime
> switch to DEV_DB
(Claude calls oracle_connect mode=tns tns_alias=DEV_DB ...)
> now switch to TEST_DB
(same — closes old pool, opens new one)4. Check current connection
> which database am I connected to?
(Claude calls oracle_current_connection)Configuration
Environment Variables (all optional)
Set these in ~/.claude/mcp.json under env if you want a default connection at startup:
Variable | Default | Description |
|
| Oracle DB hostname |
|
| Oracle DB port |
|
| Oracle service name |
|
| Database username (also reads |
| (empty) | Database password |
| (auto-built) | Full TNS connect string (overrides host/port/service) |
| (none) | TNS alias to use from tnsnames.ora |
| (none) | Directory containing tnsnames.ora |
| (none) | Oracle home directory (fallback for TNS lookup) |
| (auto-detected) | Explicit path to tnsnames.ora |
|
| Minimum pool connections |
|
| Maximum pool connections |
|
| Pool timeout in seconds |
|
| Statement cache size |
|
| Fetch array size |
|
| Set |
| (none) | Path to Oracle Instant Client (Thick mode only) |
TNS Discovery
The server automatically searches for tnsnames.ora in these locations (in order):
$TNS_ADMIN/tnsnames.ora$ORACLE_HOME/network/admin/tnsnames.oraCommon Windows paths (
C:\oracle\...,C:\app\oracle\...)Common Linux paths (
/etc/oracle/...,/opt/oracle/...,/u01/...)
Manual Claude Code Setup
If you prefer manual configuration instead of the auto-installer:
Option 1: CLI command
claude mcp add-json oracle-apex '{"type":"stdio","command":"node","args":["/ruta/a/oracle-apex-mcp-server/dist/index.js"],"env":{"TNS_ADMIN":"/ruta/a/network/admin"}}' --scope userOption 2: Edit ~/.claude/mcp.json
{
"mcpServers": {
"oracle-apex": {
"type": "stdio",
"command": "node",
"args": ["/ruta/a/oracle-apex-mcp-server/dist/index.js"],
"env": {
"TNS_ADMIN": "/ruta/a/network/admin",
"ORACLE_OLD_CRYPTO": "true",
"ORACLE_CLIENT_LIB_DIR": "/ruta/a/instantclient"
}
}
}
}With default connection at startup
{
"mcpServers": {
"oracle-apex": {
"type": "stdio",
"command": "node",
"args": ["/ruta/a/oracle-apex-mcp-server/dist/index.js"],
"env": {
"ORACLE_HOST": "myhost",
"ORACLE_PORT": "1521",
"ORACLE_SERVICE_NAME": "MYDB",
"ORACLE_USERNAME": "myuser",
"ORACLE_PASSWORD": "mypassword"
}
}
}
}Available Tools (25)
Connection Management (4) — NEW
Tool | Description |
| List all databases from tnsnames.ora (auto-discovered or custom path) |
| Connect/switch to a database (TNS alias, connection string, or manual) |
| Disconnect and close the connection pool |
| Show which database is currently connected |
Database Tools (9)
Tool | Description |
| Check Oracle DB and APEX connectivity, version, pool status |
| Execute read-only SELECT/WITH queries (up to 10,000 rows) |
| Execute DML, DDL, or PL/SQL with optional auto-commit |
| Execute multiple statements in a single transaction |
| Generate execution plan for SQL optimization |
| Compile/recompile PL/SQL objects (PACKAGE, PROCEDURE, FUNCTION, etc.) |
| Show compilation errors (like SQL*Plus SHOW ERRORS) |
| Preview sample data from a table with optional WHERE/ORDER BY |
| Show current connection config (password masked) |
Object Inspection Tools (6)
Tool | Description |
| List tables with row counts, comments, last analyzed date |
| Full table description: columns, indexes, constraints, triggers |
| List objects by type (TABLE, VIEW, PACKAGE, etc.) with filters |
| Get PL/SQL source code or VIEW definition |
| Search object names and/or PL/SQL source code |
| Show object dependencies (uses / used by) |
APEX Metadata Tools (6) — Read-Only
Tool | Description |
| List APEX applications with page counts |
| App details: pages, LOVs, auth schemes, build options |
| Page details: regions, items, processes, dynamic actions, validations |
| List APEX workspace users with admin/login status |
| List ORDS RESTful service modules, templates, handlers |
| List AutoREST-enabled tables/views |
Development
npm run build # Compile TypeScript
npm run start # Run the compiled server
npm run dev # Build + start
npm run install:claude # Build + register in ~/.claude/mcp.json
npm run install:project # Build + register in .claude/mcp.json (current dir)
npm run clean # Remove dist/License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.