- Home
- MCP servers
- Oracle
Oracle
- javascript
5
GitHub Stars
javascript
Language
4 months ago
First Indexed
3 weeks 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": {
"samscarrow-oracle-mcp-server": {
"command": "node",
"args": [
"/path/to/oracle-mcp/src/index.js"
],
"env": {
"ORACLE_SID": "ORCL",
"ORACLE_HOST": "localhost",
"ORACLE_PORT": "1521",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password",
"ORACLE_TNS_NAME": "ORCL",
"ORACLE_SERVICE_NAME": "ORCL",
"ORACLE_DEFAULT_SCHEMA": "HR",
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name"
}
}
}
}You can use this MCP server to access Oracle databases from AI assistants, enabling multi-schema queries, table descriptions, index and constraint viewing, and safe, parameter-bound SQL execution. It supports flexible authentication methods and audit logging, making it practical for integrated AI workflows that need reliable database access.
How to use
You connect an MCP client to the Oracle MCP Server by configuring a local or remote MCP entry that runs the server process and exposes the available tools. The server lets you execute SQL with bind variables, list tables across schemas, describe table structures, and inspect indexes and constraints. All queries use parameter binding to prevent SQL injection, and each query runs with an auditable timestamp and duration.
How to install
Prerequisites you need before installing: Node.js 18 or newer, and access to an Oracle database from your network.
Step 1: Install dependencies.
npm install
Step 2: Start the server locally using the standard runtime command. You must provide the required Oracle connection details via environment variables.
node /path/to/oracle-mcp/src/index.js
Step 3: Alternatively, run the server with npx if you publish the package and want a quick start without a local install.
"mcpServers": {
"oracle_mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "oracle-mcp-server"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
Configuration and usage notes
Environment variables let you specify how to connect to Oracle. You may provide the connection as a single easy-connect string, a TNS name, or individual components. Optional defaults can set the default schema if needed.
To integrate with Claude Desktop or Claude Code, add an MCP entry that points to the local server or the npx invocation, and include the Oracle credentials in environment variables. After updating the configuration, restart the Claude tools to apply changes.
Security and data access
All SQL statements are executed with bind variables to prevent injection attacks. Connections are created per query, not kept as persistent pools. The server records audit logs with timestamps and durations for security monitoring. Credentials are supplied via environment variables rather than hard-coded files.
Available tools and capabilities
execute_query — Run SQL with parameter binding. Automatically converts PostgreSQL-style parameters to Oracle syntax and returns rows, rowCount, and metadata.
list_tables — List tables across schemas with optional filtering by schema or pattern. Returns schema, table name, row count, and last analyzed date.
describe_table — Get column details, including names, types, sizes, nullable constraints, and default values, across schemas or filtered by a specific schema.
get_table_indexes — View index types, uniqueness, indexed columns, and status with schema references.
get_table_constraints — View constraints such as primary/foreign keys, unique and check constraints, and referenced tables with schema context.
list_schemas — List all accessible schemas.
Troubleshooting tips
Ensure required environment variables are set before starting the server. If a connection fails, verify the Oracle host, port, service name/SID, and user credentials. Check the audit logs for any failed authentication or permission issues.
Available tools
execute_query
Execute SQL with parameter binding, including PostgreSQL-style to Oracle parameter conversion, returning rows, rowCount, and metadata.
list_tables
List tables across schemas with optional filtering by schema or pattern, returning schema, table, row count, and last analyzed date.
describe_table
Describe table structure including columns, types, sizes, nullability, and defaults across schemas.
get_table_indexes
View index types, uniqueness, indexed columns, status, and schema.
get_table_constraints
View primary keys, foreign keys, unique and check constraints, and referenced tables with schema.
list_schemas
List all accessible schemas.