mcp-oci
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-oci list instances in compartment 'production'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server for Oracle Cloud Infrastructure (OCI)
Production-oriented MCP server for Oracle Cloud Infrastructure (OCI), exposing Compute, Networking and Object Storage operations to MCP clients (Claude Desktop, VS Code Copilot, Cursor, and compatible hosts).
Features
Four authentication modes: config file (API key), inline API key, instance principal, and session token
Per-call region override (
regionargument) on every Compute/Networking/Object Storage tool — query any OCI region without restarting the serverTrimmed-by-default responses: list/get tools return a lean summary per resource instead of the full OCI SDK object (which can run 100+ fields deep, e.g. SSH keys and agent plugin configs on an instance); pass
raw=trueto get the untrimmed objectRead-only enforcement independent of IAM policy: mutating tools can be blocked at the server level
Compute instance discovery, VNIC inspection, and lifecycle actions
Networking discovery: VCNs, subnets, security lists, NSGs, route tables
Object Storage discovery and management: buckets and objects
Environment-driven configuration for secure deployment
Related MCP server: OCI MCP Server
Available Tools
Tool | Mutating | Trimmed by default | Description |
| No | — | Lists the tenancy's subscribed regions — resolves a name (e.g. "Vinhedo") to its region ID (e.g. |
| No | — | Lists compartments by name and/or parent — resolves a name (e.g. "cpLinux") to its OCID |
| No | Yes | Lists Compute instances in a compartment |
| No | Yes | Returns details of a specific Compute instance |
| No | Yes | Lists VNIC attachments in a compartment/instance |
| Yes | — | Performs START/STOP/SOFTSTOP/RESET/SOFTRESET/SENDDIAGNOSTICINTERRUPT on an instance |
| No | Yes | Lists Virtual Cloud Networks in a compartment |
| No | Yes | Returns details of a specific VCN |
| No | Yes | Lists subnets in a compartment/VCN |
| No | Yes | Lists security lists in a compartment/VCN (rule counts only — use |
| No | Yes | Lists NSGs in a compartment/VCN |
| No | Yes | Lists route tables in a compartment/VCN (route count only — use |
| No | — | Returns the Object Storage namespace for the tenancy |
| No | Yes | Lists Object Storage buckets in a compartment |
| No | Yes | Returns details of a specific bucket |
| No | — | Lists objects in a bucket, optional prefix filter (the SDK object here is already lean) |
| Yes | — | Creates an Object Storage bucket |
| Yes | — | Deletes an object from a bucket |
Tools marked Mutating are rejected by the server when OCI_READ_ONLY=true (the default), regardless of IAM permissions — a second layer of least-privilege enforcement on top of your OCI policies.
Tools marked Trimmed by default accept a raw boolean argument (default false) — set raw=true to get the untrimmed OCI SDK object instead of the summary (id, name, state, and the handful of fields that matter day-to-day).
Requirements
Node.js 18+
An OCI tenancy with credentials for one of the supported authentication modes
Network connectivity from the MCP host to the OCI region endpoints
Configuration
Authentication mode
Variable | Required | Default | Description |
| No |
|
|
| No |
| When |
| No | region from config/session | Default region when a tool call doesn't pass |
When a tool call omits compartmentId, it defaults to the tenancy root compartment (resolved from the auth provider). This doesn't work in instance_principal mode — the provider doesn't expose the tenancy OCID there, so compartmentId must be passed explicitly (use list_compartments to look it up by name first).
Compute, Networking and Object Storage resources are region-scoped in OCI. Every tool that touches them accepts an optional region argument (e.g. sa-vinhedo-1) to query a specific region without restarting the server; omitting it falls back to OCI_REGION or the config/session file's default region. list_compartments and list_regions are unaffected — compartments and region subscriptions are tenancy-wide, not regional.
config mode (API key via ~/.oci/config)
Variable | Required | Default | Description |
| No |
| Path to the OCI config file |
| No |
| Profile name inside the config file |
session mode (oci session authenticate token)
Uses the same OCI_CONFIG_FILE / OCI_CONFIG_PROFILE variables as config mode, pointing to a profile with a security_token_file.
apikey mode (inline API key, no config file)
Variable | Required | Description |
| Yes | Tenancy OCID |
| Yes | User OCID |
| Yes | API key fingerprint |
| Yes | Region ID (e.g. |
| Yes* | PEM private key content ( |
| Yes* | Path to the PEM private key file (alternative to |
| No | Private key passphrase, if any |
* Provide either OCI_PRIVATE_KEY or OCI_PRIVATE_KEY_PATH.
instance_principal mode
No extra variables required — credentials are resolved from the instance metadata service. Only works when the MCP server itself runs on an OCI Compute instance (or OKE pod configured for it).
Transport
Variable | Required | Default | Description |
| No |
| Transport mode: |
| No |
| Port for the HTTP server (only used when |
| No |
| Bind address for the HTTP server (only used when |
Usage
Run directly from GitHub
npx github:ferronicardoso/mcp-ociClaude Code (CLI)
claude mcp add oci --scope user -- npx -y github:ferronicardoso/mcp-oci--scope controls where the server registration is stored:
Scope | Stored in | Visible to |
| project-local, untracked | only you, only in this project |
|
| anyone who clones the repo (commit it to share) |
| your global Claude Code config | you, across every project |
Environment variables (auth mode, OCI_READ_ONLY, etc.) can be passed with repeated --env KEY=VALUE flags before the --, e.g.:
Bash (Linux/macOS/WSL):
claude mcp add oci --scope user \
--env OCI_AUTH_MODE=config \
--env OCI_CONFIG_PROFILE=DEFAULT \
--env OCI_READ_ONLY=true \
-- npx -y github:ferronicardoso/mcp-ociPowerShell:
claude mcp add oci --scope user `
--env OCI_AUTH_MODE=config `
--env OCI_CONFIG_PROFILE=DEFAULT `
--env OCI_READ_ONLY=true `
-- npx -y github:ferronicardoso/mcp-ociCodex CLI
Bash (Linux/macOS/WSL):
codex mcp add oci \
--env OCI_AUTH_MODE=config \
--env OCI_CONFIG_PROFILE=DEFAULT \
--env OCI_READ_ONLY=true \
npx -- -y github:ferronicardoso/mcp-ociPowerShell:
codex mcp add oci `
--env OCI_AUTH_MODE=config `
--env OCI_CONFIG_PROFILE=DEFAULT `
--env OCI_READ_ONLY=true `
npx -- -y github:ferronicardoso/mcp-ociThis registers the server in ~/.codex/config.toml. To remove it, run codex mcp remove oci.
Claude Desktop configuration
%APPDATA%\\Claude\\claude_desktop_config.json:
{
"mcpServers": {
"oci": {
"command": "npx",
"args": ["github:ferronicardoso/mcp-oci"],
"env": {
"OCI_AUTH_MODE": "config",
"OCI_CONFIG_PROFILE": "DEFAULT",
"OCI_READ_ONLY": "true"
}
}
}
}VS Code MCP configuration
.vscode/mcp.json:
{
"servers": {
"oci": {
"command": "npx",
"args": ["github:ferronicardoso/mcp-oci"],
"env": {
"OCI_AUTH_MODE": "config",
"OCI_CONFIG_PROFILE": "DEFAULT",
"OCI_READ_ONLY": "true"
}
}
}
}Run with Docker (HTTP transport)
The published image runs in Streamable HTTP mode by default, for use as a remote MCP endpoint (e.g. from n8n's MCP Client Tool node or any Streamable HTTP-compatible client):
Bash (Linux/macOS/WSL):
docker run -d --name mcp-oci \
-p 3003:3003 \
-e OCI_AUTH_MODE=apikey \
-e OCI_TENANCY_ID=ocid1.tenancy.oc1..xxxx \
-e OCI_USER_ID=ocid1.user.oc1..xxxx \
-e OCI_FINGERPRINT=xx:xx:xx:xx \
-e OCI_REGION=sa-saopaulo-1 \
-e OCI_PRIVATE_KEY_PATH=/keys/oci_api_key.pem \
-e OCI_COMPARTMENT_ID=ocid1.compartment.oc1..xxxx \
-e OCI_READ_ONLY=true \
-v /path/to/oci_api_key.pem:/keys/oci_api_key.pem:ro \
ghcr.io/ferronicardoso/mcp-oci:latestPowerShell:
docker run -d --name mcp-oci `
-p 3003:3003 `
-e OCI_AUTH_MODE=apikey `
-e OCI_TENANCY_ID=ocid1.tenancy.oc1..xxxx `
-e OCI_USER_ID=ocid1.user.oc1..xxxx `
-e OCI_FINGERPRINT=xx:xx:xx:xx `
-e OCI_REGION=sa-saopaulo-1 `
-e OCI_PRIVATE_KEY_PATH=/keys/oci_api_key.pem `
-e OCI_COMPARTMENT_ID=ocid1.compartment.oc1..xxxx `
-e OCI_READ_ONLY=true `
-v C:\path\to\oci_api_key.pem:/keys/oci_api_key.pem:ro `
ghcr.io/ferronicardoso/mcp-oci:latestThe MCP endpoint is then available at http://localhost:3003/mcp.
Local Development
git clone https://github.com/ferronicardoso/mcp-oci
cd mcp-oci
npm install
npm run buildStart the compiled server:
npm startBuild and Commit Workflow
This repository intentionally tracks dist/ to support npx github:user/repo usage.
The project uses a Husky pre-commit hook to:
build TypeScript (
npm run build)stage generated artifacts (
git add dist)
Manual fallback:
npm run build
git add distSecurity Notes
Never commit real credentials, private keys, or
.envfiles.OCI_READ_ONLY=trueis the default; only set it tofalsefor environments that must run mutating operations, and prefer pairing it with a least-privilege IAM policy on the OCI side.Prefer
instance_principalauthentication when the server runs on OCI Compute/OKE — it avoids storing long-lived credentials entirely.For
apikeymode, prefer mounting the private key file (OCI_PRIVATE_KEY_PATH) over passing raw key content viaOCI_PRIVATE_KEY.
License
MIT © Raphael Augusto Ferroni Cardoso
Available Tools
18 toolscreate_bucketA
Creates an Object Storage bucket. Blocked when OCI_READ_ONLY=true.
Inputs: name (required), region, namespace, compartmentId, +1 more.
delete_objectA
Deletes an object from a bucket. Blocked when OCI_READ_ONLY=true.
Inputs: bucketName (required), objectName (required), region, namespace.
get_bucketA
Returns details of a specific Object Storage bucket. Returns a trimmed summary unless raw=true.
Inputs: bucketName (required), raw, region, namespace.
get_instanceA
Returns details of a specific Compute instance. Returns a trimmed summary unless raw=true.
Inputs: instanceId (required), raw, region.
get_namespaceA
Returns the Object Storage namespace for the tenancy.
Inputs: region.
get_vcnA
Returns details of a specific VCN. Returns a trimmed summary unless raw=true.
Inputs: vcnId (required), raw, region.
instance_actionA
Performs a lifecycle action on a Compute instance (START, STOP, SOFTSTOP, RESET, SOFTRESET, SENDDIAGNOSTICINTERRUPT). Blocked when OCI_READ_ONLY=true.
Inputs: action (required), instanceId (required), region.
list_bucketsA
Lists Object Storage buckets in a compartment. Returns a trimmed summary per bucket unless raw=true.
Inputs: raw, region, namespace, compartmentId.
list_compartmentsA
Lists compartments by name and/or parent compartment. Use this to resolve a compartment name (e.g. "cpLinux") to its OCID before calling other tools. Defaults to searching the entire tenancy tree from the root compartment.
Inputs: name, compartmentId, includeSubtree.
list_instancesA
Lists Compute instances in a compartment. Returns a trimmed summary per instance unless raw=true.
Inputs: raw, region, compartmentId, availabilityDomain.
list_network_security_groupsA
Lists network security groups (NSGs) in a compartment, optionally filtered by VCN. Returns a trimmed summary per NSG unless raw=true.
Inputs: raw, vcnId, region, compartmentId.
list_objectsA
Lists objects in a bucket, optionally filtered by prefix.
Inputs: bucketName (required), limit, prefix, region, +1 more.
list_regionsA
Lists the OCI regions this tenancy is subscribed to (region ID, region key, home region flag). Use this to resolve a region name (e.g. "Vinhedo", "São Paulo") to its region ID (e.g. "sa-vinhedo-1") before passing it as the region argument to other tools.
Inputs: tenancyId.
list_route_tablesA
Lists route tables in a compartment, optionally filtered by VCN. Returns a trimmed summary (with route rule count) per table unless raw=true — pass raw=true to inspect the actual routes.
Inputs: raw, vcnId, region, compartmentId.
list_security_listsA
Lists security lists in a compartment, optionally filtered by VCN. Returns a trimmed summary (with ingress/egress rule counts) per list unless raw=true — pass raw=true to inspect the actual rules.
Inputs: raw, vcnId, region, compartmentId.
list_subnetsA
Lists subnets in a compartment, optionally filtered by VCN. Returns a trimmed summary per subnet unless raw=true.
Inputs: raw, vcnId, region, compartmentId.
list_vcnsA
Lists Virtual Cloud Networks (VCNs) in a compartment. Returns a trimmed summary per VCN unless raw=true.
Inputs: raw, region, compartmentId.
list_vnic_attachmentsA
Lists VNIC attachments in a compartment, optionally filtered by instance. Returns a trimmed summary unless raw=true.
Inputs: raw, region, instanceId, compartmentId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool targets a distinct resource and action (e.g., list_regions vs list_compartments, get_instance vs instance_action). No two tools appear to do the same thing, and descriptions clearly differentiate their purpose.
The vast majority of tools follow the verb_noun pattern (list_*, get_*, create_*, delete_*). The only deviation is instance_action, which is noun_verb, creating a minor inconsistency.
18 tools is at the high end but acceptable for a server spanning compute, networking, and object storage. Each tool has a distinct role, so the count feels purposeful rather than bloated.
The tool set is heavily read-focused. Compute instances lack create/update/delete, VCNs lack create/delete, and subnets are limited to list operations. Object storage has only partial write coverage (create_bucket, delete_object), leaving significant lifecycle gaps for a management server.
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol (MCP) server exposing Oracle Cloud Infrastructure tools, resources and prompts.MIT
- AlicenseCqualityDmaintenanceAn MCP server that exposes Oracle Cloud Infrastructure (OCI) control plane to LLM clients, enabling management of compute, networking, storage, databases, and more through natural language.551Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for Oracle Container Engine for Kubernetes (OKE) that enables inspection, querying, and troubleshooting of OKE clusters through safe, composable tools.Universal Permissive v1.0
- AlicenseAqualityDmaintenanceMCP server for Oracle Cloud Infrastructure (OCI) that provides tools to manage Compute, Object Storage, Block Storage, Networking, Autonomous Database, and IAM via the official OCI SDK.2361 npmMIT