Please provide ENV for current project base dir to MCP servers

It is currently impossible to obtain the current project directory from the MCP Server.

Hello @Kirill_Sabitov,

Antigravity isolates MCP processes, so they cannot automatically detect your project path. You need to explicitly pass it by using the ${workspaceFolder} variable in your configuration arguments: “args”: [“–dir”, “${workspaceFolder}”]

Hello, I am trying to use a MCP server for accesing, running and editing jupyter notebooks in Antigravity. It uses the "${workspaceFolder}” in args the same way as you described.

Agent sees and lists available tools no problem. Unfortunately, when an agent tries to call and use any of the available tool, it seems that the ${workspaceFolder} is seen only as a raw text and not the actual folder path to my workspace, and thus it does not work.

How can I resolve this issue?

This is the mcp json config right now:

{

    "mcpServers": {

        "antigravity-nb": {

            "command": "antigravity-nb",

            "args": [

                "serve-agent",

                "--workspace-root",

                "${workspaceFolder}"

            ]

        }

    }

}