Oracle DB MCP Server
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 DB MCP Servershow me the top 10 customers by total orders"
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 DB MCP Server
A Model Context Protocol (MCP) server for Oracle Database connectivity. This server enables AI tools like Cursor, Claude Desktop, and other MCP-compatible clients to interact with Oracle databases.
Features
Multiple Database Connections: Configure and manage multiple named Oracle database connections
Thin & Thick Mode Support: Works with Oracle's thin driver (no client required) or thick mode (with Oracle Instant Client)
Query Execution: Execute SELECT queries with result formatting
DML Operations: Execute INSERT, UPDATE, DELETE with safety checks
PL/SQL Support: Execute PL/SQL blocks, create procedures/functions
Schema Browsing: List tables, views, procedures, describe table structures
Stored Procedures: Execute stored procedures with input/output parameters
Transaction Management: Commit and rollback support
Safety Features: Read-only mode, dangerous query detection, automatic warnings
Related MCP server: OracleDB MCP Server
Installation
Using npx (Recommended)
No installation required. Configure your MCP client to run:
npx -y oracle-db-mcpLocal Installation
npm install -g oracle-db-mcpThen run:
oracle-db-mcpConfiguration
Configuration File (connections.json)
Create a configuration file with your database connections:
{
"oracleClient": {
"mode": "thin"
},
"settings": {
"defaultMaxRows": 100,
"queryTimeout": 30
},
"connections": [
{
"name": "dev",
"host": "dev-server.company.com",
"port": 1521,
"serviceName": "DEVDB",
"username": "dev_user",
"password": "dev_password",
"mode": "readwrite"
},
{
"name": "prod",
"host": "prod-server.company.com",
"port": 1521,
"serviceName": "PRODDB",
"username": "report_user",
"passwordEnv": "PROD_DB_PASSWORD",
"mode": "readonly"
}
]
}Connection Options
Each connection supports:
Option | Description |
| Unique identifier for the connection |
| Database server hostname |
| Port number (default: 1521) |
| Oracle service name |
| Oracle SID (alternative to serviceName) |
| Full connection string (alternative to host/port/service) |
| Database username |
| Database password (direct) |
| Environment variable containing password |
|
|
| Optional privileged connect: |
Configuration File Locations
The server searches for configuration in this order:
ORACLE_MCP_CONFIGenvironment variable./config/connections.json./connections.json~/.oracle-mcp/connections.json
Environment Variables
For simple single-connection setup:
export ORACLE_CONNECTION_NAME=mydb
export ORACLE_HOST=localhost
export ORACLE_PORT=1521
export ORACLE_SERVICE=XEPDB1
export ORACLE_USER=scott
export ORACLE_PASSWORD=tiger
export ORACLE_MODE=readonly
# Opt-in to allow privileged connects (SYSDBA/SYSOPER). Default: false
export ORACLE_ALLOW_SYSDBA=false
# For privileged connection (if enabled):
export ORACLE_PRIVILEGE=SYSDBAMCP Client Configuration
Cursor
Add to your Cursor MCP settings (.cursor/mcp.json):
{
"mcpServers": {
"oracle-db": {
"command": "npx",
"args": ["-y", "oracle-db-mcp"],
"env": {
"ORACLE_MCP_CONFIG": "/path/to/connections.json"
}
}
}
}Claude Desktop
Add to your Claude Desktop config:
{
"mcpServers": {
"oracle-db": {
"command": "npx",
"args": ["-y", "oracle-db-mcp"],
"env": {
"ORACLE_MCP_CONFIG": "/path/to/connections.json"
}
}
}
}Available Tools
Connection Management
Tool | Description |
| List all configured connections with status |
| Test connectivity and get database info |
| Establish a connection |
| Close a connection |
Query Execution
Tool | Description |
| Execute SELECT queries |
| Execute INSERT/UPDATE/DELETE |
| Execute PL/SQL blocks or DDL |
| Call stored procedures |
Schema Browsing
Tool | Description |
| List tables and views |
| Get column, constraint, index info |
| List procedures, functions, packages |
| Get source code of PL/SQL objects |
| Get procedure parameters |
| Get query execution plan |
Transaction Management
Tool | Description |
| Commit current transaction |
| Rollback current transaction |
Safety Features
Read-Only Mode
Connections configured as readonly:
Block all DML operations (INSERT, UPDATE, DELETE)
Block PL/SQL execution
Allow only SELECT queries
Dangerous Query Detection
The server warns or blocks:
DROP statements
TRUNCATE statements
UPDATE/DELETE without WHERE clause
ALTER SYSTEM commands
Oracle Client Modes
Thin Mode (Default)
No Oracle client installation required. Works with:
Oracle Database 12.1 and later
Oracle Cloud databases
Thick Mode
Requires Oracle Instant Client. Enable in config:
{
"oracleClient": {
"mode": "thick",
"path": "/path/to/instantclient"
}
}Required for:
Oracle Database versions before 12.1
Advanced features (LDAP, Kerberos, etc.)
Some data types (BFILE, etc.)
Development
Building from Source
git clone https://github.com/titan213/oracle-db-mcp
cd oracle-db-mcp
npm install
npm run buildRunning in Development
npm run devTesting
npm testLicense
MIT
Author
Gihan Sundarapperuma gihan213@gmail.com
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides flexible access to Oracle databases for AI assistants like Claude, supporting SQL queries across multiple schemas with comprehensive database introspection capabilities.69510MIT
- Alicense-qualityDmaintenanceEnables LLMs to interact with Oracle Databases by providing specific table and column metadata as context. Users can generate SQL statements and retrieve query results directly through natural language prompts.Apache 2.0
- Flicense-qualityDmaintenanceEnables integration with Oracle Database and Oracle APEX 20.2, allowing LLMs to execute SQL/PL/SQL, manage database objects, and inspect APEX application metadata. It supports full database CRUD operations, object dependency analysis, and detailed page-level inspection of APEX environments.3
- Flicense-qualityDmaintenanceEnables AI applications to run SQL queries and retrieve results from Oracle Database.8
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Run SOQL queries to explore and retrieve Salesforce data. Access accounts, contacts, opportunities…
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/titan213/oracle-db-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server