oracle-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | HTTP(S) port. | 3000 |
| ORA_SID | No | SID (instead of service name). | |
| TLS_SAN | No | Extra SANs for the generated self-signed certificate. | |
| ORA_HOST | No | Database host. | localhost |
| ORA_PORT | No | Listener port. | 1521 |
| ORA_USER | No | Oracle database user. | |
| LOG_LEVEL | No | Log level: `debug`, `info`, `warn` or `error`. | info |
| TNS_ADMIN | No | Directory with `*.ora` files and wallets. In the Docker image default is `/opt/oracle/network/admin`. | |
| TRANSPORT | No | Transport mode: `stdio` or `http`. | stdio |
| AUTH_TOKEN | No | Admin bearer token. Empty disables auth (dev only). | |
| TLS_CA_FILE | No | CA for client certificates (enables mTLS on the MCP endpoint). | |
| TLS_ENABLED | No | Enable HTTPS for the MCP endpoint. | false |
| TOKENS_FILE | No | Token store file (in Docker image: `/data/tokens.json`). | ./tokens.json |
| ORA_MAX_ROWS | No | Row limit of the `query` tool. | 200 |
| ORA_PASSWORD | No | Oracle database password. | |
| ORA_POOL_MAX | No | Max connections per pool. | 5 |
| ORA_PROTOCOL | No | Protocol: `tcp` or `tcps`. | tcp |
| TLS_KEY_FILE | No | TLS server key file. | /certs/tls.key |
| ORA_TNS_ALIAS | No | Alias from `tnsnames.ora`. | |
| TLS_CERT_FILE | No | TLS server certificate file. | /certs/tls.crt |
| ORA_PERF_TOOLS | No | Performance analysis tools (`false` hides all of them). | true |
| MCP_SERVER_NAME | No | Name shown in MCP clients and the admin UI. | oracle-mcp-server |
| ORA_DRIVER_MODE | No | Oracle driver mode: `thin` or `thick`. | thin |
| ORA_TLS_CA_FILE | No | Additional trusted CA certificates (PEM bundle). | |
| ORA_TUNING_PACK | No | Enable Tuning Pack tools (`sql_monitor`). | false |
| ORA_SERVICE_NAME | No | Service name. | |
| ORA_PASSWORD_FILE | No | Read the password from a file (Docker/K8s secrets). | |
| ORA_CLIENT_LIB_DIR | No | Instant Client directory for thick mode. In the thick Docker image default is `/opt/oracle/instantclient`. | |
| ORA_CONNECT_STRING | No | Free connect string / JDBC URL. | |
| ORA_CONNECT_TIMEOUT | No | Connect timeout in seconds. | 10 |
| ORA_WALLET_LOCATION | No | Wallet directory. Defaults to `TNS_ADMIN` if it contains `ewallet.pem`. | |
| ORA_WALLET_PASSWORD | No | Password of an encrypted `ewallet.pem`. | |
| ORA_DIAGNOSTICS_PACK | No | Enable Diagnostics Pack tools (`ash_top`, `awr_top_events`). | false |
| STORE_ENCRYPTION_KEY | No | Encrypts password / wallet_password in the token store (AES-256-GCM). | |
| ORA_SSL_SERVER_CERT_DN | No | Expected server certificate DN. | |
| ORA_SSL_SERVER_DN_MATCH | No | Verify server host name / DN. | true |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryA | Execute a read-only SQL SELECT (or WITH …) query and return the results. At most 200 rows are returned. Bind variables use Oracle syntax (:1, :2 or :name). |
| executeA | Execute a SQL statement (INSERT, UPDATE, DELETE, MERGE, DDL) or a PL/SQL block. Changes are committed. DBMS_OUTPUT of PL/SQL blocks is returned. |
| list_tablesB | List tables, views and materialized views in a schema |
| describe_tableA | Show columns, types, nullability, defaults, primary key and comments of a table or view |
| list_schemasB | List all schemas (users) visible to the connected user |
| test_connectionB | Test the database connection and return server info |
| explain_planA | Show the optimizer execution plan (EXPLAIN PLAN + DBMS_XPLAN.DISPLAY) of a SELECT, WITH, INSERT, UPDATE, DELETE or MERGE statement without executing it. |
| sql_planA | Show the actual execution plan of a cached cursor (DBMS_XPLAN.DISPLAY_CURSOR) by sql_id, e.g. from top_sql or session_activity. Use format 'ALLSTATS LAST' for row source statistics (requires the GATHER_PLAN_STATISTICS hint or STATISTICS_LEVEL=ALL). Needs SELECT on V$SQL, V$SQL_PLAN, V$SQL_PLAN_STATISTICS_ALL. |
| top_sqlA | Top SQL statements from the shared pool (V$SQLAREA) by elapsed time, CPU, buffer gets, disk reads or executions, with per-execution averages and sql_id. |
| session_activityB | Current user sessions (V$SESSION): status, sql_id, wait event, blocking session, plus the top non-idle wait events since instance startup (V$SYSTEM_EVENT). |
| table_statsB | Optimizer statistics of a table: rows, blocks, staleness, lock state, indexes (columns, clustering factor, status) and column statistics (distinct values, nulls, histograms). |
| db_overviewA | One-shot answer to "what is my database doing right now": instance and uptime, load metrics of the last minute (V$SYSMETRIC), session counts, what active sessions are doing (CPU vs. wait classes) and attention points (blocked sessions, long calls, load above CPU count) with the next tool to use. |
| locksA | Lock analysis: blocked sessions with the blocking and root blocking session and the locked object, the root blockers (status, idle time, SQL, number of waiters) and the locks they hold (V$LOCKED_OBJECT). Suggests, but never executes, ALTER SYSTEM KILL SESSION. Single instance (V$ views). |
| alert_logA | Read the database alert log through V$DIAG_ALERT_EXT (11.2+): newest entries of the last minutes, optionally only ORA-/TNS- errors or lines containing a text. "Errors in file …" entries show the trace file name to read with trace_content. Needs SELECT on V$DIAG_ALERT_EXT. |
| incidentsA | Diagnostic incidents recorded in the ADR (V$DIAG_INCIDENT / V$DIAG_PROBLEM): time, error code, problem key, signalling component. Incidents with a problem key correspond to alert log entries and trace files. |
| trace_filesA | List trace files of the database diagnostic destination (V$DIAG_TRACE_FILE), newest first, optionally filtered by name (e.g. an ospid, "ora", "pmon", "j00", an incident number). |
| trace_contentA | Read a trace file through V$DIAG_TRACE_FILE_CONTENTS: the last (default) or first lines, optionally only lines containing a text (e.g. ORA-, a sql_id). Use the file name from trace_files or alert_log. Trace files can contain SQL text and data values — handle the output as sensitive. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 17 tools
Most tools have clearly distinct purposes: query vs. execute (read-only vs. committed DML/DDL), explain_plan vs. sql_plan (estimated vs. actual cached plan), and the diagnostic chain alert_log → trace_files → trace_content are all well separated in their descriptions. The main soft overlap is db_overview versus session_activity/top_sql, since the overview reports session counts, active-session activity and load that the narrower tools also surface, which could cause an agent to reach for the summary when it wanted detail (or vice versa).
All names are consistently snake_case with no casing chaos, and the vocabulary (sql_id, session, trace, plan) is coherent across the set. The only deviation is verb style: some are verb_noun (list_tables, describe_table, explain_plan, test_connection, list_schemas) while others are bare nouns (locks, incidents, alert_log, top_sql, session_activity, table_stats), so the pattern is predictable in form but not in grammatical shape.
At 17 tools this sits at the upper end but each one maps to a real DBA workflow step (connect, survey, explore schema, run SQL, inspect plans, diagnose incidents/locks/traces), so nothing feels gratuitous. It is slightly heavy for a single server, but the grouping into query, plan and diagnostics clusters keeps it navigable.
The surface covers the full lifecycle for a read-mostly Oracle diagnostics server: connectivity, instance overview, schema discovery, arbitrary read and write execution, plan estimation and actual plan inspection, SQL/session performance, and a complete ADR diagnostics path (alert log, incidents, trace listing, trace content). The one deliberate omission — locks suggests but never executes ALTER SYSTEM KILL SESSION — is an intentional safety boundary rather than a dead end, and execute covers DDL/DML commit paths.