Skip to content

Commit 8445a35

Browse files
committed
fix mcp deletion from editor
1 parent 61d1168 commit 8445a35

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.mcp.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"Playwright": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": [
7+
"@playwright/mcp@latest"
8+
]
9+
}
10+
}
11+
}

app/templates/components/workspace_actions.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,14 @@ <h4 class="text-sm font-bold text-black mb-2">Actions</h4>
617617
if (mcpFile) {
618618
try {
619619
let config = JSON.parse(mcpFile);
620-
// Remove the specific MCP from config
621-
if (config.mcps && config.mcps[mcpName]) {
622-
delete config.mcps[mcpName];
620+
// Remove the specific MCP from config - use correct property name
621+
if (config.mcpServers && config.mcpServers[mcpName]) {
622+
delete config.mcpServers[mcpName];
623+
}
624+
625+
// If no MCPs left, keep the file with empty mcpServers object
626+
if (!config.mcpServers) {
627+
config.mcpServers = {};
623628
}
624629

625630
// Update the file with cleaned config

0 commit comments

Comments
 (0)