Skip to main content

MCP Server For Oracle Database

Project description

OracleDB MCP Server

smithery badge

Overview

  • This project will install MCP - Model Context Protocol Server, that provides configured Oracle Database Table/Columns as context to LLM's.
  • Using this we can enable LLMs to interact with Oracle Database, Generate SQL Statements and Return Results using LLM prompts.

Installation

  • Install package
    pip install oracledb_mcp_server
    
  • Create .env in a folder with minimum value of Oracle DB Connection String. Sample file available here
  • Test oracledb_mcp_server server using uv run oracledb_mcp_server from the above folder.

Claud Desktop

  • Configuration details for Claud Desktop
    {
      "mcpServers": {
        "oracledb_mcp_server":{
          "command": "uv",
          "args": ["run","oracledb_mcp_server"],
          "env": {
              "DEBUG":"True",
              "COMMENT_DB_CONNECTION_STRING":"oracle+oracledb://USERNAME:PASSWORD@IP:PORT/?service_name=SERVICENAME",
              "DB_CONNECTION_STRING":"oracle+oracledb://USERNAME:PASSWORD@IP:PORT/?service_name=SERVICENAME",
              "TABLE_WHITE_LIST":"ACCOUNTS,CUS_ACC_RELATIONS,CUSTOMERS",
              "COLUMN_WHITE_LIST":"ACCOUNTS.ACC_AAD_ID,CUS_ACC_RELATIONS.CAR_CUS_ID,CUS_ACC_RELATIONS.CAR_AAD_ID,CUSTOMERS.CUS_ID"
          }
        }
      }
    }
    

Configuration

  • List of available environment variables
    • DEBUG: Enable debug logging (optional default is False)
    • COMMENT_DB_CONNECTION_STRING: Oracle DB connection String for comments. (required)
    • DB_CONNECTION_STRING: Oracle DB connection String for execution of queries. (required)
    • TABLE_WHITE_LIST: White Listed table names in list format ["table1", "table2"] (required)
    • COLUMN_WHITE_LIST: White Listed table-column names in list format ["table.column1", "table.column2"] (required)
    • QUERY_LIMIT_SIZE: Default value is 10 records if not provided(optional default is 10)

Interceptor

npx @modelcontextprotocol/inspector uv --directory "D:\\MyDev\\mcp\\oracledb_mcp_server" run -m oracledb_mcp_server

Contributing

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

License

This project is licensed under the terms of the MIT license.

Demo

Github Stars

Star History Chart

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

oracledb_mcp_server-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

oracledb_mcp_server-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file oracledb_mcp_server-0.1.1.tar.gz.

File metadata

  • Download URL: oracledb_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for oracledb_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 df5b7a174ba9e25ead703bc96a8cbb9cb52fc42bbf4ce18a9d1bfbc0cb8f04f8
MD5 5b4edf18221bb81d1ccfc63cab370bc1
BLAKE2b-256 5719555cf88b3a1caab2b7c617d2c8001eadc9674a89da21a4938c57628807f0

See more details on using hashes here.

File details

Details for the file oracledb_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for oracledb_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bf04cde3ea6378d4ee6bc693f1e56c4391351b24ce29359f2cc27e9d6e16d0f
MD5 795219d815eb1e20c5d2d09e4566f9e9
BLAKE2b-256 5bca8215adb36dd2ea15dd610d5455cde93e96a516049d629f124c7b2f91f68e

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