fix(mcp): exclude admin tools from a self-host discovery card when the admin surface is off - #10172
Conversation
…e admin surface is off toolsForDeployment only filtered on availability, so a self-hosted deployment's .well-known documents advertised the five admin tools even when LOOPOVER_MCP_ADMIN_ENABLED is unset and /mcp never registers them. Mirror the same registration gate createServer uses, read it at request time alongside the deployment, and fold it into the discovery memo key so the two documents don't leak into each other on one isolate.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10172 +/- ##
===========================================
- Coverage 92.21% 81.42% -10.80%
===========================================
Files 932 285 -647
Lines 114114 62604 -51510
Branches 27566 8083 -19483
===========================================
- Hits 105229 50974 -54255
- Misses 7583 11229 +3646
+ Partials 1302 401 -901
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 11:09:29 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
fix(mcp): exclude admin tools from a self-host discovery card when the admin surface is off
toolsForDeployment only filtered on availability, so a self-hosted deployment's
.well-known documents advertised the five admin tools even when
LOOPOVER_MCP_ADMIN_ENABLED is unset and /mcp never registers them. Mirror the
same registration gate createServer uses, read it at request time alongside
the deployment, and fold it into the discovery memo key so the two documents
don't leak into each other on one isolate.
Closes #10039
UI Evidence
before
after
before
after
before
after
Validation
Verified locally on this branch before opening:
npm run typechecknpx turbo run build:tsc build:verifynpm run test:coverage— patch coverage 100.0% of changed lines