Oracle MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Oracle MCP Server
A standalone Model Context Protocol (MCP) server for Oracle Database operations, built following the Deer Flow configuration standards.
Features
Query Execution: Execute SQL queries with result streaming
Schema Discovery: List schemas, tables, and describe table structures
Stored Procedures: Execute Oracle stored procedures and functions
Statistics: Get table and index statistics
Connection Pooling: Efficient connection management
Security: Optional read-only mode and query validation
Configuration: Flexible YAML and environment-based configuration
Related MCP server: Database MCP Server
Installation
Prerequisites
Python 3.12 or higher
Oracle Database (11g or higher)
Oracle Instant Client (optional, for thick mode)
Using uv (Recommended)
# Clone the repository
git clone <repository-url>
cd oracle-mcp-server
# Install dependencies
uv sync
# Copy configuration files
cp .env.example .env
cp conf.yaml.example conf.yaml
# Edit configuration
nano .env # or your preferred editor
nano conf.yamlUsing pip
pip install -e .Configuration
Environment Variables (.env)
The server can be configured using environment variables:
ORACLE_DB_CONNECTION_STRING=system/password@localhost:1521/XEPDB1
ORACLE_DB_READ_ONLY=false
ORACLE_DB_MAX_ROWS=1000See .env.example for all available options.
YAML Configuration (conf.yaml)
For more detailed configuration, use the YAML file:
database:
connection_string: system/password@localhost:1521/XEPDB1
pool:
min: 1
max: 5
read_only: false
tools:
enabled:
- query_database
- describe_table
- list_tablesSee conf.yaml.example for all available options.
Usage
Running the Server
Stdio Mode (Default)
# Using uv
uv run oracle-mcp-server
# Or directly
python -m oracle_mcp.serverSSE Mode (HTTP Server)
uv run oracle-mcp-server --mode sse --port 3000Integration with Deer Flow
Add to your Deer Flow MCP settings:
{
"mcp_settings": {
"servers": {
"oracle-db": {
"transport": "stdio",
"command": "uv",
"args": ["run", "oracle-mcp-server"],
"env": {
"ORACLE_DB_CONNECTION_STRING": "user/pass@host:1521/service"
},
"enabled_tools": [
"query_database",
"describe_table",
"list_tables"
],
"add_to_agents": ["researcher", "coder"]
}
}
}
}Integration with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"oracle": {
"command": "uv",
"args": ["run", "oracle-mcp-server"],
"env": {
"ORACLE_DB_CONNECTION_STRING": "system/password@localhost:1521/XEPDB1"
}
}
}
}Available Tools
1. query_database
Execute SQL queries and return results.
Parameters:
query(string): SQL query to executemax_rows(optional, int): Maximum rows to return
Example:
SELECT * FROM employees WHERE department_id = 102. describe_table
Get detailed information about a table structure.
Parameters:
table_name(string): Name of the tableschema_name(optional, string): Schema name
Example:
EMPLOYEES3. list_tables
List all tables in a schema.
Parameters:
schema_name(optional, string): Schema name (defaults to current user)pattern(optional, string): Filter tables by pattern
Example:
schema_name: HR
pattern: EMP%4. list_schemas
List all schemas accessible to the current user.
5. execute_procedure
Execute Oracle stored procedures and functions.
Parameters:
procedure_name(string): Name of the procedure/functionparameters(optional, dict): Input parameters
6. get_table_stats
Get statistics for a table (row count, size, indexes).
Parameters:
table_name(string): Name of the tableschema_name(optional, string): Schema name
Security Considerations
Read-Only Mode
Enable read-only mode to prevent DDL/DML operations:
database:
read_only: trueConnection Security
Use strong passwords
Configure Oracle network encryption
Use Oracle Wallet for credential management
Restrict network access with firewalls
Query Validation
The server validates queries to prevent:
SQL injection attempts
Dangerous operations in read-only mode
Excessive resource consumption
Development
Running Tests
# Install dev dependencies
uv sync --extra dev
# Run tests
pytest
# Run with coverage
pytest --cov=src/oracle_mcp --cov-report=term-missingCode Formatting
# Format code
ruff format .
# Lint code
ruff check .Troubleshooting
Connection Issues
Verify Oracle Database is running
Check connection string format
Ensure network access to database server
Verify Oracle client installation
Thick Mode Issues
If using thick mode:
# Install Oracle Instant Client
# Download from: https://www.oracle.com/database/technologies/instant-client.html
# Set environment variable
export ORACLE_DB_THICK_LIB_DIR=/path/to/instantclientPerformance Issues
Adjust connection pool settings
Enable connection pooling
Optimize queries
Use result pagination
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
References
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Work with your database from AI tools: ask, export, approved changes, and scheduled jobs.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Microsoft SQL Server databases through query execution, schema discovery, CRUD operations, stored procedures, and data export with built-in safety controls.1864 PyPIApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with relational databases such as MySQL, PostgreSQL, SQLite, SQL Server, and Oracle. Provides tools for querying, data inspection, and schema analysis with optional read-only mode.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to inspect schemas, analyze performance, check security, and troubleshoot SQL Server 2019+ databases through a safe, controlled interface.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to securely query and administer SQL Server databases, with read-only access by default and permission-based write capabilities.30 PyPIMIT