fix(mcp): filter credentials per-server in _embed_credentials#43
fix(mcp): filter credentials per-server in _embed_credentials#43windsornguyen merged 4 commits intonextfrom
Conversation
PR SummaryMedium Risk Overview Adds Written by Cursor Bugbot for commit 375e62e. This will update automatically on new commits. Configure here. |
1cb797e to
aff8b1c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Truthiness check silently drops falsy credential values
- Changed the credential presence check to
blob is not Noneso falsy-but-present values are preserved instead of treated as missing.
- Changed the credential presence check to
Or push these changes by commenting:
@cursor push f55259a6a3
Preview (f55259a6a3)
diff --git a/src/dedalus_labs/lib/mcp/request.py b/src/dedalus_labs/lib/mcp/request.py
--- a/src/dedalus_labs/lib/mcp/request.py
+++ b/src/dedalus_labs/lib/mcp/request.py
@@ -172,7 +172,7 @@
"""Return the subset of *all_creds* that belongs to *name*, or None."""
conn = slug_to_connection_name(name)
blob = all_creds.get(conn)
- return {conn: blob} if blob else None
+ return {conn: blob} if blob is not None else None
def _embed_credentials(Merge latest next into fix/mcp-credential-filtering and resolve request.py/wire.py conflicts while preserving per-server credential embedding behavior.

_embed_credentials() was attaching all encrypted credentials to every server spec. Each server now receives only its own credentials, matched by connection name (slug.replace("/", "-")). API-side workaround removed in dedalus-labs/dedalus#9.