Oracle MCP Server
The Oracle MCP Server provides tools for SQL execution, schema introspection, and a Lab control-plane dispatch system.
Database Capabilities
Execute SQL queries (
execute_query): Run any SQL query with parameter binding, automatic PostgreSQL-to-Oracle parameter conversion ($1→:1), and configurable row limits (default 1000)List tables (
list_tables): Browse tables across all accessible schemas or filter by schema/pattern with wildcard supportDescribe tables (
describe_table): View column names, data types, sizes, nullability, and default valuesView indexes (
get_table_indexes): Inspect index types, uniqueness, indexed columns, and statusView constraints (
get_table_constraints): Examine primary keys, foreign keys, unique constraints, and check constraintsList schemas (
list_schemas): Discover all accessible schemas in the database
Lab Control-Plane (Backend Mirror)
Check gates (
check_gates): Enforce Pre-Flight and cascade-depth gates vialab_controlandlab_work_itemsGet dispatchable items (
get_dispatchable_items): List backend-owned work items ready for dispatchBuild dispatch packets (
build_dispatch_packet): Validate a work item and produce a structured execution packetStamp dispatch consumed (
stamp_dispatch_consumed): Accept ownership of a dispatch runFail dispatch preflight (
fail_dispatch_preflight): Revert a failed preflight and restore dispatch-ready stateHandle final return (
handle_final_return): Ingest a structured execution result back into backend stateDispatch scene (
dispatch_scene): Create a writers-room scene item and fire its entry signal
Security & Infrastructure
Bind variables prevent SQL injection; audit logging tracks operations with timestamps and duration
Supports multiple Oracle authentication methods (Easy Connect, TNS Name, individual components)
Supports configuration via environment variables stored in .env files, allowing secure storage of Oracle database connection credentials.
Supports integration with Claude Desktop on macOS through specific configuration file paths.
Runs as a Node.js application, with configuration for launching the server via Node.js runtime.
Provides parameter conversion from PostgreSQL-style ($1) to Oracle-style (:1) for compatibility with PostgreSQL query formats.
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., "@Oracle MCP Server show me the structure of the employees table in the HR schema"
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 MCP Server
A Model Context Protocol (MCP) server for Oracle with two layers:
generic Oracle query/introspection tools
a backend-owned Lab control-plane mirror that reproduces the Notion Lab dispatch/return loop on Oracle tables
Features
Execute SQL queries with parameter binding
List tables across multiple schemas or filter by specific schema
Describe table structures with multi-schema support
View indexes and constraints across schemas
Check Lab control-plane gates and build dispatch packets from backend state
Stamp dispatch consumption, ingest execution returns, and create writers-room scene items
Bootstrap the same Lab mirror on Oracle or PostgreSQL using the included DDL
Multiple Oracle authentication methods
Automatic parameter conversion (PostgreSQL style to Oracle)
SQL injection prevention via bind variables
Audit logging for security monitoring
Related MCP server: Oracle DB MCP Server
Installation
npm installConfiguration
Environment Variables
Create a .env file with your Oracle connection details. Choose one of these methods:
Method 1: Easy Connect String
ORACLE_CONNECTION_STRING=hostname:1521/service_name
ORACLE_USER=your_username
ORACLE_PASSWORD=your_passwordMethod 2: TNS Name
ORACLE_TNS_NAME=ORCL
ORACLE_USER=your_username
ORACLE_PASSWORD=your_passwordMethod 3: Individual Components
ORACLE_HOST=localhost
ORACLE_PORT=1521
ORACLE_SERVICE_NAME=ORCL # or ORACLE_SID=ORCL
ORACLE_USER=your_username
ORACLE_PASSWORD=your_passwordOptional settings:
ORACLE_DEFAULT_SCHEMA=HR # Default schema if different from userUsage with Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"oracle": {
"command": "node",
"args": ["/path/to/oracle-mcp/src/index.js"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
}Alternatively, use npx if you publish the package:
{
"mcpServers": {
"oracle": {
"command": "npx",
"args": ["-y", "oracle-mcp-server"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
}Usage with Claude Code
For Claude Code, add to ~/.claude.json:
{
"mcpServers": {
"oracle": {
"type": "stdio",
"command": "node",
"args": ["/path/to/oracle-mcp/src/index.js"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
}After updating the configuration, restart Claude Desktop or Claude Code.
Available Tools
execute_query - Execute any SQL query
Supports parameter binding
Auto-converts PostgreSQL-style parameters ($1) to Oracle (:1)
Returns rows, rowCount, and metadata
list_tables - List database tables
Filter by specific schema or show all accessible schemas
Filter by pattern (with % wildcards)
Shows schema name, table name, row count, and last analyzed date
describe_table - Get table structure
Column names, types, sizes
Nullable constraints
Default values
Works across all accessible schemas or filter by specific schema
get_table_indexes - View table indexes
Index types and uniqueness
Indexed columns
Status information
Shows schema name for each index
get_table_constraints - View table constraints
Primary keys, foreign keys
Unique and check constraints
Referenced tables
Shows schema name for each constraint
list_schemas - List all accessible schemas
check_gates - Read
lab_control+lab_work_itemsand enforce Pre-Flight / cascade-depth gatesget_dispatchable_items - List backend-owned Lab work items ready for dispatch
build_dispatch_packet - Validate a work item and produce an execution packet
stamp_dispatch_consumed - Accept ownership of a dispatch run
fail_dispatch_preflight - Revert a failed preflight and restore a dispatch-ready state
handle_final_return - Ingest a structured execution result into backend state
dispatch_scene - Create a writers-room scene item and fire its entry signal
Lab Mirror Bootstrap
Oracle DDL:
sqlplus user/password@db @sql/oracle/lab_control_plane.sqlPostgreSQL DDL:
psql "$DATABASE_URL" -f sql/postgres/lab_control_plane.sqlThe mirror includes:
lab_projectslab_work_itemslab_controllab_agent_registrylab_scene_itemslab_domain_eventslab_outbox_eventsnotion_projection_statelab_audit_loglab_telemetrylab_evidence_dossier
See docs/lab-backend-mirror.md for the backend ownership model and event flow.
Security
All queries use bind variables to prevent SQL injection
Connections are created per-query (no persistent pools)
Comprehensive audit logging with timestamps and duration
Environment variables keep credentials secure
Supports both read-only and read-write operations
Requirements
Node.js 18+
Oracle Database (any version)
Network access to Oracle database
License
MIT
Available Tools
6 toolsdescribe_tableC
Get table structure including columns, data types, and constraints
Inputs: table_name (required), schema.
execute_queryC
Execute a SQL query on the Oracle database
Inputs: query (required), params, maxRows.
get_table_constraintsC
Get constraints (primary keys, foreign keys, unique, check) for a table
Inputs: table_name (required), schema.
get_table_indexesC
Get indexes for a specific table
Inputs: table_name (required), schema.
list_schemasB
List all schemas in the database
Inputs: no named parameters.
list_tablesB
List tables from specified schema or all accessible schemas
Inputs: schema, pattern.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no ambiguity: describe_table focuses on column structure, execute_query handles SQL queries, get_table_constraints retrieves constraint details, get_table_indexes covers indexes, list_schemas enumerates schemas, and list_tables lists tables. There is no overlap in functionality that would cause misselection.
All tools follow a consistent verb_noun pattern using snake_case: describe_table, execute_query, get_table_constraints, get_table_indexes, list_schemas, and list_tables. The naming is predictable and readable throughout the set.
With 6 tools, the server is well-scoped for database exploration and querying. Each tool earns its place by covering essential operations like schema listing, table metadata retrieval, and query execution, without being too sparse or bloated.
The tool set provides strong coverage for database inspection and querying, including CRUD-like operations via execute_query and metadata access. Minor gaps exist, such as no explicit tools for data manipulation (e.g., insert, update, delete) or transaction management, but agents can work around these using execute_query for most workflows.
Maintenance
Related MCP Connectors
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Query, explore, and manage your databases through natural conversation.
Claude, connected to your own Oracle EPM. Each person as themselves, every call checked and logged.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides contextual Oracle database schema information to AI assistants, enabling them to understand and work with large databases containing thousands of tables. Supports multi-database connections, smart schema caching, table lookups, and relationship mapping.-
- AlicenseAqualityDmaintenanceEnables AI tools to interact with Oracle databases through query execution, schema browsing, stored procedure calls, and transaction management. Supports multiple database connections with safety features like read-only mode and dangerous query detection.16MIT
- AlicenseNot gradedqualityDmaintenanceProvides contextual database schema information for large Oracle databases, enabling AI assistants to understand and work with databases containing thousands of tables.134MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with secure, structured access to Oracle Database through MCP, enabling SQL execution, metadata exploration, and stored procedure execution.MIT