oracle-sqlplus-mcp
oracle-sqlplus-mcp
一个使用 sqlplus 作为连接后端的 Oracle 数据库 MCP (Model Context Protocol) 服务器。无需 Oracle Instant Client Node.js 绑定 —— 只需要一个可用的 sqlplus 二进制文件。
先决条件
sqlplus 必须已安装并可在
PATH中找到(随 Oracle Instant Client 或完整 Oracle 客户端提供)Node.js 18+
Related MCP server: oracle-db-mcp
安装
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/PRODClaude Desktop 配置
添加到你的 claude_desktop_config.json 中:
{
"mcpServers": {
"oracle": {
"command": "npx",
"args": ["-y", "oracle-sqlplus-mcp"],
"env": {
"ORACLE_CONNECTION": "username/password@host:port/servicename"
}
}
}
}可选环境变量
变量 | 默认值 | 描述 |
| (必需) | 完整连接字符串 |
|
| 如果不在 PATH 中,则指定 sqlplus 二进制文件的路径 |
|
| 查询超时时间(毫秒) |
自定义 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 版本 |
| 列出所有模式及其表计数 |
| 列出表,可选择按模式或名称模式过滤 |
| 显示列、数据类型、可空性、主键 |
| 从表中获取示例行 |
| 运行任何 SELECT 查询 |
| 运行 DDL/DML (INSERT, UPDATE, DELETE, CREATE 等) |
| 列出存储过程、函数、包 |
示例提示词
"Test the Oracle connection" (测试 Oracle 连接)
"List all schemas in the database" (列出数据库中的所有模式)
"Show me tables in the SCOTT schema" (显示 SCOTT 模式下的表)
"Describe the EMPLOYEES table" (描述 EMPLOYEES 表)
"Get 5 sample rows from HR.EMPLOYEES" (从 HR.EMPLOYEES 获取 5 行示例数据)
"Run this query: SELECT * FROM departments WHERE department_id < 50" (运行此查询:SELECT * FROM departments WHERE department_id < 50)
"List all stored procedures in the HR schema" (列出 HR 模式下的所有存储过程)
故障排除
sqlplus: command not found
将 SQLPLUS_PATH 设置为 sqlplus 二进制文件的完整路径。
ORA-12541: TNS:no listener
检查主机、端口以及 Oracle 监听器是否正在运行。
ORA-01017: invalid username/password
验证凭据。连接字符串格式:user/pass@host:port/service。
SP2-0306: Invalid option
确保 sqlplus 版本支持 -S 静默模式(所有现代版本均支持)。
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 Servers
- AlicenseNot gradedqualityDmaintenanceA production-grade Node.js MCP server for Oracle Database with HTTP transport, enabling SQL query execution, table listing, schema retrieval, and natural language to SQL conversion via MCP tools.141MIT
- 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.8MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to connect to Oracle databases and run SQL queries (up to 150 rows) via a single 'query' tool.11MIT
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server for managing Prisma Postgres.
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