Skip to main content

Model Context Protocol server to access Oracle databases, supporting Oracle 11g and above.

Project description

Oracle11g MCP Server

PyPI version Python 3.12+

Model Context Protocol (MCP) server for Oracle databases, supporting Oracle 11g and above. This server enables AI models to interact with Oracle databases through a standardized protocol.

Features

  • Database Operations: List tables, describe table structures, execute SQL queries
  • DDL Support: Execute Data Definition Language statements (CREATE, ALTER, DROP, etc.)
  • Security: Built-in protections against dangerous operations
  • Connection Pooling: Efficient database connection management
  • Async Support: Full asynchronous operation support

Installation

Using uvx (Recommended)

uvx oracle11g-mcp-server

Using pip

pip install oracle11g-mcp-server

Prerequisites

  • Python 3.12 or higher
  • Oracle Instant Client
  • Oracle database (11g or higher)

Configuration

Environment Variables

Create a .env file or set the following environment variables:

  • ORACLE_CONNECTION_STRING: Your Oracle database connection string
    • Format: username/password@hostname:port/service_name
  • LIB_DIR: Path to your Oracle Instant Client directory
  • DQL_LIMITS_ROWS: Maximum rows returned by SELECT queries (default: 10)

MCP Configuration

Add this to your MCP client configuration (e.g., Cursor's mcp.json):

{
  "mcpServers": {
    "oracle11g-mcp-server": {
      "command": "uvx",
      "args": ["oracle11g-mcp-server"],
      "env": {
        "ORACLE_CONNECTION_STRING": "username/password@hostname:port/service_name",
        "LIB_DIR": "/path/to/instantclient",
        "DQL_LIMITS_ROWS": "1000"
      }
    }
  }
}

Available Tools

  • list_tables: Get a list of all tables in the database
  • describe_table: Get detailed information about a table's structure
  • execute_DQL: Execute SELECT queries to read data
  • execute_DDL: Execute DDL statements (CREATE, ALTER, DROP, etc.)

Development

Setup

# Clone the repository
git clone https://github.com/yourusername/oracle11g-mcp-server.git
cd oracle11g-mcp-server

# Install dependencies
uv pip install -e .

# Install Node.js dependencies for inspector
pnpm install

Running

# Development mode with hot reload
uv run dev

# Production mode
uv run main

Testing

# Run MCP inspector
pnpm run inspector

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oracle11g_mcp_server-1.0.7.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oracle11g_mcp_server-1.0.7-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file oracle11g_mcp_server-1.0.7.tar.gz.

File metadata

  • Download URL: oracle11g_mcp_server-1.0.7.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for oracle11g_mcp_server-1.0.7.tar.gz
Algorithm Hash digest
SHA256 e29049e518573c648599708cc833d2ff761e1a8a85b51008578493bb58628cfb
MD5 966aa5e3a7701db5f66b6992d3606da7
BLAKE2b-256 25deb030b3edee339ce7375611236b1adfd81544ddcf32877626cc4219888f0c

See more details on using hashes here.

File details

Details for the file oracle11g_mcp_server-1.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for oracle11g_mcp_server-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2645faff9e5831f9475f9fd39954bfa714e04ae690e371d1d8f4e8bd02b1ae50
MD5 2ef0d6eaff2dd42bb8b1bcef3e4d6b12
BLAKE2b-256 c3e4ce932cd1e20bc186cfefbab04f8c6deb6df27b621d0fcddff6501ffb0bc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page