Skip to content

342 fixes - #394

Open
JoseLuisC99 wants to merge 55 commits into
oracle:mainfrom
JoseLuisC99:342-fixes
Open

JoseLuisC99 wants to merge 55 commits into
oracle:mainfrom
JoseLuisC99:342-fixes

Conversation

@JoseLuisC99

@JoseLuisC99 JoseLuisC99 commented Jul 24, 2026 •

Copy link
Copy Markdown
Member

Description

Adds one unified, read-only OCI Database Observability MCP server for Operations Insights (OPSI) and Database Management (DBM).

  • Distribution and command: oracle.oci-db-observability-mcp-server
  • Python package: oracle.oci_db_observability_mcp_server
  • Source directory: src/oci-db-observability-mcp-server

The server supports STDIO and HTTP streaming transports, OCI authentication through oracle-mcp-common, and OCI IAM/IDCS request-token authentication for HTTP deployments.

Its MCP surface provides:

  • Compartment resolution through get_oci_compartment and list_oci_compartments
  • Catalog discovery through list_dbo_skills, list_dbo_tools, and describe_dbo_tool
  • Read-only OCI SDK invocation through invoke_dbo_tool

The catalog includes 34 workflow skills and 229 GET-backed OPSI/DBM operations. Operation schemas are aligned with the locked OCI Python SDK, validate arguments before client construction, and support pagination using nextPage.

Dependencies are declared in pyproject.toml:

  • fastmcp==3.4.5
  • oci==2.182.1
  • pydantic==2.13.4
  • jsonschema>=4.25.0,<5.0.0
  • oracle-mcp-common>=0.1.2,<0.2.0

Fixes #342

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

How Has This Been Tested?

  • uv run python -m compileall oracle
  • Verified the console entry-point module imports successfully.
  • uv run python -m pytest --cov=oracle.oci_db_observability_mcp_server --cov-branch --cov-report=term-missing oracle/oci_db_observability_mcp_server/tests
    • 39 tests passed
    • 91.48% coverage, with a 90% required threshold
  • make lint
  • git diff --check

Test Configuration:

  • Hardware: macOS arm64
  • Toolchain: Python 3.13.3, uv 0.6.17, pytest 9.0.3
  • SDK: OCI Python SDK 2.182.1, FastMCP 3.4.5

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have made corresponding documentation changes.
  • I have added tests that validate the server behavior.
  • New and existing unit tests pass locally with these changes.

Signed-off-by: José Luis Castro <jlcastrog99@gmail.com>
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 Jul 24, 2026
@JoseLuisC99 JoseLuisC99 mentioned this pull request Jul 24, 2026
17 tasks
@JoseLuisC99

Copy link
Copy Markdown
Member Author

Hi @dustin-sale, any update?

@JoseLuisC99 JoseLuisC99 reopened this Jul 29, 2026
@dustin-sale

Copy link
Copy Markdown
Contributor

@JoseLuisC99 my apologies, I have not had a chance to get to this. Here are some initial changes that are needed:

  • Have each server under its own directory in /src. Makefile loops through /src and it wont account for nested mcp servers.
  • Add a CHANGELOG.md and README.md for each server.
  • We recently added oracle-mcp-common with common auth utils. We prefer that these are used to keep things consistent. Please see oci-cloud-mcp-server or oci-database-mcp-server for usage examples.

JoseLuisC99 and others added 8 commits July 29, 2026 12:17
Signed-off-by: José Luis Castro García <jose.lu.castro@oracle.com>
Signed-off-by: José Luis Castro García <jose.lu.castro@oracle.com>
Signed-off-by: José Luis Castro García <jose.lu.castro@oracle.com>
@JoseLuisC99

Copy link
Copy Markdown
Member Author

@dustin-sale everything is ready. We have modified our approach to align this MCP with our current agent engine and have significantly reduced the number of tools.

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

This implementation has a promising unified discovery surface and passes its unit-test/coverage gates, but it is not ready to merge.

  • PR description needs to be updated with the single oci-db-observability-mcp-server
  • Pagination is unusable for most catalog operations
  • Unit tests coverage gaps:
    • page-token preservation
    • strict schema parity
    • mutation isolation
  • The generic invocation tool also exposes state-changing DBM operations without a separate destructive boundary.
  • Most advertised “exact” schemas accept arbitrary or incorrectly typed arguments.
  • Documented uvx command does not match the published distribution

Please resolve those contract and safety issues and populate the changelog before another review.

Comment thread src/oci-oracle-db-observability-mcp-server/pyproject.toml Outdated
Comment thread src/oci-oracle-db-observability-mcp-server/CHANGELOG.md Outdated
@JoseLuisC99

Copy link
Copy Markdown
Member Author

Hi @dustin-sale, I have addressed your comments.

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

Requested changes

  • src/oci-oracle-db-observability-mcp-server/oracle/oci_oracle_db_observability_mcp_server/metadata/tools.json:247 — [P1] Remove or gate state-changing operations from the read-only catalog.
  • Dependency updates in pyproject.toml.

Additional review notes

  • src/oci-oracle-db-observability-mcp-server/oracle/oci_oracle_db_observability_mcp_server/mcp.py:12 — [P2] Use the registered MCP tool names in discovery guidance.

Validation

  • make lint and make test project=oci-oracle-db-observability-mcp-server passed; 31 tests passed with 91.17% coverage.
  • The wheel builds and current CI is green, but a locked-SDK audit found five state-changing catalog operations marked mutable: false.

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

Comment thread src/oci-oracle-db-observability-mcp-server/pyproject.toml
Correct metric catalog dimension allowlists
@JoseLuisC99

Copy link
Copy Markdown
Member Author

Hi @dustin-sale, ready again

@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

  • src/oci-db-observability-mcp-server/oracle/oci_db_observability_mcp_server/metadata/database-and-infra-observability-metrics.json:532 — [P1] Finish normalizing metric-dimension annotations.

Additional review notes

None.

Validation

  • Lint and all 68 tests passed with 92.18% coverage; lock validation and distribution builds passed.
  • The prior version, resourceId, and cellDiskType cases now pass, but a catalog-wide probe found six remaining annotation-token dimensions that generate invalid MQL.

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

@JoseLuisC99

Copy link
Copy Markdown
Member Author

@dustin-sale fixed

@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

None.

Validation

  • Lint and all 76 tests passed with 92.18% coverage; lock validation and distribution builds passed.
  • All six corrected metric families produce valid MQL, while the old annotation tokens and unsupported values are rejected before client creation.

No inline comments are included in this review.

@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

@gebhardtr
gebhardtr self-requested a review September 29, 2026 16:24
@krisrice
krisrice enabled auto-merge (squash) September 29, 2026 17:37
auto-merge was automatically disabled September 29, 2026 18:46

Head branch was pushed to by a user without write access

This branch has not been deployed

No deployments
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

5 participants