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

orange_oracledb_mcp_server-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

orange_oracledb_mcp_server-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file orange_oracledb_mcp_server-0.1.0.tar.gz.

File metadata

File hashes

Hashes for orange_oracledb_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d414136cc4990cb492a84fdefd2f5e71ad745d6a7662fc68ff75a73136e3dfe
MD5 97310dabe820dc9ef7cd5f7cdd52312b
BLAKE2b-256 610f8a2de328ad01e04be2c21851a83782348f0ca342483dfc7ffa9e5b54f5fb

See more details on using hashes here.

File details

Details for the file orange_oracledb_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for orange_oracledb_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e6c506f07568abef6f1fa3357fa64968169330dcb6f1b0281c465080e324441
MD5 410032fcb3f1e739ac2de52e4360b05c
BLAKE2b-256 c629bd3953fef9ca695acda3e9a96541de79dca067966f18282810efbad99070

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