Skip to main content

MCP Server For Oracle Database

Project description

OracleDB MCP Server

smithery badge MseeP.ai Security Assessment 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

mseep_oracledb_mcp_server-0.1.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

mseep_oracledb_mcp_server-0.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mseep_oracledb_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e13e2a0568ad0c331f8e4f50ba2f0735a9e7774dd46a4e70f1336202b820e1b5
MD5 cbcae98273abf1e828678e1452b4e220
BLAKE2b-256 a29718e683b0d9b3731f0123dc0a7327176f66103dcd8c57d8ff028f452667f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mseep_oracledb_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1ad23b5fe6e8cdd47fb0900ff88cb43b60ea2389875b94df2bd842dcfef714e
MD5 b277a9c91dc459c1da6175453ba95f05
BLAKE2b-256 d9a1b1dfdb0402880015864d1cd6d0cc13d2a87b45b91c96575aa2608ac2bb39

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