Replies: 6 comments
-
Do you mean you want to connect to an already running mcp-hub server? If so, all you have to do is make sure the port you started mcp-hub with and the port in the config are the same. By default it is 37373. If mcp-hub server is running at that port it will auto connect to the plugin instead of starting it's own. Note: currently the default behaviour of the mcp-hub server even when started outside is to auto close after all the clients get disconnected. This happens even though the mcp-hub was run outside neovim. Will push a fix today. The custom cmd, cmdArgs are for starting the server with some other command than the default mcp-hub. Useful in development to point to a cli.js file or for nix environments etc. I hope I understood your issue correctly. If you want to start the mcp-hub server yourself maybe on startup or in a tmux so that it keeps on running, mcphub.nvim connects to it and registers as client. But currently once this nvim is closed it is unregistered leading to mcp-hub server auto closing and you have to restart the mcp-hub server. I know this is annoying and will fix this today. Please keep an eye out. Thank you |
Beta Was this translation helpful? Give feedback.
-
Perfect, that is good to know, and is super helpful. Additionally I wanted to have the mcp-hub run on a homelab server and connect to LibreChat. But I also wanted to connect via my local nvim instance to the server. That is where I wanted to know if I could designate a hostname or IP address for where mcphub.nvim to look for a already running server. I'm wanting to do this for 2 reasons:
|
Beta Was this translation helpful? Give feedback.
-
Awesome use-case! I didn't think about this. So, currently it just defaults to localhost:port Will add this option along with a mcp-hub --auto-shutdown which defaults to true so that you can use it as an actual server. Working on it, will let you know |
Beta Was this translation helpful? Give feedback.
-
Awesome! Honestly, if you put a light weight web ui infront of mcphub, I think it is something a lot of people are asking for. Add it into a docker file (which can literally just be sourcing your nix flake) and you could potentially have a fully functional Hub of everything mcp |
Beta Was this translation helpful? Give feedback.
-
3436cb1 fixes this You can add the server_url to your setup like require("mcphub").setup({
server_url = `http://hostname:port` -- or `https://hosteddomain`
}) This uses this as the base_url for the mcp-hub server which makes is possible to provide hosted urls from netlify etc Edit: Please note that when you add a server to your config file, you need to press "R" in the HUB UI in order to restart the servers from the latest config file. You can't exit and open neovim to get the latest servers because we are running it as a standalone server. Although it has a Also currently mcphub.nvim knows about tool_list_changed, prompt_list_changed etc eventes by listening to stdout. Although these are very rarely implemented. You might have to manually refresh "r" if any of the MCP Servers provide dynamic tools, resources etc. I am moving on from this approach to listening to the |
Beta Was this translation helpful? Give feedback.
-
Regarding this, when I started out But it is dragging me behind my main goal of having MCP Support inside neovim. I didn't published the branch as I felt it was not ready. One day I felt that it might be used by anyone and out of frustration removed the branch 😑 . Will do if I have some time.
Sorry, I didn't get this. Can you explain a little! You mean add mcp-hub and webui as a docker image? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Great plugin!
I'm having a really hard time finding a way to reference an already running mcphub, say on a server, or on the computer. I saw the Custom Server Command, but I wasn't sure how to reference a specific host.
Thanks Again!
Beta Was this translation helpful? Give feedback.
All reactions