lu-query
Click on "Deploy 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., "@lu-query show me the top 10 customers by total orders this month"
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.

MCP server that exposes an Oracle database to MCP clients over stdio - 75 tools for querying, changing, inspecting and triaging it, with zero-install thin mode and a Markdown audit of every statement.
Requirements
Node.js >= 22
Oracle Database 12c+ (developed and tested against Oracle Database 26ai Free)
No Oracle Client installation: node-oracledb runs in thin mode
Related MCP server: Oracle Database MCP Server
Quick start
npx lu-queryClient configuration (Claude Desktop example; any MCP client works):
{
"mcpServers": {
"lu-query": {
"command": "npx",
"args": ["lu-query"],
"env": {
"ORACLE_DB_URL": "jdbc:oracle:thin:@//db.host:1521/FREEPDB1",
"ORACLE_DB_USERNAME": "app_user",
"ORACLE_DB_PASSWORD": "secret"
}
}
}
}With OpenCode
1. Install once. The package ships the lu-query binary, so a single global install gives you the command forever:
npm i -g lu-query2. Export the Oracle credentials in the environment that launches OpenCode (your shell profile is fine). They never need to live in the config file.
3. Register the server in opencode.json (global, in ~/.config/opencode/) or in .opencode/ for a single project:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"lu-query": {
"type": "local",
"command": ["lu-query"],
"environment": {
"ORACLE_DB_URL": "{env:ORACLE_DB_URL}",
"ORACLE_DB_USERNAME": "{env:ORACLE_DB_USERNAME}",
"ORACLE_DB_PASSWORD": "{env:ORACLE_DB_PASSWORD}",
"MCP_AUDIT_DIR": "/home/you/.lu-query/audit"
}
}
}
}
}4. Verify: opencode mcp list → ✓ lu-query connected. The nine MCP prompts become commands like /lu-query:review-sql-performance.
Notes:
{env:NAME}is OpenCode's substitution syntax for reading a variable from the environment; shell forms like$NAMEare not expanded inside JSON. Keep the password in the environment, not in the file.Pin
MCP_AUDIT_DIRto an absolute path like above. Without it the audit Markdown lands in./mcp-audit-logsrelative to the process working directory, which is your project — audit files would show up in the repo. SetMCP_AUDIT_ENABLED=falseto turn auditing off.npm may warn that install scripts for
oracledbwere blocked. It is harmless: lu-query runs node-oracledb in thin mode and needs no native client.No
ORACLE_DB_SCHEMA? Every tool uses the connected user's schema; set it to pin one.The pool is lazy: the server answers
initializewithout a database; the credentials are only needed when a tool actually queries.
Prefer no global install? Use "command": ["npx", "-y", "lu-query"] instead: same behavior, npx downloads and caches the package on the first call — and that first call can exceed the 30 s default startup timeout, so add "timeout": { "startup": 120000 }.
From a local clone
While working on the code (or on an unpublished build), point the command at your local build instead of the installed one:
"lu-query": {
"type": "local",
"command": ["node", "/absolute/path/to/lu-query/dist/index.js"],
"cwd": "/absolute/path/to/lu-query",
"environment": {
"ORACLE_DB_URL": "{env:ORACLE_DB_URL}",
"ORACLE_DB_USERNAME": "{env:ORACLE_DB_USERNAME}",
"ORACLE_DB_PASSWORD": "{env:ORACLE_DB_PASSWORD}"
}
}Run npm run build first: dist/ is generated and gitignored.
The pool is lazy: the server starts and answers initialize without a database; the first tool call opens the connection.
Configuration
Variable | Required | Default | Purpose |
| yes | — | Connect string: JDBC ( |
| yes | — | Database user |
| yes | — | Database password |
| no | session default | Schema set via |
| no |
| Connection pool size |
| no | package version | Version reported by the server |
| no |
| Session audit on by default — the only contract change vs the Java server (which defaulted to |
| no |
| Directory for audit Markdown files |
| no |
| Error reporting to Sentry |
| if Sentry | — | Sentry DSN |
| no |
| Sentry environment |
| no |
| Sentry release |
| no |
| PII in Sentry events |
| no | — | Accepted for config parity; unused at runtime ( |
| no |
| Server log level |
All of them in one place, ready to paste. Only the first three are required; drop any other line and its default from the table applies. The same names go in the environment block of an MCP client config.
# required
export ORACLE_DB_URL='jdbc:oracle:thin:@//db.host:1521/FREEPDB1'
export ORACLE_DB_USERNAME='app_user'
export ORACLE_DB_PASSWORD='change-me'
# optional
export ORACLE_DB_SCHEMA='APP' # pin a schema instead of the connected user's
export ORACLE_POOL_SIZE='8' # connections kept open (default 4)
export MCP_AUDIT_ENABLED='true' # session audit Markdown on/off
export MCP_AUDIT_DIR='/var/log/lu-query' # absolute path, or it lands in the client's cwd
export LOG_LEVEL='INFO' # APP_LOG_LEVEL also works
export SENTRY_ENABLED='false' # stays off until SENTRY_DSN is set
# Sentry, only if you report errors (values from your Sentry project)
# export SENTRY_DSN='https://key@sentry.io/1234567'
# export SENTRY_ENV='production'
# export SENTRY_RELEASE='2.16.3'
# export SENTRY_SEND_DEFAULT_PII='false'
# export SENTRY_AUTH_TOKEN=''
# export MCP_SERVER_VERSION='2.16.3' # only to pin the reported version{
"ORACLE_DB_URL": "jdbc:oracle:thin:@//db.host:1521/FREEPDB1",
"ORACLE_DB_USERNAME": "app_user",
"ORACLE_DB_PASSWORD": "change-me",
"ORACLE_DB_SCHEMA": "APP",
"ORACLE_POOL_SIZE": "8",
"MCP_AUDIT_ENABLED": "true",
"MCP_AUDIT_DIR": "/var/log/lu-query",
"LOG_LEVEL": "INFO",
"MCP_SERVER_VERSION": "2.16.3",
"SENTRY_ENABLED": "false",
"SENTRY_DSN": "",
"SENTRY_ENV": "",
"SENTRY_RELEASE": "",
"SENTRY_SEND_DEFAULT_PII": "false",
"SENTRY_AUTH_TOKEN": ""
}The same set as JSON, for the environment block of a client config (mcp.servers.<name> in opencode.json, mcpServers.<name> in claude_desktop_config.json). Empty values are read as unset.
Sentry, only if you want error reporting. All six keys ship in the JSON above:
SENTRY_ENABLED- master switch; off means nothing is ever sent.SENTRY_DSN- client key of your Sentry project. Without it the server stays off and says so on stderr.SENTRY_ENV- environment tag on every event (localby default).SENTRY_RELEASE- version tag on every event (0.0.1-SNAPSHOTby default, inherited from the Java config).SENTRY_SEND_DEFAULT_PII- let Sentry attach IPs and user agents (falseby default).SENTRY_AUTH_TOKEN- build token of the Java setup, accepted for config parity and ignored at runtime.
Limits. Result sets are capped at 1000 rows. Three timeout layers: statement 120 s, socket 30 s, MCP request watchdog 150 s. Identifiers are validated against ^[A-Za-z][A-Za-z0-9_$#]{0,127}$; literals are escaped (' -> '').
Architecture reference
The whole server on one page: the execution path from the MCP client to Oracle, the 75 tools by domain, the agent interface (prompts, resource templates, skills), the built-in control points, the three DML paths and the audit trail.

Session audit
Every session writes one Markdown file lu-query-<timestamp>-log.md in MCP_AUDIT_DIR, with one entry per tool execution: tool name, statement kind (SELECT, INSERT, ...) and type (READ/WRITE/OTHER), duration, rows, parameters and the SQL verbatim.
### #1 · 11:33:52 · test_connection · SELECT · READ · ✅ OK
| Inicio | 11:33:52.410 | Fin | 11:33:52.492 | Duración | 82 ms | Filas | 1 | Parámetros | |
```sql
SELECT * FROM V$VERSION
```The table labels are Spanish because that is the literal output of the audit writer; the field names are part of the format the lu-query-audit-report skill parses.
Read a session back with the resource oracle://audit/session/{id} (autocomplete offers current and recent ids). Audit disables itself on I/O errors and says so on stderr. Set MCP_AUDIT_ENABLED=false to turn it off. Audit files contain every statement executed — protect the directory (see SECURITY.md).
Tools (75)
System (1)
Tool | Purpose |
| Connectivity check: database version, name, current user/schema, instance |
Query (2)
Tool | Purpose |
| Run a single SELECT (verbatim, CTEs allowed) with optional |
| First N rows of a table (default 10, max 1000) with progress notifications |
DML (3)
Tool | Purpose |
| Execute one INSERT/UPDATE/DELETE/MERGE and commit |
| Dry-run an UPDATE/DELETE: rows that would be affected plus the WHERE breakdown, no execution |
| Execute DML inside a transaction that is immediately rolled back — nothing persists |
DDL (7)
Tool | Purpose |
| Add or replace a table comment (own tables only) |
| Add or replace a column comment (own tables only) |
| Create or replace a view in the user's own schema |
| Create a private or public synonym for another schema's object |
| Create a sequence in the user's own schema |
| Create an index on a table (columns array; table ownership or CREATE ANY INDEX) |
| Create a materialized-view log for fast refresh |
Metadata — core (8)
Tool | Purpose |
| List schemas (users) visible to the connection |
| List tables with optional schema and LIKE pattern |
| List views with optional schema and LIKE pattern |
| Columns of a table: type, nullability, default, comment |
| true/false via ALL_TABLES (views not considered) |
| Search objects by case-insensitive LIKE pattern, optional type filter |
| List objects by schema and type (tables, views, packages, ...) |
| DDL of an object via DBMS_METADATA.GET_DDL (as CLOB string) |
Metadata — catalog (21)
Tool | Purpose |
| Indexes of a table with columns, uniqueness, status |
| PK/FK/unique/check constraints with columns and references |
| Sequences with range, increment, last number, cycle, cache |
| Metadata of a single sequence |
| Triggers with type, event, table, status |
| Procedures, functions, packages, types |
| Private/public synonyms with resolved target and DB link |
| Database links visible to the user |
| Directory objects and filesystem paths |
| External tables: driver, directory, reject limit, access params |
| MViews with refresh mode/method, last refresh, staleness |
| Materialized-view logs on tables |
| Table partitions: high value, rows, compression, last analyzed |
| Index partitions: status, leaf blocks, distinct keys |
| Subpartitions of a composite-partitioned table |
| LOB columns: segment, index, caching, SECUREFILE, retention |
| User-defined types: typecode, attributes, methods, supertype |
| Objects with status INVALID (broken code) |
| Objects a given object depends on (impact analysis) |
| Scheduler jobs: state, run/failure counts, next run |
| Recent job run details: duration, error code, output |
Optimizer statistics & health (7)
Tool | Purpose |
| Table optimizer stats: rows, blocks, avg row length, last analyzed |
| Column stats: NDV, density, nulls, buckets |
| Histogram endpoints of a column |
| Granted and effective system privileges |
| Enabled roles with admin/default flags |
| Compilation errors of PL/SQL units |
| One-shot readiness check: connectivity, version, catalog role, invalid objects, server config, audit state |
PL/SQL (2)
Tool | Purpose |
| Arguments and full source of a PL/SQL object |
| Execute a procedure/function/package subprogram with IN/OUT/INOUT args and REF CURSOR returns |
Explain & tuning (4)
Tool | Purpose |
| Execution plan via EXPLAIN PLAN + DBMS_XPLAN without executing the statement |
| Analyse a statement's plan; propose CREATE INDEX when a table is read by full scan |
| Indexes with columns and best-effort usage info |
| DBMS_SQLTUNE report with recommendations |
Graphs & helpers (7)
Tool | Purpose |
| NEXTVAL of a sequence — side-effecting read: it advances the counter |
| Orphan rows per FK of a table (empty list = integrity intact) |
| Lowest free id in 1..maxRange (default 1000, cap 10000) not present in the table |
| Duplicate value groups in one or more columns (NULLs excluded) |
| Exact row count of a table without running SQL |
| Object-dependency graph of a schema (Mermaid) |
| Foreign-key graph of a schema or table (Mermaid) |
Performance — V$ views (13)
Requires SELECT ANY DICTIONARY (or equivalent) on the database user; tools return a grant hint on ORA-00942/01031.
Tool | Purpose |
| ACTIVE sessions: user, machine, program, last call elapsed |
| Blocked sessions with blocker sid/user and wait event |
| DML/transaction/user locks held and requested, object and decoded mode |
| Full SQL text currently executed by a session (sid + serial#) |
| Top-N SQL by buffer_gets (default), disk_reads, elapsed_time, executions, cpu_time |
| Current waits from V$SESSION_WAIT, optional sid/class filter |
| Long-running operations with progress from V$SESSION_LONGOPS |
| Instance name, host, version, startup time, status, archiver |
| Database name, creation, log mode, open mode, role |
| Cumulative V$SYSSTAT stats: parses, DB time, physical IO |
| V$SYS_TIME_MODEL: DB CPU, DB time, parse times |
| Initialization parameters from V$PARAMETER |
| Datafiles with size, reads/writes and average IO time |
Resources (4)
URI template | Purpose |
| Markdown audit log of a session ( |
| Column-level description of a table or view |
| DDL source of any object (type auto-detected) |
| PL/SQL source (procedure, function, package, type body) |
Prompts (9)
review-sql-performance, explain-schema, debug-invalid-plsql, safe-dml-plan, data-quality-audit, triage-database-incident, prepare-plsql-call, operating-rules, oracle-sql-style — read-only working guides for common Oracle tasks through these tools.
Agent skills (optional)
Ten skills. Eight teach an agent how to use these 75 tools well - which tool for which job, in what order, what mutates, how failures look, how to read results. One turns the audit trail into an interactive HTML report. The last one, below, benchmarks a .sql file and proposes index changes. Install them with the skills CLI, which puts each skill where your agent looks for them:
npx skills@latest add zademy/lu-query # install the ten skills
npx skills@latest add zademy/lu-query --list # just show themUseful flags: -g install globally instead of per project, -a <agent> pick the target (claude-code, opencode, cursor, codex, gemini-cli, …), -s <skill> install one skill (or '*' for all), --copy copy instead of symlink.
No CLI? Copy them by hand - each folder is self-contained (SKILL.md + references/):
cp -r node_modules/lu-query/skills/lu-query-* ~/.claude/skills/ # Claude Code and OpenCodeSkills: lu-query-explore-schema, lu-query-query-data, lu-query-audit-data-quality, lu-query-plan-data-changes, lu-query-manage-schema, lu-query-use-plsql, lu-query-tune-sql, lu-query-triage-incident, lu-query-audit-report, lu-query-benchmark-sql. Catalog and examples provenance: skills/README.md. Installing the server never installs skills on its own.
SQL benchmark and index recommendations
lu-query-benchmark-sql asks for your .sql file and compares the original and rewritten queries. Its HTML report opens in a light theme with an optional remembered dark theme, and includes a smooth replay of recorded runs, interactive table-access metrics, and plain-language index advice: candidates to test, existing indexes to review, and predicates that can prevent an index lookup. Each recommendation includes evidence, trade-offs and a validation step. An unused index in one plan is not automatically a bad index. Proposed SQL is displayed, not executed.
The report uses the existing MCP tools. Table timings are inclusive plan statistics, not live intra-query telemetry. Result fingerprints are a consistency check, not proof of equivalence. See the skill catalog for installation.
Security
See SECURITY.md. Highlights: stdio only (no ports), identifier allow-list, escaped literals, audit directory must be protected. The database user should be least-privilege: the server relies on Oracle grants, not on its own checks, for anything the tools do not validate.
Contributing
See CONTRIBUTING.md. Releasing to npm is manual and done by the maintainer. Vocabulary in GLOSSARY.md; decisions in docs/adr/.
License
MIT (c) 2026 Sadot Hernández Moreno
Available Tools
75 toolscall_procedureA
Execute a PL/SQL procedure, function or package subprogram with typed arguments. Supports IN/OUT/INOUT scalar parameters and function return values via typed binds (SYS_REFCURSOR OUT/return arguments are fetched and returned as row arrays). Pass args as a JSON array: [{"name":"P","direction":"IN","dataType":"NUMBER","value":1}]. PL/SQL BOOLEAN/RECORD/TABLE/VARRAY/OBJECT types are rejected with guidance to create a scalar wrapper. Requires GRANT EXECUTE on the target object. Auto-commits like execute_dml.
Inputs: args (required), name (required), schema, isFunction, +1 more.
comment_on_columnA
Add or replace the comment on a column. Only works for tables the MCP user owns.
Inputs: table (required), column (required), comment (required), schema.
comment_on_tableA
Add or replace the comment on a table. Only works for tables the MCP user owns (no system privilege exists for COMMENT on others' objects; you'll get ORA-01031 otherwise).
Inputs: table (required), comment (required), schema.
count_rowsA
Count rows in a table without running SQL. Useful to size a table before indexing, partitioning or sampling.
Inputs: table (required), schema.
create_indexA
Create an index on a table. Requires CREATE ANY INDEX (if the table is in another schema) or table ownership; Oracle returns ORA-01031 otherwise.
Inputs: index (required), table (required), columns (required), tableSchema (required), +2 more.
create_mview_logA
Create a materialized-view log on a table for fast refresh. Requires CREATE TABLE privilege and tablespace quota; Oracle returns ORA-01031 / ORA-01950 otherwise.
Inputs: table (required), schema, withRowid, withPrimaryKey, +1 more.
create_or_replace_viewA
Create or replace a view in the MCP user's own schema. Requires CREATE VIEW privilege; Oracle returns ORA-01031 otherwise.
Inputs: view (required), selectBody (required), schema.
create_sequenceA
Create a sequence in the MCP user's own schema. Requires CREATE SEQUENCE privilege; Oracle returns ORA-01031 otherwise.
Inputs: sequence (required), cache, cycle, order, +3 more.
create_synonymA
Create a private or public synonym pointing at another schema's object. Requires CREATE SYNONYM (private) or CREATE PUBLIC SYNONYM (public); Oracle returns ORA-01031 otherwise.
Inputs: synonym (required), targetName (required), targetSchema (required), schema, +1 more.
describe_plsqlB
Describe a PL/SQL object: returns its arguments (name, data type, in/out, position) and full source code. Read-only.
Inputs: name (required), type, schema.
describe_tableA
Describe the columns of a table: name, data type, nullability, default value and comment. ALWAYS call this before writing a SELECT/INSERT/UPDATE against an unverified table, so column names and types are known rather than invented.
Inputs: table (required), schema.
execute_dmlA
Execute a single INSERT, UPDATE, DELETE or MERGE statement on existing tables and auto-commit it (no explicit COMMIT needed; there is no cross-call transaction boundary). One statement per call. Returns the number of rows affected; if the Oracle user lacks the required privileges the failure surfaces as an error result (isError=true).
Inputs: sql (required).
execute_dml_previewA
Dry-run an UPDATE or DELETE without executing it. Returns the total number of rows that would be affected plus a sample of those rows. INSERT and MERGE are not supported; use execute_dml_rollback_first for those.
Inputs: sql (required).
execute_dml_rollback_firstA
Execute an INSERT, UPDATE, DELETE or MERGE inside a transaction that is immediately rolled back. Nothing is persisted; the tool only proves the statement is valid and reports the number of rows affected. Call execute_dml afterwards to apply the change for real.
Inputs: sql (required).
explain_planA
Generate and return the Oracle execution plan for a SQL statement via EXPLAIN PLAN and DBMS_XPLAN, without executing the statement. Needs a PLAN_TABLE; if it is missing or the user lacks access, the failure is surfaced as an error result. Reports progress to clients that pass a progress token.
Inputs: sql (required).
find_duplicatesA
Find duplicate value groups in one or more columns of a table (excluding NULLs). Groups at or above minCount (default 2) come back with a COUNT and a sample ROWID.
Inputs: table (required), columns (required), schema, minCount.
find_free_idA
Find a free id for a new row: scans 1..maxRange (default 1000, capped at 10000) and returns the lowest value not already used, so a key can be inserted without a sequence.
Inputs: table (required), column (required), schema, maxRange, +1 more.
get_column_statsB
Return optimizer statistics for columns of a table: number of distinct values (NDV), density, null count, bucket count, low/high value, histogram type. Optional column filter.
Inputs: table (required), column, schema.
get_database_infoA
Return database-level information: name, creation date, log mode (archivelog/noarchivelog), open mode, role, flashback status.
Inputs: no named parameters.
get_db_time_modelA
Return the database time model from V$SYS_TIME_MODEL: DB CPU, DB time, parse time elapsed, hard parse elapsed, etc.
Inputs: no named parameters.
get_ddlA
Return the DDL definition of an object as a CLOB string, using DBMS_METADATA.GET_DDL. Read-only: never executes the DDL. All three parameters (schema, name, type) are REQUIRED. Valid type values: TABLE, VIEW, INDEX, SEQUENCE, PROCEDURE, FUNCTION, PACKAGE, PACKAGE BODY, TRIGGER, TYPE, SYNONYM, DB LINK. schema/name/type are matched case-insensitively against ALL_OBJECTS (lowercase is fine) and the exact stored object is passed to GET_DDL, so a case mismatch never surfaces as ORA-31603. Requires SELECT_CATALOG_ROLE plus EXECUTE on SYS.DBMS_METADATA (granted in db/setup_least_privilege_user.sql); privilege or not-found failures surface as error results.
Inputs: name (required), type (required), schema.
get_dependency_graphB
Build an object-dependency graph for a schema using all_dependencies. Returns directed edges (dependent→referenced) filtered by optional name/type, plus a Mermaid diagram string.
Inputs: name, type, schema.
get_fk_graphA
Build a foreign-key relationship graph for a schema or a single table. Returns directed edges (child→parent) and a Mermaid diagram string.
Inputs: table, schema.
get_histogramA
Return the optimizer histogram endpoints for a column (frequency or height-balanced). Useful to understand data skew and cardinality estimates.
Inputs: table (required), column (required), schema.
get_instance_infoA
Return Oracle instance information: name, host, version, startup time, status, archiver, thread.
Inputs: no named parameters.
get_next_sequence_valueA
Return the NEXTVAL of a sequence. WARNING: this is a side-effecting read — calling it advances the sequence counter and the consumed value cannot be reused. When the sequence has cache > 0 the returned value may already be consumed elsewhere; before using it as a key, verify it is not already present in the target table. Use sparingly.
Inputs: sequence (required), schema.
get_parameterA
Return Oracle initialization parameters from V$PARAMETER with type, value, default/modified flags and modifiability. Optional name LIKE pattern (case-insensitive, supports %).
Inputs: name.
get_plsql_errorsA
List compilation errors of PL/SQL units (procedures, functions, packages, triggers, types). Optional schema, name and type filter. Critical for diagnosing broken code.
Inputs: name, type, schema.
get_sample_dataA
Return the first N rows of a table as a quick data preview.
Inputs: table (required), rows, schema.
get_sequence_infoA
Return metadata for a single sequence (min_value, max_value, increment_by, last_number, cache_size, cycle_flag, order_flag) from ALL_SEQUENCES. Read-only: does NOT consume NEXTVAL, so the sequence counter is untouched. Prefer this over querying ALL_SEQUENCES/DBA_SEQUENCES directly.
Inputs: sequence (required), schema.
get_session_longopsA
List long-running operations from V$SESSION_LONGOPS (backups, stats gathering, long queries) with progress percentage and ETA. Optional sid filter; only in-progress ops shown.
Inputs: sid.
get_session_privsA
List system privileges available to the current connection: directly granted system privs plus effective privs from enabled roles (deduplicated, ordered). WHEN TO CALL: only when the user explicitly asks what privileges the connection has; do NOT call as a preamble before querying tables or objects.
Inputs: no named parameters.
get_session_rolesA
List roles enabled for the current connection, with admin option and default-role flag. WHEN TO CALL: only when the user explicitly asks which roles the connection has; do NOT call as a preamble before querying tables or objects.
Inputs: no named parameters.
get_session_sql_textC
Return the full SQL text currently being executed by a session, given its sid and serial#.
Inputs: sid (required), serialNum (required).
get_system_statsA
Return cumulative system statistics from V$SYSSTAT (parse count, execute count, DB time, physical reads/writes, etc.).
Inputs: no named parameters.
get_table_statsA
Return optimizer statistics for a table: row count, blocks, avg row length, sample size, last analyzed, degree, partitioned, compression.
Inputs: table (required), schema.
get_wait_eventsB
List current wait events from V$SESSION_WAIT. Optional sid filter and wait_class filter (e.g. 'Application','Concurrency','User I/O').
Inputs: sid, waitClass.
list_active_sessionsA
List currently ACTIVE sessions with username, machine, program, last call elapsed, module and logon time. Optional username and sid filters.
Inputs: sid, username.
list_blocked_sessionsA
List sessions currently blocked by another session, with the blocker sid/username/program and the wait event being waited on.
Inputs: no named parameters.
list_constraintsA
List constraints on a table (primary key, foreign key, unique, check) with their columns and references.
Inputs: table (required), schema.
list_datafile_ioB
List datafiles with size, physical reads/writes, block reads/writes and average IO time per file.
Inputs: no named parameters.
list_db_linksA
List database links visible to the current user with their connect username, host and creation date.
Inputs: no named parameters.
list_dependenciesA
List objects that a given object depends on (referenced objects). Useful for impact analysis.
Inputs: name (required), type, schema.
list_directoriesB
List Oracle directory objects and their filesystem paths.
Inputs: no named parameters.
list_external_tablesB
List external tables with their access driver, default directory, reject limit and access parameters.
Inputs: schema.
list_indexesA
List indexes on a table with their columns, uniqueness and status.
Inputs: table (required), schema.
list_ind_partitionsB
List partitions of indexes on a table: index name, partition, status, leaf blocks, distinct keys, num rows.
Inputs: table (required), schema.
list_invalid_objectsA
List objects whose status is INVALID (broken code needing recompile). Excludes index/LOB partitions. Optional schema and type filter.
Inputs: type, schema.
list_lob_columnsB
List LOB columns of a table with their segment, index, caching, logging, SECUREFILE flag and retention.
Inputs: table (required), schema.
list_locksA
List DML/transaction/user locks held and requested, with the locked object name and lock mode (decoded).
Inputs: no named parameters.
list_materialized_viewsB
List materialized views with their refresh mode, method, last refresh and staleness. Optional schema and LIKE name pattern.
Inputs: schema, namePattern.
list_mview_logsC
List materialized view logs defined on tables. Optional schema.
Inputs: schema.
list_objectsC
List database objects (tables, views, packages, procedures, functions, ...). Optional schema and object type filter.
Inputs: type, schema.
list_partitionsB
List partitions of a partitioned table: name, position, high value, row count, compression, last analyzed.
Inputs: table (required), schema.
list_proceduresC
List stored procedures, functions, packages and types. Optional schema, LIKE name pattern and object type filter.
Inputs: type, schema, namePattern.
list_scheduler_job_runsA
List recent DBMS_SCHEDULER job run details: start time, run duration, instance id, session id, error code, additional info. Ordered by start time desc. (operation/status live in ALL_SCHEDULER_JOB_LOG, not the run-details view.)
Inputs: limit, schema, jobName.
list_scheduler_jobsA
List DBMS_SCHEDULER jobs with state, run/failure counts, last start, next run and repeat interval.
Inputs: schema.
list_schemasB
List all Oracle schemas (users) visible to the current connection.
Inputs: no named parameters.
list_sequencesA
List sequences with their range, increment, last number, cycle flag and cache size (queried from ALL_SEQUENCES, not DBA_SEQUENCES). cache_size > 0 means values are pre-allocated, so gaps can appear after a crash or rollback. For a single sequence's full metadata (including order_flag) use get_sequence_info. Optional schema filter.
Inputs: schema.
list_subpartitionsB
List subpartitions of a composite-partitioned table. Requires schema and table.
Inputs: table (required), schema.
list_synonymsB
List private and public synonyms with their resolved target owner/name and optional DB link. Optional schema and LIKE name pattern.
Inputs: schema, namePattern.
list_tablesB
List tables. Supports an optional schema and a case-insensitive LIKE name pattern (use '%' and '_' wildcards; defaults to '%').
Inputs: schema, namePattern.
list_top_sqlB
Top-N SQL statements ordered by buffer_gets (default), disk_reads, elapsed_time, executions or cpu_time. Returns sql_id, executions, gets/reads/elapsed and a 200-char SQL preview.
Inputs: limit, orderBy.
list_triggersA
List triggers with their type, triggering event, target table and status. Optional schema.
Inputs: schema.
list_typesA
List user-defined Oracle types with their typecode, attribute count, methods and supertype.
Inputs: schema.
list_unused_indexesA
List indexes with their columns and best-effort usage information. The likely_unused flag is YES/NO when index monitoring is enabled, otherwise UNKNOWN. Definitive 'unused' answers require a DBA to run ALTER INDEX ... MONITORING USAGE.
Inputs: schema.
list_viewsA
List views. Optional schema and case-insensitive LIKE name pattern (defaults to '%').
Inputs: schema, namePattern.
oracle_mcp_health_reportA
One-shot readiness check: connectivity, database version, catalog-role, invalid objects, and server configuration (max-rows, query-timeout, audit). Returns an aggregated health report for quick self-diagnosis. WHEN TO CALL: only when the user explicitly asks for a health/readiness check; do NOT call as a preamble before other work.
Inputs: no named parameters.
run_queryA
Run a single SELECT statement and return the result set. Optional offset/limit enable stateless pagination (non-deterministic without an ORDER BY in the SQL). Non-SELECT statements or privilege failures return an Oracle error string. NOTE: recursive constructs like CONNECT BY and WITH (CTE) may be rejected by the SQL parser; for set differences use MINUS, and for row-number/gap problems prefer computing on the returned result set rather than relying on recursive SQL.
Inputs: sql (required), limit, offset.
run_sql_tuning_advisorA
Run Oracle's SQL Tuning Advisor (DBMS_SQLTUNE) on a statement and return its TEXT report with recommendations (indexes, SQL profiles, statistics, rewrites). Requires the ADVISOR privilege; a missing privilege is surfaced as an error result. Reports progress to clients that pass a progress token.
Inputs: sql (required).
search_objectsB
Search database objects by a case-insensitive LIKE name pattern, optionally filtered by object type.
Inputs: namePattern (required), type.
suggest_indexA
Analyse a SQL statement via EXPLAIN PLAN and, when a table is read by full scan, propose a CREATE INDEX statement. Returns the recommended DDL as text; it is never executed. Apply it manually only after DBA review.
Inputs: sql (required), targetTable.
table_existsA
Return true if a table exists (checked via ALL_TABLES; views are NOT considered). Use this instead of run_query {SELECT 1 FROM ALL_TABLES WHERE ...}.
Inputs: table (required), schema.
test_connectionA
Verify connectivity to Oracle and report the database version, name, current user, current schema and instance name. WHEN TO CALL: only when the user explicitly asks to verify the connection or diagnose reachability; do NOT call as a preamble before answering a query about tables, data, or schema objects.
Inputs: no named parameters.
validate_fk_integrityA
Check one or all foreign keys of a table and report orphan rows (child rows whose parent is missing). Returns one entry per FK with constraint name, child/parent columns and the orphan count; an empty list means referential integrity is intact.
Inputs: table (required), schema, constraint.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 75 tools
75 tools create many overlapping listing and diagnostic tools (e.g., list_objects vs list_tables vs search_objects; get_table_stats vs get_column_stats). Descriptions help distinguish most, but the sheer volume and multiple entry points for similar tasks make misselection likely.
Nearly all tools use snake_case with a verb_noun pattern (list_*, get_*, create_*). Minor deviations like table_exists and oracle_mcp_health_report break the pattern slightly.
75 tools is far beyond the 3-15 range for a well-scoped server. While the domain is complex, this many tools creates cognitive overload and violates the rubric's extreme mismatch threshold (50+).
Extensive read/metadata coverage and some create/DML, but missing core DDL operations like create/drop/alter table, grant/revoke, and transaction control. Agents will hit dead ends for many administrative tasks.
Maintenance
Related MCP Connectors
CloudOracle - 14-tool multi-cloud compliance MCP: AWS, Azure, GCP posture, IAM, configs.
Read-only developer, date, finance, and text utilities. Authless remote MCP server by Clean.tools.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA read-only MCP server for exploring and querying Oracle schemas safely. Provides tools for table listing, schema description, column search, and validated SELECT execution.2-
- AlicenseAqualityDmaintenanceA production-grade MCP server for Oracle database interaction, providing 11 tools for full CRUD, transactions, execution plans, and comprehensive safety guardrails.11MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that connects to Oracle databases, enabling execution of registered and ad-hoc SQL queries, retrieval of business object details, and discovery of capabilities over stdio, HTTP/SSE, and REST transports.-
- AlicenseAqualityCmaintenanceEnables Oracle Database schema introspection and SQL execution over stdio, letting MCP hosts list tables, describe columns, and run SQL—read-only by default with opt-in writes.314 npmMIT