Oracle Database MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_JSON | No | Output JSON-structured logs if true | false |
| LOG_LEVEL | No | Log level: DEBUG, INFO, WARN, ERROR, or NONE | INFO |
| TNS_ADMIN | No | Path to Oracle network admin directory (for TNS alias usage) | |
| ORACLE_USER | Yes | Oracle database username | |
| DML_MAX_ROWS | No | Maximum rows DML can affect (safety cap) | 1000 |
| ALLOWED_TABLES | No | Comma-separated uppercase table names allowed for access | |
| BLOCKED_TABLES | No | Comma-separated uppercase table names blocked from access | |
| QUERY_MAX_ROWS | No | Maximum rows returned by db_query | 500 |
| READ_ONLY_MODE | No | If true, blocks all DML operations | false |
| ORACLE_PASSWORD | Yes | Oracle database password | |
| QUERY_TIMEOUT_MS | No | Query timeout in milliseconds | 10000 |
| ORACLE_CLIENT_DIR | No | Path to Oracle Instant Client directory (for thick mode) | |
| RATE_LIMIT_ENABLED | No | Enable or disable rate limiting | true |
| ORACLE_CONNECT_STRING | Yes | Oracle connection string (EZ Connect, TNS alias, or full descriptor) | |
| RATE_LIMIT_PER_MINUTE | No | Maximum requests per minute | 60 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| db_health_checkA | Verify that the Oracle driver is loaded correctly and the database connection is working. Reports: oracledb driver version, driver mode (thin/thick), connection status, Oracle DB version, connect string, TNS config, pool stats, and available TNS aliases. Use this tool FIRST when setting up the MCP server or when troubleshooting connection issues. No parameters required. |
| db_list_tnsA | Read and parse the local tnsnames.ora file, returning all available TNS alias names. Searches in order: TNS_ADMIN directory → ORACLE_HOME/network/admin → current directory. Args:
|
| db_list_tablesA | List all tables in the connected Oracle database (excluding system schemas like SYS, SYSTEM, etc.). Use this FIRST to discover what tables exist before running queries. Args:
|
| db_describe_tableA | Get the column structure of a specific Oracle table: column names, data types, data lengths, nullable flag, and default values. Use this after db_list_tables to understand a table's schema before writing queries. Args:
|
| db_queryA | Execute a read-only SQL query against the Oracle database. Only SELECT and WITH (CTE) statements are allowed. IMPORTANT: Always use Oracle bind variables (:1, :2, ...) instead of string interpolation to prevent SQL injection. Example: sql: "SELECT * FROM users WHERE active = :1 AND created_at > :2" params: ["Y", "2024-01-01"] Safety:
Args:
|
| db_explain_planA | Generate and display the execution plan for a SQL query WITHOUT executing it. Uses Oracle's EXPLAIN PLAN to show how the query optimizer would run the query: table access methods (FULL SCAN, INDEX RANGE SCAN, etc.), join strategies, and filter predicates. Use this to understand query performance before running expensive queries. Args:
|
| db_insertA | Insert a single record into an Oracle database table using parameterized named binds. Auto-generates an INSERT with named bind variables from the provided data object. Column names are validated to prevent SQL injection. After insert, the full row is fetched back via ROWID. dry_run mode: Set dry_run=true to preview the generated SQL without executing it. Example: table_name: "users" data: { "name": "Alice", "email": "alice@example.com", "active": true } dry_run: false Args:
|
| db_updateA | Update one or more records in an Oracle database table using parameterized named binds. Auto-generates the SET clause from the data object. The WHERE clause MUST include named bind variables (:w_1, :w_2, ...) with corresponding where_params. Safety features:
Example: table_name: "users" data: { "status": "active" } where: "id = :w_1" where_params: [42] dry_run: false Args:
|
| db_deleteA | Delete one or more records from an Oracle database table using parameterized named binds. Safety features:
Example: table_name: "users" where: "id = :w_1 AND status = :w_2" where_params: [42, "inactive"] dry_run: false |
| db_transactionA | Execute multiple DML statements (INSERT/UPDATE/DELETE) in a single atomic transaction. All steps either succeed and commit together, or fail and roll back together. This ensures data consistency for multi-step operations. Limits: 1-10 steps per transaction. Each step must use Oracle bind variables (:1, :2, ...) — never string interpolation. Example: steps: [ { sql: "UPDATE accounts SET balance = balance - :1 WHERE id = :2", params: [100, 1] }, { sql: "UPDATE accounts SET balance = balance + :1 WHERE id = :2", params: [100, 2] }, { sql: "INSERT INTO transfers (from_id, to_id, amount) VALUES (:1, :2, :3)", params: [1, 2, 100] } ] This is an atomic money transfer: either all three succeed or none do. |
| db_session_infoA | Retrieve information about the current database session: connected user, schema, instance name, host, database name and version, session ID, NLS date format. Useful for verifying which database/schema you're connected to and for debugging NLS-related issues. No parameters required. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/monsterygy/oracle-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server