RCV V3 - workflow based tools - #425
Conversation
rcv-mcp-v3.0.0 - workflow prompts
… 0.1.3 The rcv_v3 merge kept the recovery server's uv.lock from the feature branch, so it still pinned the oracle-mcp-common workspace member at 0.1.2 while src/common had been bumped to 0.1.3 by oracle#421. This made the `Sync` step (`uv sync --locked --all-extras --dev`) fail in build (oci-recovery-mcp-server), which cancelled the rest of the build matrix.
uv.lock fix
dustin-sale
left a comment
There was a problem hiding this comment.
Review by @dustin-sale via Codex.
Requested changes
No blocking changes requested.
Additional review notes
src/oci-recovery-mcp-server/README.md:100— [P2] Correct the version-pinneduvxexample.
Validation
make lintandmake test project=oci-recovery-mcp-serverpassed.- The packaged wheel includes the new prompt files.
See the inline comments in this review for evidence, impact, and suggested remediation.
Readme version changed.
| @@ -0,0 +1,2221 @@ | |||
| """ | |||
| Copyright (c) 2025, 2026 Oracle and/or its affiliates. | |||
There was a problem hiding this comment.
2000 lines of code in this module; are they all necessary? can we break this file up into specific categories of tests? is it named coverage because the stated purpose from the prompt was to increase test coverage?
| return request_id | ||
| installation_id = _mcp_installation_id() | ||
| actor_id = _MCP_ACTOR_ID_CONTEXT.get()[:_MCP_ACTOR_ID_LENGTH].ljust(_MCP_ACTOR_ID_LENGTH, "0") | ||
| tool_code = _MCP_TOOL_CODES.get(_MCP_TOOL_ID_CONTEXT.get(), "unk") |
There was a problem hiding this comment.
This is a small segment of code we have added to keep telemetry of API calls being made to our service via the mcp server.
By adding a prefix to opc-request-id.
|
|
||
| Required: | ||
| - ORACLE_MCP_AUTH_METHOD: "session" or "apikey" | ||
| def _legacy_auth_type_override() -> Optional[AuthType]: |
There was a problem hiding this comment.
why is this called "legacy auth"?
There was a problem hiding this comment.
We are now using oci-commons auth and in the prior version we had implemented it in this service-space. To keep backward compatibility we this has been modified but its actually deprecated.
We will phase it in future commits.
| for n in names: | ||
| v = os.getenv(n) | ||
| if v is not None and v.strip() != "": | ||
| return v.strip() |
There was a problem hiding this comment.
we're calling v.strip() twice.
| if m in ("apikey", "api_key", "api-key"): | ||
| return "apikey" | ||
| return "session" | ||
| raw = (os.getenv("ORACLE_MCP_AUTH_METHOD") or "").strip().lower() |
There was a problem hiding this comment.
Will:
OCI_MCP_AUTH_TYPE=security_token
ORACLE_MCP_AUTH_METHOD=apikeyresult in rejected requests after successful authentication?
|
|
||
| qualified = _qualify(audience, scopes) | ||
| provider.update_default_scopes(qualified) | ||
| provider.required_scopes = qualified |
There was a problem hiding this comment.
this changes the scopes enforced by RequireAuthMiddleware (FastMCP). IDCS returns a bare resource scope (not qualified), and the token verifier keeps that scope (from build_idcs_http_auth()).
This is another case where an authenticated session can result in request failures (insufficient_scope). There's two forms that have to be accounted for, and this falls through the gap between them: IDCS expects audience qualified in the requests but emits the bare form in the token scope claim (https://docs.oracle.com/en/cloud/saas/marketing/audience-develop/docs/authentication/authenticating-oauth.htm)
Can you confirm?
|
gsharini#11 |
Review comments on tools, code modularisation, auth is addressed.
This change delivers Recovery MCP Server v3.0.0, expanded Recovery Service and Database Service read coverage, and guided operational workflows for Cloud Protect onboarding.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Added targeted unit tests covering:
Guidance-tool availability and input validation.
Onboard testing :
Prompt
codex> "Using recovery service mcp server onboard database DB0729 with ip 100.102.44.215 to recovery service."
Final Result:
DB0729 is onboarded to Recovery Service.
Protected database: db0729_xxm_iad
Status: ACTIVE
Policy: Bronze, 14-day retention
Recovery Service subnet: the OCID you supplied
Scheduled Cloud Protect backup task: every 15 minutes
The initial health is WARNING — Waiting for archive logs, which is expected immediately after onboarding; the first scheduled task is due at 13:20 UTC. Real-time redo remains disabled. I did not enable it because that is a separate configuration change and requires a
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
Any dependent changes have been merged and published in downstream modules