Skip to content

fix(mcp): enforce App tool audiences across Connect - #4865

Merged
reachjalil merged 3 commits into
fix/direct-app-resourcesfrom
fix/connect-app-tool-audiences
Sep 10, 2026
Merged

reachjalil merged 3 commits into
fix/direct-app-resourcesfrom
fix/connect-app-tool-audiences

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Dependencies

Stacked on #4864 (fix/direct-app-resources), which builds on #4863. This delta consumes their trusted launch and authoritative policy-namespace contract. Merge/rebase and revalidate bottom-up.

Summary

Apply MCP App tool audiences consistently across direct, compatibility and ordinary execution paths, while making valid App-only helpers callable through Connect.

  • Share one strict audience predicate. Missing visibility defaults to both audiences; malformed or empty visibility exposes neither. Ordinary discovery, execution and Code Mode remain model-facing.
  • Filter current execution targets, not just discovery. Retained Code Mode definitions cannot keep invoking a tool that becomes App-only.
  • Expose resource-less App-visible helpers privately without turning them into dashboard launchers, model tools, or additional resource permissions.
  • Validate the inner target of private Connect execute_capability against the trusted original lease, actual resource binding and effective ordered permissions.
  • Evaluate private and original direct policy namespaces independently, then combine them as deny over ask over allow. Later rules win within each namespace. Any ask and annotation-based approval requirement remains effective.

Audience comes from the trusted private surface, not public arguments. Den write-scope requirements, grants, credential selection, ordinary resource denial and provider-specific routing remain unchanged.

Verification

Signed head: 1b4207ef7d9f9bf6a96d3463a8850caffb679307.
Exact parent-PR base and merge-base: fe4e440cb398ec20d40df136051298c39164d61c.

Passed on that exact head, exit 0:

  • pnpm --filter openwork-server exec bun --conditions=development test src/mcp-app-host.test.ts src/connect-mcp-server-catalog.test.ts src/mcp.passive-inventory.test.ts — 93 passed.
  • DATABASE_URL=mysql://root:[email protected]:9/unused DATABASE_REDIS_URL=redis://127.0.0.1:9 pnpm --filter @openwork-ee/den-api exec bun --conditions=development test test/external-connection-proxy.test.ts — 24 passed.
  • DATABASE_URL=mysql://root:[email protected]:9/unused DATABASE_REDIS_URL=redis://127.0.0.1:9 pnpm --filter @openwork-ee/den-api exec bun --conditions=development test test/codemode-tools.test.ts — 11 passed.
  • pnpm --filter openwork-server typecheck
  • pnpm --filter @openwork-ee/den-api exec tsc --noEmit --pretty false
  • Delta whitespace and signatures for all three commits.

Total: 128 passed, zero failed. The database URLs above are deliberately unused local test settings; the focused tests use isolated mock authentication and provider boundaries. Only the local generated MCP dependency bundles were built for Den typechecking.

Verdict and remaining coverage

Incomplete. The existing connector-search-intent journey and database-backed search-divergence assertions were extended but not executed. No full Den/Electron journey, live provider or enterprise deployment was exercised. These results do not establish universal MCP Apps conformance.

Hosted CI/review are pending. No merge or deployment is included.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 10:54pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 10:54pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 10:54pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 10:54pm UTC

@reachjalil
reachjalil force-pushed the fix/direct-app-resources branch from efa344d to fe4e440 Compare September 10, 2026 22:52
@reachjalil
reachjalil force-pushed the fix/connect-app-tool-audiences branch from b29152e to 1b4207e Compare September 10, 2026 22:53
@reachjalil
reachjalil merged commit 1fdc509 into fix/direct-app-resources Sep 10, 2026
17 checks passed
reachjalil added a commit that referenced this pull request Sep 10, 2026
…4864)

* fix(server): resolve direct Connect Apps through private host

* fix(server): retain direct App policy identity in launch leases

* fix(mcp): enforce App tool audiences across Connect (#4865)

* fix(connect): enforce MCP tool audiences across App helpers

* fix(app): honor ordered permissions for MCP App calls

* fix(app): compose direct and private App permissions

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — 1b4207ef Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — 1b4207ef Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — 1b4207ef Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — 1b4207ef Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant