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.
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | Table name to describe (e.g. EMPLOYEES or SCOTT.EMPLOYEES) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the basic functionality but does not disclose behavioral traits such as whether the operation is read-only, authentication requirements, or performance implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the purpose. Every word earns its place with no redundancy or extraneous detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has only one parameter and no output schema, the description adequately explains what the tool does. It could mention the output format (e.g., 'returns a table description') but is complete enough for a simple metadata tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single parameter, so baseline is 3. The schema provides an example ('e.g. EMPLOYEES or SCOTT.EMPLOYEES') that adds meaning. The description does not add information about the parameter itself but focuses on the output.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('describe') and resource ('the columns, data types and constraints of a table'), clearly distinguishing it from siblings like list_tables (which only lists names) and execute_query (which runs arbitrary SQL).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. The description implies retrieving schema information, but lacks comparison to alternatives like list_tables or get_table_sample, leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_ddlA
Execute a DDL or DML statement (CREATE, INSERT, UPDATE, DELETE, ALTER, DROP). Use with caution — changes are committed immediately.
| Name | Required | Description | Default |
|---|---|---|---|
| statement | Yes | SQL DDL/DML statement (without trailing semicolon) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that changes are committed immediately, a key behavioral trait. No annotations exist, but the description lacks details on permissions, rollback, or result behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the core action and a critical warning. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple tool with one parameter and no output schema. Missing information about return value (e.g., affected rows or success indicator) would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%. The tool description does not add extra meaning beyond the schema's parameter description, which includes the 'without trailing semicolon' instruction.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool executes DDL/DML statements and lists examples. However, it does not differentiate from sibling 'execute_query' which may also handle DML.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Includes a caution about immediate commitment, implying use with care. No explicit guidance on when not to use or references to alternatives like execute_query for SELECT.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL SELECT query to execute (without trailing semicolon) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. Only one behavioral trait is disclosed (semicolon handling). It does not mention safety (SELECT is read-only), authentication needs, rate limits, or error behavior. Minimal disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, and no wasted words. Efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description covers purpose and a key syntax constraint. It lacks explanation of return format or error behavior, but overall adequate for basic use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline 3. The description repeats the no-semicolon rule already in the schema definition. No additional meaning beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it executes a SQL SELECT query against the Oracle database and returns results. The verb 'execute' and resource 'SQL SELECT query' are specific, and it distinguishes itself from sibling tools like execute_ddl and describe_table.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a syntax rule ('use standard Oracle SQL syntax, do NOT include a trailing semicolon') but does not explicitly say when to use this tool versus alternatives like execute_ddl. The context is implied but lack of explicit when-to-use or when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_sampleA
Fetch a sample of rows from a table (default: 10 rows).
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | Full table name (e.g. SCOTT.EMP or just EMP) | |
| limit | No | Number of rows to fetch (default: 10, max: 100) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It mentions a default limit but does not specify sampling method (first N vs random), performance implications, or whether it returns a consistent subset.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, concise and front-loaded. However, it could include more details without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema or annotations, the description should explain return values, error handling, and sampling behavior. It lacks these, leaving gaps for a simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters. The description adds useful context: default and max for 'limit'. For 'table_name', it provides an example format.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (fetch), the resource (rows from a table), and provides a default limit. It distinguishes from siblings like 'describe_table' (metadata) and 'execute_query' (arbitrary queries).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies sampling but does not explicitly state when to use this tool versus alternatives like 'execute_query' or when not to use it. No guidance on prerequisites or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_proceduresA
List stored procedures and functions for a given schema.
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Schema/owner name. Defaults to connected user. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It states it lists procedures and functions but does not disclose return format, pagination behavior, or permission requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no redundant information, though it could be slightly more front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple nature of the tool (one optional parameter, no output schema), the description is adequate but does not explain what information is returned (e.g., names, parameters).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already documents the parameter. The description adds minor value by specifying 'and functions' to clarify scope.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it lists stored procedures and functions for a given schema, which distinguishes it from sibling tools like list_tables and list_schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, and does not mention situations where it would be inappropriate or what prerequisites exist.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_schemasA
List all schemas (users/owners) in the database that have at least one table.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It clearly indicates a read-only listing operation with a specific filter, implying no destructive side effects. It does not disclose potential performance or authentication requirements, but for a simple list, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys all necessary information without any redundancy. It is front-loaded and efficiently uses words to define the tool's scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple zero-parameter tool with no output schema, the description is complete. It specifies what is listed (schemas with at least one table), leaving no ambiguity about the tool's function.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters, so description does not need to add parameter details. The baseline for zero parameters is 4, and the description does not mislead or contradict the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list) and the resource (schemas that have at least one table), making it easy for an agent to understand what the tool does. It distinguishes itself from siblings like list_tables by focusing on schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear context by specifying the condition 'that have at least one table', which helps the agent decide when to use this tool (e.g., to find non-empty schemas). While it doesn't explicitly contrast with alternative tools, the purpose is unambiguous and sufficient for a zero-parameter tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesB
List all tables accessible to the current user, optionally filtered by schema/owner.
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Optional schema/owner name to filter tables (e.g. SCOTT). Defaults to tables owned by the connected user. | |
| search | No | Optional LIKE pattern to filter table names (e.g. EMP%) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the burden. It mentions 'accessible to the current user' indicating a security constraint, and optional filters. However, it does not describe output format, pagination, or performance attributes, which is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a single clear sentence front-loading the main action and key options. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema, so the description does not explain return values. For a simple listing tool, the description is adequate but incomplete regarding what data is returned (e.g., just table names or full schema). Sibling tools provide context but not explicitly mentioned.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the tool description adds minimal extra meaning beyond the parameter descriptions. The phrase 'optionally filtered by schema/owner' echoes the schema. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists tables accessible to the user with optional filters. It does not explicitly differentiate from sibling tools like list_procedures or list_schemas, but the name and context make its purpose clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., describe_table for single table details, execute_query for queries). The description implies a listing use case but lacks explicit contextual cues.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
test_connectionA
Test the Oracle connection and return server version info.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must cover behavior. It states it tests the connection and returns server version info, which is a nondestructive and simple operation. The description is sufficient for an agent to understand the outcome and side effects (none).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys the entire purpose and output. It is front-loaded and contains no unnecessary words. Every part is valuable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is fully adequate. It tells the agent what it does and what it returns, which is all that is needed for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema is empty with 0 parameters, so no parameter documentation is needed. The schema coverage is 100%, and the description does not need to add parameter details. A baseline of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool tests the Oracle connection and returns server version info. It uses a specific verb ('Test') and resource ('Oracle connection'). It distinguishes from siblings like 'list_tables' or 'execute_query' which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for verifying connectivity and getting version info, but it does not explicitly state when to use this tool versus alternatives. No exclusions or prerequisites are mentioned. The context is clear but lacks guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
8 tool updates
v1.0.0- First observed
describe_table - First observed
execute_ddl - First observed
execute_query - First observed
get_table_sample - First observed
list_procedures - First observed
list_schemas - First observed
list_tables - First observed
test_connection
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for accessing Oracle databases, enabling schema exploration, query execution, and performance analysis.MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for SQL Server database operations, enabling CRUD operations, schema exploration, and stored procedure execution through natural language.12MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to connect to Oracle databases and run SQL queries (up to 150 rows) via a single 'query' tool.20MIT
- 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.101132MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sagar1012/oracle-sqlplus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server