Oracle Cloud discovery + Terraform generation for AI agents — read-only, secret-safe.
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.
~/.oci/config) or instance principals. No credentials stored by the server.| Concern | Flag | Default | Effect |
|---|---|---|---|
| What can the server do? | OCI_MODE | read-only | All shipped tools are read-only. read-write/admin are reserved for future provisioning and currently expose no extra tools. |
| Which compartments are in scope? | OCI_COMPARTMENT_ALLOWLIST | (all) | When set, operations on other compartments are refused. |
| Which regions are reachable? | OCI_REGION_ALLOWLIST | (configured region) | When set, only these regions may be targeted. |
Can it run terraform apply? | OCI_ALLOW_APPLY | false | Reserved gate for provisioning (not yet shipped). |
| Preview without executing | OCI_DRY_RUN | false | For future write tools: validate + log intent without executing. |
| Audit trail | OCI_AUDIT_LOG | true | Emits a JSON line to stderr per guarded operation. |
| Secret redaction | (always on) | — | Secret-shaped fields are replaced with ***REDACTED*** before any result is returned. |
Discovery (read): list_compartments, list_regions, search_resources, list_compartment_resources, get_resource
Terraform (read): generate_terraform, generate_compartment_terraform, build_dependency_graph
Published on npm as @dockndevai/mcp-oci. No clone or build needed — your MCP client runs it on demand with npx. Start in read-only mode; see .env.example for every variable and docs/CLIENTS.md for the full per-client guide.
Claude Code (CLI)
claude mcp add oci -e OCI_PROFILE="DEFAULT" -e OCI_MODE="read-only" -- npx -y @dockndevai/mcp-oci
Claude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"oci": {
"command": "npx",
"args": [
"-y",
"@dockndevai/mcp-oci"
],
"env": {
"OCI_PROFILE": "DEFAULT",
"OCI_MODE": "read-only"
}
}
}
}
OpenAI Codex CLI — in ~/.codex/config.toml:
[mcp_servers.oci]
command = "npx"
args = ["-y", "@dockndevai/mcp-oci"]
env = { OCI_PROFILE = "DEFAULT", OCI_MODE = "read-only" }
VS Code (GitHub Copilot, Agent mode) — in .vscode/mcp.json:
{
"servers": {
"oci": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@dockndevai/mcp-oci"
],
"env": {
"OCI_PROFILE": "DEFAULT",
"OCI_MODE": "read-only"
}
}
}
}
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.
prod compartment."ocid1.vcn.oc1..…."… and tell me the provisioning order."Prefer the published package above. To run from a clone:
npm install
npm run build
node dist/index.js # with the environment variables set
npm run dev # watch mode
npm test # security policy + terraform generation + graph + redaction
npm run typecheck
terraform plan / apply execution behind read-write/admin + OCI_ALLOW_APPLY.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.
MIT
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @dockndevai/mcp-ociMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-dockndevai-mcp-oci": {
"command": "npx",
"args": [
"-y",
"@dockndevai/mcp-oci"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.dockndevai/mcp-oci works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.