Get the FREE Ultimate OpenClaw Setup Guide →

mcp-oracle

servidor mpc para hacer consultas a oracle

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yrsonhtm-mcp-oracle-server node path/to/server.js \
  --env ORACLE_HOST="HOST_SERVER" \
  --env ORACLE_PORT="PORT" \
  --env ORACLE_USER="USERNAME" \
  --env ORACLE_DATABASE="DATABASE_NAME" \
  --env ORACLE_PASSWORD="PASSWORD"

How to use

This MCP server exposes tools to interact with an Oracle database through the Model Context Protocol (MCP). It supports safe read-only operations: executing SELECT queries, describing table structures, and listing available tables for the connected user. Once running, the server communicates over standard MCP channels, allowing tools like Cursor or any MCP-enabled client to send commands and receive structured results.

Available tools include:

  • execute_query: runs a SELECT statement against the Oracle database. It returns result rows and column metadata.
  • describe_table: provides the schema for a specified Oracle table, including column names, data types, and constraints where applicable.
  • list_tables: lists all tables accessible to the connected Oracle user. This helps you discover available data structures before querying.

To use these tools, configure an MCP client (such as Cursor) to connect to the server via MCP, select the desired tool, and provide the required inputs (SQL for execute_query, table name for describe_table or list_tables). The server enforces safety by permitting only SELECT operations to prevent data modification.

How to install

Prerequisites:

  • Node.js v18 or higher
  • An Oracle database accessible from the server host
  • Environment variables configured for Oracle connection (see below)
  1. Clone the repository
  1. Install dependencies
  • npm install
  1. Configure environment variables
  • Create a .env file (or export variables in your shell) with: ORACLE_HOST=<host> ORACLE_PORT=<port> ORACLE_DATABASE=<service/SID> ORACLE_USER=<username> ORACLE_PASSWORD=<password>
  1. Start the server
  • npm start
  1. Verify
  • Ensure the server starts without errors and is ready to accept MCP commands on stdout/stderr or via the configured communication channel.

Additional notes

Notes and tips:

  • The server is configured to allow only SELECT queries to protect data integrity. If you need broader access, adjust the query handling with awareness of security implications.
  • Ensure Oracle client connectivity from the host running the MCP server. Network rules, firewalls, and TNS configurations may affect connectivity.
  • When using Cursor, place your server under an MCP group named oracle-db (or your chosen name) and reference that name in your mcp.json configuration. Update the ORACLE_* environment variables to point to your database.
  • If you encounter connection errors, double-check ORACLE_HOST, ORACLE_PORT, ORACLE_DATABASE, ORACLE_USER, and ORACLE_PASSWORD. Ensure the user has the necessary privileges to run SELECT and access the target tables.

Related MCP Servers

Sponsor this space

Reach thousands of developers