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

mseep_oracledb_mcp_server-0.1.0.tar.gz (10.8 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.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mseep_oracledb_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69cc06dd3b278e883edf25a8b4e3b891871382c998bf87b6d86497c996849cab
MD5 52a77a79582af29f0669c6d1c1190e9a
BLAKE2b-256 57a03c0a487867bc39424d689c16e054f8e6a516ea18b9888bf40a57c31b6c8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mseep_oracledb_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05ccbc57ceaf9117bf7cbde70070be0e9d4c0eb6187a2d1cc7b5d97e3ec88f5a
MD5 499e0551cd5d9b0ce578053f2f2e510e
BLAKE2b-256 ae026bca470e6d7f5dc80c0d5cdadae51f27c91ea3381fa57ba7b79c1a273825

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