Skip to main content
Glama
kevinwengh

oci-secrets-mcp

by kevinwengh

OCI Secrets MCP

An MCP server for OCI Vault's documented public Secrets control-plane and data-plane APIs.

Install

git clone https://github.com/kevinwengh/oci-secrets-mcp.git
cd oci-secrets-mcp
uv sync

Related MCP server: OCI MCP Server

OCI authentication

The server signs outbound requests with the OCI Python SDK. It never accepts private keys, bearer tokens, or authorization headers from MCP tools.

Mode

Required configuration

api_key (default)

~/.oci/config, optionally OCI_CONFIG_FILE and OCI_CONFIG_PROFILE

security_token

OCI config profile configured with a security token

instance_principal

OCI_REGION and an OCI compute instance principal

instance_principal_delegation_token

OCI_REGION and OCI_DELEGATION_TOKEN_FILE

resource_principal

OCI_REGION and a supported OCI resource-principal environment

resource_principal_delegation_token

OCI_REGION, a resource principal, and OCI_DELEGATION_TOKEN_FILE

oke_workload_identity

OCI_REGION and an OKE workload-identity environment

Select a non-default provider with OCI_SECRETS_MCP_AUTH_MODE.

For security-token and delegation-token modes, refresh the token file with the normal OCI tooling. If OCI returns 401 NotAuthenticated, the server rebuilds both SDK clients from the current credential source and retries the request once.

API-key example

An OCI user Auth Token intended for services such as Container Registry or SMTP cannot sign OCI SDK requests. Use an API signing key pair instead: upload the public key to the OCI user and keep the matching private key outside this repository.

Save the private key with user-only permissions outside the repository, for example:

/absolute/path/to/.oci/oci-secrets-mcp-api-key.pem

Do not paste the private key into this README or the MCP client configuration. Add a profile like this to your OCI configuration file, replacing every placeholder with your own value:

[OCI_SECRETS_MCP]
user=<USER_OCID>
fingerprint=<KEY_FINGERPRINT>
tenancy=<TENANCY_OCID>
region=<OCI_REGION>
key_file=/absolute/path/to/.oci/oci-secrets-mcp-api-key.pem

Configure your MCP client to select that profile. The configuration format is client-specific.

Claude Desktop

Claude Desktop uses JSON. Add the following server entry to its MCP configuration:

{
  "mcpServers": {
    "oci-secrets": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/oci-secrets-mcp",
        "run",
        "oci-secrets-mcp"
      ],
      "env": {
        "OCI_SECRETS_MCP_AUTH_MODE": "api_key",
        "OCI_CONFIG_FILE": "/absolute/path/to/.oci/config",
        "OCI_CONFIG_PROFILE": "OCI_SECRETS_MCP"
      }
    }
  }
}

Restart Claude Desktop after changing its configuration.

Codex

Codex uses TOML. Add the following to ~/.codex/config.toml, or to .codex/config.toml in a trusted project:

[mcp_servers.oci-secrets]
command = "uv"
args = [
  "--directory",
  "/absolute/path/to/oci-secrets-mcp",
  "run",
  "oci-secrets-mcp",
]

[mcp_servers.oci-secrets.env]
OCI_SECRETS_MCP_AUTH_MODE = "api_key"
OCI_CONFIG_FILE = "/absolute/path/to/.oci/config"
OCI_CONFIG_PROFILE = "OCI_SECRETS_MCP"

Restart Codex after changing its configuration, then verify that the server is registered:

codex mcp list

The environment variables above belong to the MCP client configuration. They are applied when Claude Desktop or Codex launches the server. If you run uv run oci-secrets-mcp directly in a shell, export the same variables first; otherwise the server uses its defaults, including the DEFAULT OCI profile.

The tenancy OCID can also be used as the root compartment ID. For example, call list_secrets with:

{
  "compartment_id": "<TENANCY_OR_COMPARTMENT_OCID>",
  "vault_id": "<VAULT_OCID>"
}

Run

Stdio is the default transport and is suitable for local MCP clients:

uv run oci-secrets-mcp

The optional streamable HTTP transport is restricted to loopback:

uv run oci-secrets-mcp --transport streamable-http --host 127.0.0.1 --port 8000
WARNING

The streamable HTTP transport does not authenticate callers or validate browser origins. Loopback binding reduces network exposure, but it does not protect against untrusted local processes or every DNS-rebinding scenario. Any caller that reaches the endpoint can use the server's configured OCI identity to retrieve secret content and can submit state-changing calls withconfirm=true. Prefer stdio unless you have separately isolated and secured the HTTP endpoint.

The server does not permit a non-loopback bind, including behind a gateway. See the separate Claude Desktop and Codex configuration examples above for stdio client setup.

Safety and IAM

All state-changing tools have MCP destructive annotations and require confirm=true; this includes creation, updates, rotation, compartment moves, and deletion/rotation scheduling or cancellation. Secret-bundle retrieval returns secret content, so grant the executing OCI principal only the Vault permissions it requires and treat MCP responses as sensitive.

The confirm=true check is a guard against accidental changes, not an authentication or authorization boundary. OCI IAM and MCP client access policy remain the security boundaries.

Create and update requests use typed MCP schemas with snake_case field names and are converted to OCI SDK models before transmission. Successful results contain:

  • data: the OCI SDK response model converted to JSON.

  • opc_request_id: OCI's request identifier.

  • headers: allowlisted pagination, ETag, work-request, location, and retry metadata when present.

  • status: the HTTP response status.

Verification

uv run ruff check .
uv run pytest

License

Licensed under the MIT License.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    C
    quality
    B
    maintenance
    An 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.
    Last updated
    55
    1
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    MCP server for interacting with Keyshade's secrets management platform, enabling secure retrieval and management of secrets via natural language.
    Last updated
    44
    8
    Mozilla Public 2.0
  • A
    license
    -
    quality
    D
    maintenance
    MCP server for Oracle Container Engine for Kubernetes (OKE) that enables inspection, querying, and troubleshooting of OKE clusters through safe, composable tools.
    Last updated
    Universal Permissive v1.0

View all related MCP servers

Related MCP Connectors

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

  • MCP server for Appcircle mobile CI/CD platform.

  • The official MCP Server from Mia-Platform to interact with Mia-Platform Console

View all MCP Connectors

Latest Blog Posts

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/kevinwengh/oci-secrets-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server