void icon indicating copy to clipboard operation
void copied to clipboard

MCP

Open andrewpareles opened this issue 8 months ago • 16 comments

We need to implement MCP.

toolsService and toolsServiceTypes are the two relevant files.

Should be pretty simple, but happy to answer any questions if someone wants to get started on this!

andrewpareles avatar May 02 '25 10:05 andrewpareles

Hi - Silly question, but is (the existence of) this issue suggesting that MCP support does not exist in current version of Void?

I ask because I can configure MCP servers in settings and even start the configured servers. The app even says how many tools it found for each server.

But it does appears that I cannot invoke the configured servers from my llm and asking it which tools are available only shows the built-in tools.

Is this issue saying that indeed there is no code to actually tell the models about the various (non-builtin) tools or to invoke them if the tool even tried?

If so, where did all that mcp server config / start / query for tool name and count come from? Is that pre-existing in VSCode?

Thanks for any clarification and keep up the good work!

davidpfarrell avatar May 14 '25 04:05 davidpfarrell

Yes, we don't support MCP yet -- it's coming in the next few days!

Where are you configuring MCP?

andrewpareles avatar May 14 '25 05:05 andrewpareles

Hi, So I did confirm the MCP configuration I was referring to is in standard VSC Code too ... here's how you get to it:

  • Go to settings (cmd + , for me on Mac)
  • Type 'mcp' into filter
  • See Features -> Chat section:
Image
  • Click on Edit in settings.json
  • You can add mcp servers
  • You can start / stop / review logs of running servers:
Image

That whole section may only exist as part of co-pilot's support / extension, as no other tooling (Roo, Cline, etc) seems to consume these MCP servers either.

davidpfarrell avatar May 14 '25 14:05 davidpfarrell

Yeah, we definitely need the MCP server support.

ksylvan avatar May 16 '25 04:05 ksylvan

That whole section may only exist as part of co-pilot's support / extension, as no other tooling (Roo, Cline, etc) seems to consume these MCP servers either.

You may want to check in with the vscode team/discord and see if these mcps could be consumed ... Fully lifecycle management is already builtin so seems wasteful to rebuild another version of it.

davidpfarrell avatar May 16 '25 15:05 davidpfarrell

I would think that the major change is that agent needs to know how to use the tools provided in the manifest that the MCP server provides. So for example if someone says to add a task it would look in the MCP server manifest for an add_task tool to call. VSCode's agent already works with this in the "Insider version" so it shouldn't be too difficult to make it happen. I'm 100% for getting this implemented, as I'm working on a new Local Docker MCP called NeuroDock that will combine graph memory and task management. It will be open source.

barnent1 avatar May 21 '25 17:05 barnent1

I think VSCode's announcement that Agent is moving into the main codebase means they want you to use their existing mcp infra and not rebuild your own.

They may even provide a way to assist in generating the tool-call instructions for you.

My hunch here is to wait and see how that plays out, but I'm sure you have other reasons for getting mcp support sooner rather than later ...

davidpfarrell avatar May 21 '25 19:05 davidpfarrell

This is so exciting 🚀 any expected time to implement & release it?

mAlaliSy avatar May 28 '25 18:05 mAlaliSy

MCP tool integration is a fantastic feature. Looking forward to the release date.

vasutech avatar May 30 '25 01:05 vasutech

Almost done, coming next few days!

andrewpareles avatar May 30 '25 08:05 andrewpareles

Does the latest installation package have MCP capability?

Ericsongyl avatar Jun 04 '25 10:06 Ericsongyl

does not work with docker.

cevatkerim avatar Jun 13 '25 13:06 cevatkerim

Please document MCP Authentication complete workflow, configuration options, and supported methods. Bearer token only? Or oAuth 2.1 only? I have been hitting my head against auth trying to get an implementation of django-mcp-server going. I am logging all auth headers being sent, and I am unable to get any combination of settings to send any kind of header. A solid open source client is desperately needed in this space so we can build out the servers

