mcp -for-oracle-database
MCP server from kutsushitaneko/mcp-server-for-oracle-database
claude mcp add --transport stdio kutsushitaneko-mcp-server-for-oracle-database python oracledb_mcp_server.py \ --env ORACLE_DSN="your_dsn" \ --env ORACLE_USER="your_username" \ --env ORACLE_PASSWORD="your_password"
How to use
This MCP server provides a lightweight bridge between LLM-based tools and an Oracle Database. It exposes functions to execute SELECT queries, inspect table structures, and guide query usage, all through the MCP protocol so AI assistants can request database operations in a structured way. The provided tools include execute_oracle for running SELECT statements and returning formatted results, list_tables to enumerate database tables with optional filters, describe_table to display a table's schema, and oracle_query_assistant to generate guidance prompts for composing Oracle queries. To use it, configure your MCP client (e.g., Claude Desktop or Cursor) with the server entry, then issue natural-language prompts like “show me the table structure for EMPLOYEE” or “execute this SELECT query: SELECT * FROM EMPLOYEE WHERE id = :id” and the MCP server will handle the underlying Oracle interaction and return results in a readable format.
How to install
Prerequisites:
- Python 3.11 or higher
- Access to an Oracle Database
- A working network setup that allows your environment to reach the Oracle DB (as configured by DSN)
- git (for cloning the repository)
Install and run locally:
-
Clone the repository: git clone <repository-url> cd mcp-server-for-oracle-database
-
Create and activate a Python virtual environment (recommended): python -m venv .venv
Windows
..venv\Scripts\activate
macOS/Linux
source .venv/bin/activate
-
Install dependencies: uv pip install -r requirements.txt
-
Set required environment variables. Create a .env file with Oracle credentials: ORACLE_USER=your_username ORACLE_PASSWORD=your_password ORACLE_DSN=your_dsn
-
Start the MCP server (example using the proposed config): python oracledb_mcp_server.py
-
Ensure the MCP client is pointed to the running server. If you are using the provided mcp_config, configure the client accordingly and restart the client if needed.
Additional notes
Notes and tips:
- The server is intended for local, read-only access in a controlled environment. It enforces that only SELECT statements are allowed and applies basic query length and keyword checks for safety.
- If you encounter connection issues to Oracle, verify your DSN (or tnsnames.ora/config) and ensure network access from your host to the Oracle server.
- Keep your .env or environment variables secure; do not commit credentials to version control.
- When configuring MCP clients, you may need to provide the absolute path to your Python interpreter and the absolute path to oracledb_mcp_server.py depending on your environment. Update the mcp_config accordingly.
- If you plan to expose this server beyond localhost, ensure proper network restrictions and authentication measures are in place, as the README notes are focused on local use.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP