Repository navigation
feat(mcp): add package-first enterprise MCP client - #2694
Merged
benjaminshafii merged 5 commits intoJul 13, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@reachjalil is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Jul 13, 2026
benjaminshafii
marked this pull request as ready for review
July 13, 2026 02:49
benjaminshafii
pushed a commit
that referenced
this pull request
Jul 13, 2026
* feat(den): add Microsoft 365 permission parity * feat(mcp): add package-first enterprise mock lab (#2670) * feat(mcp): add enterprise mock foundation artifacts * chore(mcp): wire enterprise mock workspaces * ci(mcp): enforce enterprise mock checks * fix(mcp): emit a truly invalid schema fault * feat(mcp): configure exact mock OAuth redirects * feat(mcp): strengthen mock OAuth verification * fix(mcp): accept Azure localhost OAuth callbacks * fix(mcp): close mock sockets across scenario restarts * fix(mcp): make mock listener restarts explicit * fix(oauth): surface safe token exchange failures (#2698) * fix(oauth): surface safe token exchange failures * test(oauth): use synthetic provider diagnostics * feat(mcp): add package-first enterprise MCP client (#2694) * feat(mcp): add enterprise MCP client package * refactor(mcp): harden enterprise client contracts * fix(mcp): preserve the first failing request phase --------- Co-authored-by: Benjamin Shafii <[email protected]> * feat(den): add Microsoft 365 permission parity * fix(oauth): use localhost for local Den callbacks --------- Co-authored-by: Benjamin Shafii <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Review status: the package and Den adapter are automated-test complete. Cross-package testing found and fixed one important diagnostic attribution bug. Live Microsoft 365 native OAuth was verified separately; live Microsoft Enterprise MCP and ServiceNow MCP are not yet verified.
Managerial summary
This PR introduces a package-first reference implementation for Den's outbound enterprise MCP connections.
The application behavior lives in
@openwork/enterprise-mcp-client; Den supplies infrastructure through explicit adapters for guarded network access, encrypted credentials, OAuth transactions, client registration, and structured diagnostics.The new path is opt-in:
Unset or
falsepreserves current behavior. Invalid values fail startup. A failed request never silently falls back to another implementation.Microsoft 365 and package scope
This is a provider-neutral implementation of standard remote MCP connections added by URL. The word
enterprisedescribes its security, persistence, lifecycle, and diagnostic guarantees; it does not make the package specific to Microsoft Enterprise MCP.OpenWork's Microsoft 365 quick add is currently a separate native OAuth/Microsoft Graph path. Jalil verified that native path successfully, but
DEN_ENABLE_ENTERPRISE_MCP_CLIENT=truedoes not reroute it through this package. The flag selects Den's external MCP connection runtime only.The future direction is to consolidate reusable remote MCP behavior behind package contracts. Migrating native Microsoft 365—or every other connection type—is outside this PR and requires a separate design and verification decision.
What existed and what this adds
Important finding from the new mock verification
The wrong-secret rehearsal found a real attribution bug:
That could have sent an administrator to troubleshoot discovery instead of the client secret.
This PR now tracks successful request progress and failed request evidence separately. Terminal errors use the preserved failed phase. The same rehearsal now reports:
for both Microsoft and ServiceNow invalid-client scenarios.
Security and lifecycle behavior
Administrator-facing behavior
Den remains the public diagnostic authority. The package supplies precise safe evidence: operation, failed outbound request phase, stable category/code, and retry/ownership guidance.
Examples:
isError: true→ provider operation failure, never a successful request.Native Microsoft provider wording learned from the real 365 check is handled in #2698.
Verification completed
On this source branch:
git diff --checkpassed.On the isolated combined verification branch #2699:
Manual browser verification also passed with the enterprise flag enabled: Den created a per-member external MCP connection, used the mock's exact callback, completed OAuth token exchange, validated the MCP resource token, negotiated MCP, accepted
notifications/initialized, and displayed Connected as you. The package catalog and safe-read checks remain automated rather than personally UI-verified.The combined proof imports both packages through their public exports. It does not copy their source or bypass their declared build boundary.
What remains unproven
Review order
Related PRs
dev.