oracle-sqlplus-mcp
oracle-sqlplus-mcp
MCP-сервер (Model Context Protocol) для Oracle Database, использующий sqlplus в качестве бэкенда для подключения. Не требует привязок Node.js для Oracle Instant Client — достаточно работающего бинарного файла sqlplus.
Предварительные требования
sqlplus должен быть установлен и доступен в
PATH(поставляется вместе с Oracle Instant Client или полным клиентом Oracle)Node.js 18+
Related MCP server: sqlserver-mcp-colossal
Установка
npm install -g oracle-sqlplus-mcp
# or run directly with npx (no install needed):
npx oracle-sqlplus-mcpФормат строки подключения
username/password@host:port/servicenameПримеры:
scott/tiger@localhost:1521/ORCL
myuser/mypass@192.168.1.10:1521/XEPDB1
admin/secret@db.example.com:1521/PRODКонфигурация Claude Desktop
Добавьте в ваш claude_desktop_config.json:
{
"mcpServers": {
"oracle": {
"command": "npx",
"args": ["-y", "oracle-sqlplus-mcp"],
"env": {
"ORACLE_CONNECTION": "username/password@host:port/servicename"
}
}
}
}Дополнительные переменные окружения
Переменная | По умолчанию | Описание |
| (обязательно) | Полная строка подключения |
|
| Путь к бинарному файлу sqlplus, если он не в PATH |
|
| Тайм-аут запроса в миллисекундах |
Пример с пользовательским путем к sqlplus
{
"mcpServers": {
"oracle": {
"command": "npx",
"args": ["-y", "oracle-sqlplus-mcp"],
"env": {
"ORACLE_CONNECTION": "scott/tiger@192.168.1.10:1521/ORCL",
"SQLPLUS_PATH": "C:\\oracle\\instantclient_21_9\\sqlplus.exe",
"QUERY_TIMEOUT_MS": "60000"
}
}
}
}Доступные инструменты
Инструмент | Описание |
| Проверка соединения и получение версии Oracle |
| Список всех схем с количеством таблиц |
| Список таблиц, опционально с фильтрацией по схеме или шаблону имени |
| Показать столбцы, типы данных, возможность хранения NULL, первичные ключи |
| Получить примеры строк из таблицы |
| Выполнить любой SELECT-запрос |
| Выполнить DDL/DML (INSERT, UPDATE, DELETE, CREATE и т.д.) |
| Список хранимых процедур, функций, пакетов |
Примеры запросов
"Проверь соединение с Oracle"
"Перечисли все схемы в базе данных"
"Покажи мне таблицы в схеме SCOTT"
"Опиши таблицу EMPLOYEES"
"Получи 5 примеров строк из HR.EMPLOYEES"
"Выполни этот запрос: SELECT * FROM departments WHERE department_id < 50"
"Перечисли все хранимые процедуры в схеме HR"
Устранение неполадок
sqlplus: command not found
Установите SQLPLUS_PATH на полный путь к вашему бинарному файлу sqlplus.
ORA-12541: TNS:no listener
Проверьте хост, порт и убедитесь, что слушатель (listener) Oracle запущен.
ORA-01017: invalid username/password
Проверьте учетные данные. Формат строки подключения: user/pass@host:port/service.
SP2-0306: Invalid option
Убедитесь, что версия sqlplus поддерживает тихий режим -S (все современные версии поддерживают).
Available Tools
8 toolsdescribe_tableA
Describe the columns, data types and constraints of a table.
Inputs: table_name (required).
execute_ddlA
Execute a DDL or DML statement (CREATE, INSERT, UPDATE, DELETE, ALTER, DROP). Use with caution — changes are committed immediately.
Inputs: statement (required).
execute_queryA
Execute a SQL SELECT query against the Oracle database and return the results. Use standard Oracle SQL syntax. Do NOT include a trailing semicolon — it is added automatically.
Inputs: query (required).
get_table_sampleA
Fetch a sample of rows from a table (default: 10 rows).
Inputs: table_name (required), limit.
list_proceduresA
List stored procedures and functions for a given schema.
Inputs: schema.
list_schemasA
List all schemas (users/owners) in the database that have at least one table.
Inputs: no named parameters.
list_tablesB
List all tables accessible to the current user, optionally filtered by schema/owner.
Inputs: schema, search.
test_connectionA
Test the Oracle connection and return server version info.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Every tool has a clearly distinct purpose: describing tables, executing DDL, running queries, sampling rows, listing procedures, schemas, tables, and testing connections. No overlapping functionality.
All tool names follow a consistent verb_noun pattern with underscores (e.g., describe_table, list_tables), making them easy to parse and predict.
Eight tools is an appropriate number for a database interaction server, covering essential operations without being overwhelming or too sparse.
The toolset covers core database operations (querying, DDL/DML, listing objects, describing, sampling) but lacks capabilities like viewing procedure source code or managing users, which are minor gaps.
Maintenance
Related MCP Connectors
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP server for accessing Oracle databases, enabling schema exploration, query execution, and performance analysis.12MIT
- AlicenseNot gradedqualityNot gradedmaintenanceA comprehensive MCP server for SQL Server database operations, enabling CRUD operations, schema exploration, and stored procedure execution through natural language.7 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server to connect to Oracle databases and run SQL queries (up to 150 rows) via a single 'query' tool.ISC
- AlicenseAqualityCmaintenanceMCP server for Oracle Database enabling AI assistants to explore schemas, run queries, write data, and monitor sessions via natural language. Features read-only mode by default and uses Oracle Thin mode for zero-install connectivity.102MIT