Skip to main content
Glama
sagar1012

oracle-sqlplus-mcp

by sagar1012

oracle-sqlplus-mcp

An MCP (Model Context Protocol) server for Oracle Database using sqlplus as the connection backend. No Oracle Instant Client Node.js bindings required — just a working sqlplus binary.


Prerequisites

  • sqlplus must be installed and available in PATH (comes with Oracle Instant Client or full Oracle client)

  • Node.js 18+


Related MCP server: sqlserver-mcp-colossal

Installation

npm install -g oracle-sqlplus-mcp
# or run directly with npx (no install needed):
npx oracle-sqlplus-mcp

Connection String Format

username/password@host:port/servicename

Examples:

scott/tiger@localhost:1521/ORCL
myuser/mypass@192.168.1.10:1521/XEPDB1
admin/secret@db.example.com:1521/PROD

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "oracle": {
      "command": "npx",
      "args": ["-y", "oracle-sqlplus-mcp"],
      "env": {
        "ORACLE_CONNECTION": "username/password@host:port/servicename"
      }
    }
  }
}

Optional Environment Variables

Variable

Default

Description

ORACLE_CONNECTION

(required)

Full connection string

SQLPLUS_PATH

sqlplus

Path to sqlplus binary if not in PATH

QUERY_TIMEOUT_MS

30000

Query timeout in milliseconds

Custom sqlplus path example

{
  "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"
      }
    }
  }
}

Available Tools

Tool

Description

test_connection

Test connectivity and return Oracle version

list_schemas

List all schemas with table counts

list_tables

List tables, optionally filtered by schema or name pattern

describe_table

Show columns, data types, nullable, primary keys

get_table_sample

Fetch sample rows from a table

execute_query

Run any SELECT query

execute_ddl

Run DDL/DML (INSERT, UPDATE, DELETE, CREATE, etc.)

list_procedures

List stored procedures, functions, packages


Example Prompts

  • "Test the Oracle connection"

  • "List all schemas in the database"

  • "Show me tables in the SCOTT schema"

  • "Describe the EMPLOYEES table"

  • "Get 5 sample rows from HR.EMPLOYEES"

  • "Run this query: SELECT * FROM departments WHERE department_id < 50"

  • "List all stored procedures in the HR schema"


Troubleshooting

sqlplus: command not found

Set SQLPLUS_PATH to the full path of your sqlplus binary.

ORA-12541: TNS:no listener

Check host, port, and that Oracle listener is running.

ORA-01017: invalid username/password

Verify credentials. Connection string format: user/pass@host:port/service.

SP2-0306: Invalid option

Ensure sqlplus version supports -S silent mode (all modern versions do).

Available Tools

8 tools
describe_tableA

Describe the columns, data types and constraints of a table.

ParametersJSON Schema
NameRequiredDescriptionDefault
table_nameYesTable name to describe (e.g. EMPLOYEES or SCOTT.EMPLOYEES)

TDQS

A3.6/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
statementYesSQL DDL/DML statement (without trailing semicolon)

TDQS

A3.5/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSQL SELECT query to execute (without trailing semicolon)

TDQS

A3.6/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
table_nameYesFull table name (e.g. SCOTT.EMP or just EMP)
limitNoNumber of rows to fetch (default: 10, max: 100)

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
schemaNoSchema/owner name. Defaults to connected user.

TDQS

A3.6/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
schemaNoOptional schema/owner name to filter tables (e.g. SCOTT). Defaults to tables owned by the connected user.
searchNoOptional LIKE pattern to filter table names (e.g. EMP%)

TDQS

B3.3/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

  1. 8 tool updatesv1.0.0
    • First observeddescribe_table
    • First observedexecute_ddl
    • First observedexecute_query
    • First observedget_table_sample
    • First observedlist_procedures
    • First observedlist_schemas
    • First observedlist_tables
    • First observedtest_connection

TDQS

A3.9/5.0
Disambiguation5/5

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.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (e.g., describe_table, list_tables), making them easy to parse and predict.

Tool Count5/5

Eight tools is an appropriate number for a database interaction server, covering essential operations without being overwhelming or too sparse.

Completeness4/5

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

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for accessing Oracle databases, enabling schema exploration, query execution, and performance analysis.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A comprehensive MCP server for SQL Server database operations, enabling CRUD operations, schema exploration, and stored procedure execution through natural language.
    12
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP 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.
    10
    113
    2
    MIT

Latest Blog Posts

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