Skip to content

error when using path variables in memory file configuration #1846

Closed as not planned

Description

@KingOfTac

Describe the bug
Knowledge Graph Memory Server produces an error when using vscode's path variables in the memory file location configuration.

To Reproduce
Steps to reproduce the behavior:

  1. Use ${workspaceFolder}/.mcp/memory.json for the env.MEMORY_FILE_PATH setting
  2. Try to use any commands from the knowledge graph server

Expected behavior
The knowledge graph server should be able to resolve the path variables and use the memory file configured at that location.

Logs
Image

Additional context
https://code.visualstudio.com/docs/reference/variables-reference

Activity

  1. sascharo commented on Jun 4, 2025

    @sascharo

    I have the same issue. variable references like ${workspaceFolder} cannot be resolved strangely in this case. I have the same issue with relative paths. The only workaround that works for me is using an absolute path which isn't ideal since I prefer to have the MCP servers configured in the user settings and therefore multiple projects share the same file.

    @KingOfTac, have you found a solution?

  2. sascharo commented on Jun 4, 2025

    @sascharo

    #1600, #1481 and #1018 seem to be related or actual the same issue.

  3. olaservo commented on Sep 3, 2026

    @olaservo
    Member

    ${workspaceFolder} is a client-side variable; the server receives whatever string the client puts in the environment. VS Code now substitutes it in mcp.json, and Claude Desktop does not support variables at all. The relative-path behaviour mentioned in the follow-up is #692, which #4327 fixes. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions