Skip to content

added Oracle DB Observability - #343

Merged
krisrice merged 2 commits into
oracle:mainfrom
JoseLuisC99:342-fixes
Jul 21, 2026
Merged

added Oracle DB Observability#343
krisrice merged 2 commits into
oracle:mainfrom
JoseLuisC99:342-fixes

Conversation

@JoseLuisC99

@JoseLuisC99 JoseLuisC99 commented Jun 19, 2026

Copy link
Copy Markdown
Member

Description

Adds the OCI Oracle Database Observability MCP server package with two MCP server entry points:

  • oracle.oci-opsi-mcp-server for Operations Insights observability tools
  • oracle.oci-dbm-mcp-server for Database Management observability tools

The change includes typed MCP tools, OCI SDK client/auth integration, pagination and response mapping helpers, generated Pydantic models,
README setup guidance, package metadata, lockfile, and unit tests with coverage enforcement.

Dependencies required by this package are declared in pyproject.toml: fastmcp==3.2.4, oci==2.174.0, and pydantic==2.12.3.

Fixes #342

Type of change

  • 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?

  • uv run python -m compileall oracle
  • Verified both pyproject.toml console entry-point modules import successfully.
  • uv run python -m pytest --cov=. --cov-branch --cov-report=term-missing
  • make lint
  • git diff --check main

Test Configuration:

  • Firmware version: N/A
  • Hardware: macOS arm64
  • Toolchain: Python 3.13.3, uv 0.6.17, pytest 9.0.3
  • SDK: OCI Python SDK 2.174.0, FastMCP 3.2.4

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 (dependency warning from fastmcp/authlib, Remediate Dependabot alerts for Python dependencies across Oracle and OCI MCP servers #340)
  • 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

Signed-off-by: José Luis Castro <jlcastrog99@gmail.com>
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 19, 2026
Signed-off-by: José Luis Castro <jlcastrog99@gmail.com>
@@ -0,0 +1,59 @@
[project]
name = "oracle.oracle-db-observability"

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.

it's better if you split the individual servers out now and then keep this name for the combined server later. less complicated and fewer edges to catch on.

]

[project.scripts]
"oracle.oci-opsi-mcp-server" = "oracle.oci_oracle_db_observability.v1.oci_opsi_mcp_server.server:main"

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.

I assume the v1 is a versioning workaround that goes away when these packages are split out. Or does it serve another purpose? Having two versioning schemes will make updating overly complicated (if there's a breaking change to just one of these packages, do you major version bump the top-level?)



TOOL_DESCRIPTIONS = {
'get_compartment': 'Retrieves an OCI compartment by OCID. Use this operation to validate or resolve compartment scope before listing Operations Insights resources.',

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 reminds me of our oci-cloud-mcp-server -- it uses introspection to pull these details out of the OCI SDK and exposes them through a helper tool. Would that approach work? Have you tested your scenarios using the generic cloud mcp server?

return invoke_opsi('create_news_report', create_news_report_details=create_news_report_details)


@mcp.tool(

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.

there are a lot of tools and associated metadata here. this will consume a lot of context.

@krisrice

Copy link
Copy Markdown
Member

Automated review result: needs security/manual review.

Reason:

  • This adds a large Oracle Database Observability surface with database-management and Operations Insights tools, authentication, pagination, and substantial returned metadata.
  • Four reviewer threads remain unsettled: package/server split, duplicated versioning, whether generic OCI Cloud introspection should be reused, and excessive tool/metadata context consumption.

Resolve those design questions, then manually verify authorization, least privilege, bounded output/pagination, untrusted backend content handling, and redaction. No automated approval or merge was performed.

@krisrice krisrice 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.

Maintainer-directed merge after review: GitHub reports the PR mergeable, all reported checks are passing, and the repository maintainer explicitly requested merging all mergeable PRs.

@krisrice
krisrice merged commit c18e556 into oracle:main Jul 21, 2026
30 checks passed
@dustin-sale

Copy link
Copy Markdown
Contributor

@JoseLuisC99 can you please resubmit this PR? It was merged before we had a chance to complete review and I have since backed it out with in PR 389. Thanks.

@JoseLuisC99

Copy link
Copy Markdown
Member Author

@dustin-sale hehe okay, I've resubmitted this in PR #394

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.

Add Oracle DB Observability MCP servers for OPSI and DBM

4 participants