Oracle Cloud Infrastructure (OCI) MCP Server
A Model Context Protocol server for managing Oracle Cloud Infrastructure services, enabling LLMs to interact with compute instances, storage, identity, and databases through natural language.
README
Oracle Cloud Infrastructure (OCI) MCP Server
A comprehensive, robust, and highly extensible Model Context Protocol (MCP) server for managing Oracle Cloud Infrastructure (OCI) services. This server enables LLMs and MCP-compatible clients to securely interact with your Oracle Cloud account to manage compute instances, storage, identity, and databases.
🌟 Features
- Standardized Authentication: Automatically integrates with your existing OCI CLI configuration (
~/.oci/config). - Identity & Access Management (IAM): Manage compartments and list users across your tenancy.
- Compute & Networking: View Virtual Cloud Networks (VCNs), list instances, fetch details, and execute lifecycle operations (START, STOP, RESET, SOFTRESET).
- Object Storage: Explore your tenancy's namespaces, list storage buckets, and view bucket objects.
- Database: Monitor and list your Autonomous Databases.
- Docker Ready: Fully containerized and optimized for secure isolation.
- Extensible Architecture: Designed with modularity in mind, allowing you to easily plug in any of the hundreds of other OCI services using the official
@oracle/oci-sdk.
📋 Prerequisites
Before running this MCP server, ensure you have the following set up:
- Oracle Cloud Account: An active OCI account.
- OCI CLI Configuration: You must have the Oracle Cloud CLI installed and configured on your machine.
- The default location is
~/.oci/config(Linux/Mac) orC:\Users\<YourUser>\.oci\config(Windows). - Tip: You can set this up using the
oci setup configcommand if you have the OCI CLI installed.
- The default location is
- Node.js: Node.js 18 or higher (if running locally without Docker).
- Docker: (Optional) If you prefer running the server in an isolated container.
🚀 Installation & Setup
Option A: Running Locally (Node.js)
-
Clone/Navigate to the repository:
cd f:\MCP_Server\Oracle_cloud_MCP_server -
Install dependencies:
npm install -
Build the TypeScript code:
npm run build -
Run the server (for testing):
npm startNote: MCP servers communicate over
stdio, so running it directly in your terminal will make it wait for JSON-RPC inputs.
Option B: Running with Docker
Running with Docker requires mounting your local ~/.oci directory into the container so the server can authenticate using your credentials.
-
Build the Docker Image:
docker build -t oracle-cloud-mcp . -
Run the Docker Container: Replace
~/.ociwith the path to your OCI configuration folder.docker run -i -v ~/.oci:/root/.oci oracle-cloud-mcp
🔌 Connecting to an MCP Client
To use this server, you must configure your MCP client (such as Claude Desktop, Cline, etc.) to spawn this process.
Example: Claude Desktop Configuration
Edit your claude_desktop_config.json:
For Local Node.js Execution:
{
"mcpServers": {
"oracle-cloud": {
"command": "node",
"args": [
"f:/MCP_Server/Oracle_cloud_MCP_server/dist/index.js"
]
}
}
}
For Docker Execution:
{
"mcpServers": {
"oracle-cloud": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"~/.oci:/root/.oci",
"oracle-cloud-mcp"
]
}
}
}
Note: The -i flag is required for interactive standard input (stdio) communication.
🛠️ Available MCP Tools
Once connected, the LLM will have access to the following tools:
Identity Services
oci_list_compartments: List all compartments in the tenancy. If nocompartmentIdis provided, it defaults to the root tenancy.oci_list_users: List all users within the specified compartment or the root tenancy.
Compute & Networking Services
oci_list_instances: List all compute instances inside a specificcompartmentId.oci_get_instance: Get detailed metadata about a specific compute instance using itsinstanceId.oci_instance_action: Execute lifecycle actions on an instance (e.g.,START,STOP,SOFTRESET,RESET,SOFTSTOP).oci_list_vcns: List all Virtual Cloud Networks (VCNs) in a givencompartmentId.
Object Storage Services
oci_get_namespace: Fetch the Object Storage namespace associated with your tenancy.oci_list_buckets: List all storage buckets within a specified namespace and compartment.oci_list_objects: List all objects (files) inside a specific bucket.
Database Services
oci_list_autonomous_databases: List all Autonomous Databases (ADW/ATP) within a specified compartment.
📁 Project Structure
Oracle_cloud_MCP_server/
├── src/
│ ├── index.ts # Main MCP server entry point and tool definitions
│ ├── auth/
│ │ └── auth.ts # OCI Authentication module
│ └── tool/ # Modular tool implementations
│ ├── compute/index.ts # Compute and VCN APIs
│ ├── database/index.ts # Autonomous Database APIs
│ ├── identity/index.ts # Compartment and User APIs
│ └── objectstorage/index.ts # Bucket and Object APIs
├── dist/ # Compiled JavaScript output (generated)
├── Dockerfile # Docker container definition
├── .dockerignore # Excluded files for Docker build
├── .gitignore # Excluded files for Git tracking
├── package.json # Node.js dependencies and scripts
└── tsconfig.json # TypeScript compiler configuration
🧩 Extending the Server
Because Oracle Cloud has hundreds of services, this server is designed to be easily extensible. To add a new service (e.g., oci-dns):
- Install the SDK package:
npm install oci-dns - Create a new tool module: Create
src/tool/dns/index.ts. - Initialize the client: Import
getAuthProviderfrom../../auth/auth.jsand instantiate the DNS client. - Export your function: Write your async function calling the OCI API.
- Register the tool: In
src/index.ts, import your new module, add a tool definition in theListToolsRequestSchemahandler, and map the tool execution in theCallToolRequestSchemaswitch statement.
⚠️ Troubleshooting
- Authentication Errors: If you see
Failed to initialize OCI Config File Provider, ensure that the OCI CLI is installed and configured. If running via Docker, verify that you correctly mounted the~/.ocifolder using-v. - Permission Errors: If you get a 404 or 401 error from the Oracle Cloud API, ensure the user profile configured in your
~/.oci/configfile has the correct IAM policies to read compartments, instances, etc. - No Compartment ID: Many OCI operations require a
compartmentId. The root compartment OCID is usually the same as your Tenancy OCID, which is defined in your~/.oci/configfile.
Built with Model Context Protocol and the Oracle Cloud Infrastructure Node.js SDK.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。