d3cline avatar Jun 29 '25 18:06 d3cline

@cevatkerim: does not work with docker.

I've observed that it does work so long as the -i flag is passed to docker run [^1].

Expand for example mcp.json

{
  "mcpServers": {
    "brave-search": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "SCRUBBED",
        "PATH": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
      }
    },
    "fetch": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/fetch"]
    }
  }
}

However, it does leave long-running containers up and keeps spawning new ones. So, the list of running containers keeps growing:

$ docker ps
CONTAINER ID   IMAGE                                                     COMMAND                  CREATED        STATUS        PORTS                                                   NAMES
db933ba42903   mcp/fetch                                                 "mcp-server-fetch"       43 hours ago   Up 43 hours                                                           focused_haslett
890affd6cfeb   mcp/brave-search                                          "node dist/index.js"     43 hours ago   Up 43 hours                                                           pensive_grothendieck
0109d2456f43   mcp/fetch                                                 "mcp-server-fetch"       43 hours ago   Up 43 hours                                                           nervous_jackson
73e630a12c9f   mcp/brave-search                                          "node dist/index.js"     43 hours ago   Up 43 hours                                                           kind_turing
b5f83428cab0   mcp/fetch                                                 "mcp-server-fetch"       43 hours ago   Up 43 hours                                                           intelligent_lewin
3e1bcce0c6b7   mcp/brave-search                                          "node dist/index.js"     43 hours ago   Up 43 hours                                                           vigilant_newton
ceb5021a8452   mcp/fetch                                                 "mcp-server-fetch"       43 hours ago   Up 43 hours                                                           trusting_hawking
19971807beff   mcp/brave-search                                          "node dist/index.js"     43 hours ago   Up 43 hours                                                           frosty_einstein
66bd4444aa4e   mcp/fetch                                                 "mcp-server-fetch"       44 hours ago   Up 44 hours                                                           zealous_davinci
eb02d7e79339   mcp/brave-search                                          "node dist/index.js"     44 hours ago   Up 44 hours                                                           compassionate_wescoff
9fb247af6679   mcp/fetch                                                 "mcp-server-fetch"       44 hours ago   Up 44 hours                                                           funny_mcnulty
cf80e93caa61   mcp/brave-search                                          "node dist/index.js"     44 hours ago   Up 44 hours                                                           sweet_austin

This is a form of process startup leak, and if left running long enough it could exhaust system resources (leading to OOM killer, PID starvation, etc...)

[^1]: This assumes the MCP process is using STDIO transport

trinitronx avatar Jul 01 '25 16:07 trinitronx

I am using Azure OpenAI GPT 4.1 model in Agent mode and despite properly configured MCP tools they are not picked up by LLM. I have just built the newest version of Void from main - MCP tools are not picked up by chat LLM. Only default ones are visible.

Image Image

CezaryKlus avatar Jul 13 '25 13:07 CezaryKlus

Maybe this helps those using the docker-based MCPs in the meantime...

To cleanup all old running MCP containers except the latest one (using jq's [:-1] array indexing):

docker ps -a --filter=status=running --filter=ancestor=${MCP_BASE_IMAGE} --format=json | jq -s 'sort_by(.CreatedAt) | .[:-1] | .[].ID' | xargs docker stop

For example, to cleanup all the old containers for both mcp/brave-search and mcp/fetch:

docker ps -a --filter=status=running --filter=ancestor=mcp/brave-search --format=json | jq -s 'sort_by(.CreatedAt) | .[:-1] | .[].ID' | xargs docker stop
docker ps -a --filter=status=running --filter=ancestor=mcp/fetch --format=json | jq -s 'sort_by(.CreatedAt) | .[:-1] | .[].ID' | xargs docker stop

trinitronx avatar Sep 03 '25 07:09 trinitronx