Skip to content

RCV V3 - workflow based tools - #425

Open
gsharini wants to merge 12 commits into
oracle:mainfrom
gsharini:rcv_v3
Open

RCV V3 - workflow based tools#425
gsharini wants to merge 12 commits into
oracle:mainfrom
gsharini:rcv_v3

Conversation

@gsharini

Copy link
Copy Markdown
Member

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

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 26, 2026
arampuri and others added 2 commits August 27, 2026 01:11
… 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.

@dustin-sale dustin-sale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-pinned uvx example.

Validation

  • make lint and make test project=oci-recovery-mcp-server passed.
  • The packaged wheel includes the new prompt files.

See the inline comments in this review for evidence, impact, and suggested remediation.

Comment thread src/oci-recovery-mcp-server/README.md Outdated
@@ -0,0 +1,2221 @@
"""
Copyright (c) 2025, 2026 Oracle and/or its affiliates.

@gebhardtr gebhardtr Sep 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix coming from gsharini#11

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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this?

@arampuri arampuri Sep 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this called "legacy auth"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're calling v.strip() twice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

if m in ("apikey", "api_key", "api-key"):
return "apikey"
return "session"
raw = (os.getenv("ORACLE_MCP_AUTH_METHOD") or "").strip().lower()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will:

OCI_MCP_AUTH_TYPE=security_token
ORACLE_MCP_AUTH_METHOD=apikey

result in rejected requests after successful authentication?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix coming in - gsharini#11


qualified = _qualify(audience, scopes)
provider.update_default_scopes(qualified)
provider.required_scopes = qualified

@gebhardtr gebhardtr Sep 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix comin gin - gsharini#11

@gebhardtr gebhardtr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@gsharini

gsharini commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

gsharini#11
will be merged here which will address the above comments in addition to other service specific comments

arampuri and others added 3 commits September 3, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants