概览
What is OracleDB MCP Server?
A Model Context Protocol (MCP) server that exposes configured Oracle Database tables and columns as context for large language models (LLMs). It enables LLMs to interact with an Oracle database by generating SQL statements and returning query results from natural language prompts.
How to use OracleDB MCP Server?
Install the Python package via pip install oracledb_mcp_server, create a .env file with the required Oracle DB connection string, and test the server with uv run oracledb_mcp_server. For Claude Desktop, add the JSON configuration shown in the README, specifying both a connection string for comments and one for query execution, along with whitelisted tables and columns.
Key features of OracleDB MCP Server
- Provides Oracle database schema as context to LLMs.
- Generates SQL statements from natural language prompts.
- Returns query results directly to the LLM.
- Configurable whitelist of tables and columns.
- Separate connection strings for metadata comments and queries.
- Optional debug logging and configurable result limit (default 10).
Use cases of OracleDB MCP Server
- Chat with an Oracle database using natural language.
- Automate SQL query generation and execution for reporting.
- Enable LLM-powered data exploration without writing raw SQL.
- Integrate Oracle database context into AI assistants like Claude Desktop.
FAQ from OracleDB MCP Server
What dependencies are required to run OracleDB MCP Server?
Python and the uv package manager are required. You also need access to an Oracle database with valid connection strings.
How do I configure the server for my Oracle database?
Set the DB_CONNECTION_STRING and COMMENT_DB_CONNECTION_STRING environment variables with your Oracle credentials and service name. Also specify required whitelists: TABLE_WHITE_LIST (table names) and COLUMN_WHITE_LIST (table.column pairs).
What is the QUERY_LIMIT_SIZE setting and what is its default?
QUERY_LIMIT_SIZE limits the number of rows returned by queries. It is optional and defaults to 10 records.
Are there any security or access controls built in?
The server uses whitelists (TABLE_WHITE_LIST and COLUMN_WHITE_LIST) to restrict which database objects the LLM can access. Credentials are provided via environment variables.
What transport or authentication protocol does the server use?
The server follows the Model Context Protocol (MCP) standard. Authentication to the Oracle database is handled via the provided connection strings (username/password in the DSN).