mcp-oci
Generates Terraform configuration (HCL) for Oracle Cloud Infrastructure resources, including whole-compartment modules and dependency graphs with provisioning order.
Click on "Install 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-ociList all compartments and generate Terraform for the prod compartment."
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-oci
A Model Context Protocol server for Oracle Cloud Infrastructure (OCI). It gives an MCP-capable client (Claude Desktop, Claude Code, Cursor, Copilot, …) the ability to discover live OCI resources, map how they relate, and generate reproducible Terraform — with behaviour controlled entirely by flags.
Think of it as a Playwright-MCP for your cloud: instead of rebuilding infrastructure knowledge by hand, the model can ask "show all VCNs in the prod compartment" and "generate Terraform for this compartment" and get structured, secret-free answers.
Features
Live discovery — compartments, regions, and any resource via OCI Resource Search.
Terraform generation — faithful HCL for known types (VCN, subnet, instance, bucket, compartment) and annotated skeletons for the rest; whole-compartment modules with provider variables.
Dependency graph — nodes/edges plus a suggested provisioning order (dependencies first).
Secrets never reach the model — every payload is redacted before return.
Security flags — access modes, compartment/region allowlists, provisioning gate, dry-run, and JSON audit logging (see below).
Standard auth — OCI config file (
~/.oci/config) or instance principals. No credentials stored by the server.
Related MCP server: oci-mcp-server
Security model
Concern | Flag | Default | Effect |
What can the server do? |
|
| All shipped tools are read-only. |
Which compartments are in scope? |
| (all) | When set, operations on other compartments are refused. |
Which regions are reachable? |
| (configured region) | When set, only these regions may be targeted. |
Can it run |
|
| Reserved gate for provisioning (not yet shipped). |
Preview without executing |
|
| For future write tools: validate + log intent without executing. |
Audit trail |
|
| Emits a JSON line to stderr per guarded operation. |
Secret redaction | (always on) | — | Secret-shaped fields are replaced with |
Tools
Discovery (read): list_compartments, list_regions, search_resources, list_compartment_resources, get_resource
Terraform (read): generate_terraform, generate_compartment_terraform, build_dependency_graph
Use with your MCP client
Works with Claude Code, Claude Desktop, Cursor, OpenAI Codex CLI, Windsurf, VS Code (Copilot), and any other MCP client — see docs/CLIENTS.md for per-client setup.
Install
npm install
npm run buildConfigure
Point it at a standard OCI config profile. For safety, use an IAM user/policy with
read-only (inspect/read) permissions on the compartments you want the agent to see.
Run with Claude Desktop / Claude Code / Cursor
{
"mcpServers": {
"oci": {
"command": "node",
"args": ["/absolute/path/to/mcp-oci/dist/index.js"],
"env": {
"OCI_PROFILE": "DEFAULT",
"OCI_MODE": "read-only",
"OCI_COMPARTMENT_ALLOWLIST": "ocid1.compartment.oc1..xxxx",
"OCI_REGION_ALLOWLIST": "us-ashburn-1"
}
}
}
}Example prompts
"List all compartments, then show every resource in the
prodcompartment.""Generate Terraform for VCN
ocid1.vcn.oc1..….""Build a dependency graph for compartment
…and tell me the provisioning order."
Develop
npm run dev # watch mode
npm test # security policy + terraform generation + graph + redaction
npm run typecheckRoadmap
terraform plan/applyexecution behindread-write/admin+OCI_ALLOW_APPLY.More resource-type mappers (load balancers, databases, DRGs, IAM policies).
Cross-environment drift comparison.
Publishing
This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.
License
MIT
This server cannot be installed
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
- FlicenseNot gradedqualityDmaintenanceAutomatically discovers and tests MCP services for security vulnerabilities including command injection, SQL injection, SSRF, path traversal, and sensitive data exposure with detailed reports and remediation guidance.1
- AlicenseNot gradedqualityDmaintenanceEnables natural-language access to Oracle Cloud Infrastructure resources, allowing users to query compute instances, OKE clusters, networking, and Object Storage via MCP tools.MIT
- FlicenseNot gradedqualityBmaintenanceEnables interaction with Oracle Cloud Infrastructure through the MCP protocol. Supports dynamic profile selection and provides 85 tools for managing compute, databases, networking, IAM, storage, load balancers, OKE, monitoring, and cost management.
- 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.2347MIT
Related MCP Connectors
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
IaC attack-path auditor: finds internet-to-crown-jewel chains in Terraform/CFN/K8s.
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/dockndevai/mcp-oci'
If you have feedback or need assistance with the MCP directory API, please join our Discord server