oracledb-mcp
v1.0.0
Published
MCP server for Oracle Database — query, describe tables, explore schemas. Multi-database support with thin client (no Oracle Instant Client needed).
Maintainers
Readme
oracledb-mcp
Oracle Database MCP (Model Context Protocol) server for AI assistants. Query, explore schemas, describe tables, and preview data across multiple Oracle databases simultaneously.
No Oracle Instant Client needed — uses thin client mode.
Features
- Multi-database — Connect to multiple Oracle databases simultaneously
- Thin client — No Oracle Instant Client needed (uses
oracledbthin mode) - Read-only by default — Write operations require explicit opt-in
- 5 tools:
oracle_query,oracle_list_tables,oracle_describe_table,oracle_list_schemas,oracle_preview
Quick Start
With npx (no install)
ORACLE_DATABASES=mydb \
ORACLE_MYDB_HOST=hostname:1521/service \
ORACLE_MYDB_USER=scott \
ORACLE_MYDB_PASSWORD=tiger \
npx oracledb-mcpWith MCP Gateway
Add via the Gateway Admin UI → Browse → Oracle DB, or:
{
"id": "oracle-db",
"name": "Oracle Databases",
"command": "npx",
"args": ["-y", "oracle-db-mcp"],
"env": {
"ORACLE_DATABASES": "hr,finance",
"ORACLE_HR_HOST": "db-host:1521/HRPROD",
"ORACLE_HR_USER": "hr_reader",
"ORACLE_HR_PASSWORD": "secret",
"ORACLE_HR_LABEL": "HR Database",
"ORACLE_FINANCE_HOST": "db-host:1521/FINPROD",
"ORACLE_FINANCE_USER": "fin_reader",
"ORACLE_FINANCE_PASSWORD": "secret",
"ORACLE_FINANCE_LABEL": "Finance Database"
}
}With VS Code MCP settings
{
"mcp": {
"servers": {
"oracle-db": {
"command": "npx",
"args": ["-y", "oracledb-mcp"],
"env": {
"ORACLE_DATABASES": "mydb",
"ORACLE_MYDB_HOST": "hostname:1521/service",
"ORACLE_MYDB_USER": "scott",
"ORACLE_MYDB_PASSWORD": "tiger"
}
}
}
}
}Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| ORACLE_DATABASES | Yes | Comma-separated list of DB aliases (e.g. hr,finance,staging) |
| ORACLE_{ALIAS}_HOST | Yes | Connection string: host:port/service_name |
| ORACLE_{ALIAS}_USER | Yes | Database username |
| ORACLE_{ALIAS}_PASSWORD | Yes | Database password |
| ORACLE_{ALIAS}_LABEL | No | Human-readable label (defaults to alias) |
| ORACLE_ALLOW_WRITE | No | Set to true to allow DML operations (default: false) |
| ORACLE_MAX_ROWS | No | Maximum rows per query (default: 100) |
Tools
oracle_query
Execute SQL queries. Read-only by default.
oracle_list_tables
List tables, optionally filtered by schema and name pattern.
oracle_describe_table
Show table structure: columns, types, primary key, indexes, foreign keys.
oracle_list_schemas
List all schemas (users) that own tables.
oracle_preview
Preview first N rows of a table with optional WHERE and ORDER BY.
Build from Source
npm install
npm run build # esbuild single-file bundle
npm start # run the serverLicense
MIT
