Add a new MCP server configuration.
(self, name: str, config: dict)
| 44 | return self._info.get(name) |
| 45 | |
| 46 | def add(self, name: str, config: dict): |
| 47 | """Add a new MCP server configuration.""" |
| 48 | name = name.strip() |
| 49 | if not name: |
| 50 | raise ValueError("Name must not be empty") |
| 51 | |
| 52 | with Session(engine) as session: |
| 53 | item = MCPTable(name=name, config=config) |
| 54 | session.add(item) |
| 55 | session.commit() |
| 56 | |
| 57 | self.load() |
| 58 | |
| 59 | def update(self, name: str, config: dict): |
| 60 | """Update an existing MCP server configuration.""" |