mcp-oci
mcp-oci
为 Oracle Cloud Infrastructure(OCI) 构建的 Model Context Protocol 服务器。它让支持 MCP 的客户端(Claude Desktop、Claude Code、Cursor、Copilot…)能够发现实时的 OCI 资源、梳理它们之间的关联关系,并生成可复现的 Terraform,而行为完全由各种标志(flags)控制。
可以把它看作你的云上的 Playwright-MCP:模型无需手动重建基础设施知识,只需直接问*“显示 prod compartment 中的所有 VCN”或“为这个 compartment 生成 Terraform”*,就能获得结构化、不含机密的答案。
功能特点
实时发现 — 通过 OCI Resource Search 发现 compartments、regions 以及任何其他资源。
Terraform 生成 — 为已知类型(VCN、subnet、instance、bucket、compartment)生成准确、忠实的 HCL,为其余类型生成标注注释的骨架;还可以生成整个 compartment 的模块,并包含 provider 变量。
依赖关系图 — 节点/边(nodes/edges)以及建议的部署顺序(先依赖后)。
机密不触达模型 — 每个有效载荷(payload)在返回前都会经过脱敏处理。
安全开关 — 访问模式、compartment/region 白名单、预置门(provisioning gate)、dry-run 试运行以及 JSON 审计日志(见下文)。
标准认证 — 使用 OCI 配置文件(
~/.oci/config)或实例主体(instance principals)。服务器不存储任何凭据。
Related MCP server: oci-mcp-server
安全模型
关注点 | Flag | 默认值 | 效果 |
服务器能做什么? |
|
| 所有随附工具均为只读。 |
哪些 compartment 在范围内? |
| (全部) | 设置后,对其它 compartment 的操作将被拒绝。 |
哪些区域可被访问? |
| (已配置的区域) | 设置后,只能针对这些区域进行操作。 |
它能否执行 |
|
| 预置功能保留的门栏(尚未实现)。 |
不执行,仅作预览 |
|
| 供未来的写入工具使用:先验证并记录意图,但不实际执行。 |
审计追踪 |
|
| 每个受管控的操作都会向 stderr 输出一行 JSON 日志。 |
Secret 脱敏 | (始终开启) | — | 任何符合 secret 形态的字段都会在结果返回前被替换为 |
工具
发现(只读):list_compartments、list_regions、search_resources、list_compartment_resources、get_resource
Terraform(只读):generate_terraform、generate_compartment_terraform、build_dependency_graph
与 MCP 客户端一起使用
可与 Claude Code、Claude Desktop、Cursor、OpenAI Codex CLI、Windsurf、VS Code (Copilot) 以及任何其他 MCP 客户端配合使用——各客户端的配置方式参见 docs/CLIENTS.md。
安装
npm install
npm run build配置
将服务器指向一个标准 OCI 配置文件。出于安全考虑,请使用一个 IAM 用户/策略,只对你希望 agent 访问的 compartments 授予只读(inspect/read)权限。
使用 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"
}
}
}
}示例提示
“列出所有 compartments,然后显示
prodcompartment 中的所有资源。”“为 VCN
ocid1.vcn.oc1..…生成 Terraform。”“为 compartment
…构建一个依赖关系图,并告诉我部署顺序。”
开发
npm run dev # watch mode
npm test # security policy + terraform generation + graph + redaction
npm run typecheck路线图
在
read-write/admin与OCI_ALLOW_APPLY门控下执行terraform plan/apply。更多资源类型的映射器(load balancers、databases、DRGs、IAM policies)。
跨环境的配置漂移对比。
发布
该服务器随附一个 server.json 用于官方 MCP 注册表,并带一个 mcpName 用于 npm 所有权验证。参见 PUBLISHING.md 了解如何发布到 npm,并列示于 MCP 注册表、Smithery、Glama、Cursor 和 PulseMCP。
许可证
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