Hello, thanks for building this awesome IDE!
I’m developing an extension for Cursor & VSCode. It spins up an SSE MCP server and can automatically configure it for you.
However, it’s possible that the SSE Server has to restart. In that case, Cursor disconnects from it. There’s currently no good way to restart it. I could modify & save mcp.json
in order to achieve a restart but that’s hacky. Please add a command that I can execute in order to refresh a server.
I found the code, but no way to execute it from the outside
function X_r(i) {
const e = ut()
, [t,s] = ae(!1)
, n = G( () => e.mcpService.toolsCache()[i.server.identifier] || [])
, r = G( () => e.mcpService.resourcesCache()[i.server.identifier] || [])
, o = G( () => e.mcpService.statusCache()[i.server.identifier] || {
type: "disconnected"
})
, a = async h => {
if (!t()) {
s(!0);
try {
console.info(`[MCPServerItem] Refreshing tools for server ${h.identifier} (${h.type === "stdio" ? h.command : h.url})`),
await i.onRefresh(h)
} finally {
s(!1)
}
}
}
, l = () => e.mcpService.isServerEnabled(i.server);
return E(Y_r, {
get server() {
return i.server
},
get editedName() {
return i.server.name
},
get editedUrl() {
return i.server.url || ""
},
get editedCommand() {
return i.server.command || ""
},
get serverType() {
return i.server.type
},
get isRefreshing() {
return t()
},
get tools() {
return n()
},
get status() {
return o()
},
get isEnabled() {
return l()
},
onToggleEnabled: () => {
e.mcpService.toggleServerEnabled(i.server)
}
,
get resources() {
return r()
},
get onEdit() {
return i.onEdit
},
get onSave() {
return i.onEdit
},
get onDelete() {
return i.onDelete
},
onRefresh: a
})
}