Closed
Description
Description:
Every flowise session and every request which uses mcp creates a new server process. These processes do not close and piles up for every request that uses mcp even just refreshing flowise. This also happens with api requests. I've tried with node sdk and python sdk.
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("AppInfo MCP Server running on stdio");
console.error("MCP env", process.env);
}
main().catch((error) => {
console.error("Fatal error in main():", error);
process.exit(1);
});
process.on('SIGINT', async () => {
process.exit(0);
});
process.on('SIGTERM', async () => {
process.exit(0);
});
process.stdin.on("close", () => {
console.error("MCP Server closed");
server.close();
});
Root Cause:
Flowise does not notifies server that client has gone. I tried to create this flow using sequential agents and added a custom JS function node to send a close message to MCP, but I wasn't able to get it to work.
Expected Behavior:
Each time a request ends, Flowise should close the mcp or sends a signal to close itself.