- Home
- MCP servers
- Oracle DB
Oracle DB
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"titan213-oracle-db-mcp": {
"command": "npx",
"args": [
"-y",
"oracle-db-mcp"
],
"env": {
"ORACLE_HOST": "localhost",
"ORACLE_MODE": "readonly",
"ORACLE_PORT": "1521",
"ORACLE_USER": "scott",
"ORACLE_SERVICE": "XEPDB1",
"ORACLE_PASSWORD": "tiger",
"ORACLE_MCP_CONFIG": "<path-to-connections.json>",
"ORACLE_CONNECTION_NAME": "mydb"
}
}
}
}You can use the Oracle DB MCP Server to connect to Oracle databases from MCP clients, run queries, manage schemas, and perform transactional operations with safety features. It supports multiple connections, thin or thick client modes, and PL/SQL execution, making it a versatile bridge between AI tools and Oracle data sources.
How to use
Establish a connection to your Oracle databases from an MCP client, then run SELECT queries, DML, PL/SQL, and stored procedures. You can browse schemas, list tables and procedures, and perform transactions with commit and rollback. Use read-only mode to restrict operations and enable safety checks to catch dangerous queries.
How to install
Prerequisites: you need Node.js and npm installed on your system.
Option 1 — Use npx (recommended). Run the MCP server directly without installation.
npx -y oracle-db-mcp
Option 2 — Install locally and run the server.
npm install -g oracle-db-mcp
oracle-db-mcp
Configuration and usage notes
Configure connections in a JSON file that specifies how to reach each Oracle database. You can enable thin or thick modes, set default query limits, and control access with read-only or read-write modes.
{
"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"
}
]
}
Environment variables can be set for a simple single-connection setup, such as host, port, service, user, and mode, to avoid hardcoding credentials in the configuration file.
Configuration file locations and environment variables
The server looks for its configuration in this order. Place your connections.json file in one of these locations to ensure it’s picked up automatically.
ORACLE_MCP_CONFIG
./config/connections.json
./connections.json
~/.oracle-mcp/connections.json
For a straightforward single-connection setup, you can export the following environment variables before launching the server.
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
Using with MCP clients
To connect from an MCP client, point the client at the server and use the MCP settings to specify how to start the server. You can configure the client to launch the server process via npx or a global install, and provide the path to your connections.json for the server to load.
Safety features and modes
Read-only mode blocks all DML operations and PL/SQL execution while allowing SELECT queries, helping protect your data. The server also detects dangerous queries like DROP, TRUNCATE, or UPDATE/DELETE without a WHERE clause, and it can warn or block such statements.
Oracle client modes
Thin mode requires no Oracle client installation and works with modern Oracle Database versions. Thick mode requires Oracle Instant Client and is needed for older databases or advanced features.
"oracleClient": {
"mode": "thick",
"path": "/path/to/instantclient"
}
Development and testing
If you are developing or testing locally, you can clone the project, install dependencies, build, and run the server or run tests as part of your workflow.
git clone https://github.com/titan213/oracle-db-mcp
cd oracle-db-mcp
npm install
npm run build
npm run dev
npm test
Notes and licensing
The server is distributed under the MIT license.
Available tools
list_connections
List all configured connections with status
test_connection
Test connectivity and get database info
connect
Establish a connection
disconnect
Close a connection
execute_query
Execute SELECT queries
execute_dml
Execute INSERT/UPDATE/DELETE queries
execute_plsql
Execute PL/SQL blocks or DDL statements
execute_procedure
Call stored procedures with parameters
list_tables
List tables and views in the connected schema
describe_table
Describe table structures including columns and constraints
list_procedures
List procedures, functions, and packages
get_procedure_source
Get source code for PL/SQL objects
get_procedure_params
Get parameters for procedures or functions
explain_query
Get query execution plan
commit
Commit current transaction
rollback
Rollback current transaction