| name | oci-setup |
| description | Validate OCI credentials, SDK installation, and IAM access for working with Oracle databases on OCI. Lists compartments and managed databases to confirm connectivity. Use this skill whenever a user is getting started with OCI, asks how to connect Claude to their Oracle database, has credential problems, wants to verify their OCI config, or says anything like "I want to use Claude to manage my Oracle database — how do I get started?". This is the entry point for all OCI database management workflows — always run this first.
|
OCI Setup — Credential Validation & Environment Check
What it does
Checks that everything needed to use Claude with OCI Database Management is in place:
- OCI SDK installed and recent enough
~/.oci/config present and valid
- IAM connectivity confirmed (tenancy accessible)
- Compartments visible
- Existing managed databases listed
This skill runs before anything else. The MCP server, DBM skills, and commission workflow all
depend on valid OCI credentials — catching problems here prevents cryptic 401 errors later.
Step 1 — Check OCI SDK
import oci
print(oci.__version__)
Minimum required version: 2.100.0 (2.173.0 recommended — needed for full ADB DBM feature API).
If not installed:
pip install oci
If version is too old:
pip install --upgrade oci
Step 2 — Check OCI config
config = oci.config.from_file()
oci.config.validate_config(config)
If this raises, the config file is missing or malformed.
Expected config fields:
[DEFAULT]
user=ocid1.user.oc1..aaa...
fingerprint=xx:xx:xx:...
tenancy=ocid1.tenancy.oc1..aaa...
region=us-phoenix-1
key_file=~/.oci/oci_api_key.pem
Common issues:
key_file path wrong or file missing → FileNotFoundError
- Wrong region → API calls succeed but return empty results
- Wrong fingerprint or user OCID →
AuthenticationError (401)
Step 3 — Verify IAM connectivity
identity_client = oci.identity.IdentityClient(config)
tenancy = identity_client.get_tenancy(config['tenancy']).data
print(f"Tenancy: {tenancy.name} ({tenancy.id})")
If this succeeds, credentials are valid and the SDK can reach OCI.
Step 4 — List compartments
compartments = identity_client.list_compartments(
config['tenancy'],
compartment_id_in_subtree=True,
access_level='ACCESSIBLE'
).data
for c in compartments:
if c.lifecycle_state == 'ACTIVE':
print(f" {c.name}: {c.id}")
Present this as a numbered list so the user can identify which compartment holds their databases.
Step 5 — List managed databases (if MCP server is running)
If the MCP server is already running, call:
list_managed_databases(compartment_id=<chosen_compartment_id>)
This shows which databases are already enrolled in OCI Database Management.
If the MCP server is not running yet, note that the next step is oci-dbm-server to start it.
Presenting the results
Give the user a clean summary:
OCI Setup — Validated
SDK: oci 2.173.0
Config: ~/.oci/config [DEFAULT]
Tenancy: emdemo (ocid1.tenancy.oc1..aaa...)
Region: us-phoenix-1
Compartments (3 accessible):
1. root ocid1.tenancy.oc1..aaa...
2. dbmgmt ocid1.compartment.oc1..aaa...
3. production ocid1.compartment.oc1..aaa...
Managed Databases: [if MCP server is running, list them here]
Next step: start the MCP server with "oci-dbm-server"
What comes next
After setup passes:
- Start the MCP server →
oci-dbm-server
- Onboard a new ADB →
oci-dbm-commission
- Diagnose an existing database →
oci-dbm-diagnose
- Check fleet health →
oci-dbm-performance
The user does not need to remember this chain — offer the appropriate next step based on
what they said they want to do.
Fallback: running without the MCP server
If the MCP server is not yet running, these checks can all be done with the Python SDK directly.
No MCP tools are required for the setup validation itself.