:wave: I think I've seen some MCP work go through,...
# proj-agent
w
👋 I think I've seen some MCP work go through, but wanted to highlight explicitly one thing we really need: With a long-lived agent server, we can't start an MCP server with each conversation--the host machine gets flooded with duplicate MCPs. Instead, we need an endpoint that starts the MCP server once, and you can create conversations that point to that MCP server Is this available today? If so, maybe we can get agent canvas using it 🙂
l
Just to better understand, are you actually encountering problems with this? I'm a little bit surprised because MCP servers tend to be light weight.
Maybe they're not terminating when the conversation goes idle?
(and I'm asking because I think this adds some amount of architectural complexity, so if we don't need to do it I'd prefer to avoid it)
m
I was working on a ticket that represents exactly this problem: ref. The issue consists of two parts: • Part 1 involves a couple of fixes (already merged into
main
). • Part 2 is the major change described above. I’ve explored what changes are needed to implement this behavior, and it looks like a fair amount of work. I'm just sharing this to give you an idea of the order of magnitude for these changes.
w
Yes I had 200 Slack MCPs running on my VM
l
Thanks @modern-fireman-99755! I think probably our first order of business is any zombie connections when we disconnect from a conversation. Once we fix that we could see if we still have a problem
w
I have to have a cronjob to kill MCPs if I don't want my VM to tip over 😅
l
Yeah Robert, I think the issue is probably zombies rather than needing persistent servers though
w
hmm yeah. I'm running an old version of agent-server too
👍 1
generally it seems like a weird choice to spin up a bunch of the same MCP server for each conversation. But I hear you on the logical simplicity, it makes it consistent between local and cloud too
l
I see the point, but the way MCP works sometimes isn't super-conducive to sharing. For instance, stdio MCPs can't easily be shared I think. So we'd end up with some complex logic where some MCPs are per-conversation and some are not. It might be worth doing, but I'd like to do it after we confirm that we do have a problem that can't be fixed in an easier way
👍 1
w
OK that makes sense 🙂
So it's possible this is actually working as of today. I will try and enable it and see if I hit any issues!
👍 1