Add OCI Document Understanding MCP Server - #390
Conversation
2c072d0 to
56f8ee9
Compare
|
@krisrice @AlaaShaker Can you please help review and approve this PR to add the OCI Document Understanding MCP Server. |
dustin-sale
left a comment
There was a problem hiding this comment.
Please migrate the OCI SDK client setup to oracle-mcp-common’s build_auth_context() as required by this repository, and make include_confidence=false actually suppress confidence output (or remove the unsupported option). The scoped tests otherwise pass with 93.73% coverage.
56f8ee9 to
f6669bd
Compare
|
Hi @dustin-sale, addressed your comments. Please approve. |
dustin-sale
left a comment
There was a problem hiding this comment.
@antimverma the two prior review requests are resolved. Further review found two more defects, please see my comments.
|
Hi @dustin-sale thanks for the review and comments, I addressed your latest comments. Please check. |
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
None.
Validation
make lintpassed.make test project=oci-document-understanding-mcp-serverpassed (47 tests; 94.35% coverage).
See the inline comments in this review for evidence, impact, and suggested remediation.
|
Hi @krisrice Please help approve/merge this PR. |
| raise ValueError(f"Unsupported DOCUMENT_MCP_MODE: {value}") | ||
|
|
||
|
|
||
| def _normalize_auth(value: str | None) -> str: |
There was a problem hiding this comment.
can this be adapted to use the common auth module? https://github.com/oracle/mcp/blob/main/src/common/oracle_mcp_common/auth.py
There was a problem hiding this comment.
@gebhardtr Addressed this in the latest commit.
robander
left a comment
There was a problem hiding this comment.
Feedback from an automated review:
P1 security: OCI_DOCUMENT_ENDPOINT permits any endpoint, including plain HTTP, and sends document contents there via the authenticated SDK client. This bypasses the repository’s recent endpoint-hardening direction and could exfiltrate sensitive documents. Remove the override or strictly derive/validate an official OCI Document Understanding endpoint.
|
|
||
| ### Added | ||
|
|
||
| - Added public Oracle MCP package layout under `oracle/oci_document_understanding_mcp_server`. |
There was a problem hiding this comment.
This pull request is creating version 0.1.0, should these "unreleased" changes be included with the 0.1.0 list below?
There was a problem hiding this comment.
Feedback from an automated review:
P1 security: OCI_DOCUMENT_ENDPOINT permits any endpoint, including plain HTTP, and sends document contents there via the authenticated SDK client. This bypasses the repository’s recent endpoint-hardening direction and could exfiltrate sensitive documents. Remove the override or strictly derive/validate an official OCI Document Understanding endpoint.
@robander Also addressed this.
|
@gebhardtr @robander All comments are addressed. Please review/approve. |
Description
Adds the OCI Document Understanding MCP server under
src/oci-document-understanding-mcp-server.This server provides stdio MCP tools for OCI Document Understanding extraction and classification workflows. It supports extracting text, key-value pairs, tables, and document elements, as well as document classification for inline base64 documents and OCI Object Storage document sources.
The implementation follows the repository MCP server structure and public packaging expectations:
pyproject.toml,uv.lock,README.md,CHANGELOG.md,LICENSE.txt, andoracle/package source.oracle.oci-document-understanding-mcp-server./mcp, and/.well-known/*endpoints are not exposed.document_extractfor text, key-value, table, and document-element extraction.document_classifyfor document classification and confidence-aware candidate results.additional_user_agenttelemetry derived from package metadata.Fixes: N/A
Type of change
How Has This Been Tested?
Validated locally from
src/oci-document-understanding-mcp-server:uv run pytest --cov=. --cov-branch --cov-report=term-missing39 passed93.73%uv buildDOCUMENT_MCP_MODE=stubandOCI_AUTH_MODE=none.document_extractthrough the local stdio MCP server.document_classifythrough the local stdio MCP server.Test Configuration:
OCI_AUTH_MODE=noneChecklist: