mirror of
https://github.com/Monadical-SAS/cubbi.git
synced 2025-12-21 04:39:07 +00:00
feat: add MCP tracking to sessions (#19)
Add mcps field to Session model to track active MCP servers and populate it from container labels in ContainerManager. Enhance MCP remove command to warn when removing servers used by active sessions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
fc0d6b51af
commit
d750e64608
@@ -107,12 +107,21 @@ class ContainerManager:
|
||||
elif container.status == "created":
|
||||
status = SessionStatus.CREATING
|
||||
|
||||
# Get MCP list from container labels
|
||||
mcps_str = labels.get("cubbi.mcps", "")
|
||||
mcps = (
|
||||
[mcp.strip() for mcp in mcps_str.split(",") if mcp.strip()]
|
||||
if mcps_str
|
||||
else []
|
||||
)
|
||||
|
||||
session = Session(
|
||||
id=session_id,
|
||||
name=labels.get("cubbi.session.name", f"cubbi-{session_id}"),
|
||||
image=labels.get("cubbi.image", "unknown"),
|
||||
status=status,
|
||||
container_id=container_id,
|
||||
mcps=mcps,
|
||||
)
|
||||
|
||||
# Get port mappings
|
||||
|
||||
Reference in New Issue
Block a user