
git-scarrow/oracle-mcp-server
Database managementこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
[MOVED → codeberg.org/scarrow/oracle-mcp-server] MCP server for Oracle database access
概要
A Model Context Protocol (MCP) server for Oracle with two layers: - generic Oracle query/introspection tools - a backend-owned Lab control-plane mirror that reproduces the Notion Lab dispatch/return loop on Oracle tables - Execute SQL queries with parameter binding - List tables across multiple schemas or filter by specific schema - Describe table structures with multi-schema support - View indexes and constraints across schemas - Check Lab control-plane gates and build dispatch packets from backend state - Stamp dispatch consumption, ingest execution returns, and create writers-room scene items - Bootstrap the same Lab mirror on Oracle or PostgreSQL using the included DDL - Multiple Oracle authentication methods - Automatic parameter conversion (PostgreSQL style to Oracle) - SQL injection prevention via bind variables - Audit logging for security monitoring Create a .env file with your Oracle connection details.
README
以下は原文 README の抜粋です。原文を見る。
Oracle MCP Server
A Model Context Protocol (MCP) server for Oracle with two layers:
- generic Oracle query/introspection tools
- a backend-owned Lab control-plane mirror that reproduces the Notion Lab dispatch/return loop on Oracle tables
Features
- Execute SQL queries with parameter binding
- List tables across multiple schemas or filter by specific schema
- Describe table structures with multi-schema support
- View indexes and constraints across schemas
- Check Lab control-plane gates and build dispatch packets from backend state
- Stamp dispatch consumption, ingest execution returns, and create writers-room scene items
- Bootstrap the same Lab mirror on Oracle or PostgreSQL using the included DDL
- Multiple Oracle authentication methods
- Automatic parameter conversion (PostgreSQL style to Oracle)
- SQL injection prevention via bind variables
- Audit logging for security monitoring
Installation
npm install
Configuration
Environment Variables
Create a .env file with your Oracle connection details. Choose one of these methods:
Method 1: Easy Connect String
ORACLE_CONNECTION_STRING=hostname:1521/service_name
ORACLE_USER=your_username
ORACLE_PASSWORD=your_password
Method 2: TNS Name
ORACLE_TNS_NAME=ORCL
ORACLE_USER=your_username
ORACLE_PASSWORD=your_password
Method 3: Individual Components
ORACLE_HOST=localhost
ORACLE_PORT=1521
ORACLE_SERVICE_NAME=ORCL # or ORACLE_SID=ORCL
ORACLE_USER=your_username
ORACLE_PASSWORD=your_password
Optional settings:
ORACLE_DEFAULT_SCHEMA=HR # Default schema if different from user
Usage with Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"oracle": {
"command": "node",
"args": ["/path/to/oracle-mcp/src/index.js"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
}
Alternatively, use npx if you publish the package:
{
"mcpServers": {
"oracle": {
"command": "npx",
"args": ["-y", "oracle-mcp-server"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
}
Usage with Claude Code
For Claude Code, add to ~/.claude.json:
{
"mcpServers": {
"oracle": {
"type": "stdio",
"command": "node",
"args": ["/path/to/oracle-mcp/src/index.js"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
}
After updating the configuration, restart Claude Desktop or Claude Code.
インストール
npx -y oracle-mcp-server設定
{
"mcpServers": {
"oracle": {
"command": "node",
"args": ["/path/to/oracle-mcp/src/index.js"],
"env": {
"ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
"ORACLE_USER": "your_username",
"ORACLE_PASSWORD": "your_password"
}
}
}
}