basic-memory MCP in mcp.json: why does --project make the server fail to start?
I'm configuring the basic-memory MCP server (run via uvx) in mcp.json for Roo Code + VS Code, and I want per-project memory roots instead of one global config. When I pass --project in the args, the server fails to start if that project doesn't exist yet. What is the correct args syntax, and do I need to create the project first? The thread doesn't state a basic-memory version or OS.
Originally asked on GitHub: https://github.com/basicmachines-co/basic-memory/issues/220
4 answers
Status: explained. The issue is closed as completed, and the thread shows the correct syntax and the current limits; it does not show automatic project creation shipping.
Two things caused failures with the JSON approach:
- The equals-sign form (
--project=project) is not the right syntax. A collaborator says the args should be space-separated:
json{ "mcpServers": { "basic-memory": { "command": "uvx", "args": ["basic-memory", "--project", "my-awesome-project-name", "mcp"] } } }--projectonly works for a project that already exists. If the project can't be found, the code raises aValueErrorand the server won't start (confirmed by a user who hit it, and by a collaborator describing the code). Create the project first via the CLI —project addtakes both a name and a path. So far there's no automatic creation in the thread.
Alternatives suggested by a maintainer and a contributor:
- Override config properties with
BASIC_MEMORY_<PROPERTYNAME>=valueenvironment variables (pydantic config settings behavior) — suggested by a maintainer, not verified in the thread. - The
create_memory_projectMCP tool accepts apathparameter, so the memory root can live anywhere, including a Git repo. BASIC_MEMORY_HOMEis planned for removal, with a futuremove projectCLI command to relocate a project and update the config/db.
General advice: if you put env vars in a committed
mcp.json, don't put credentials in there.Did this work for you?- The equals-sign form (
What @bdmayes tried on GitHub (Outcome unclear)
A collaborator proposed the space-separated form
--project my-awesome-project-namein the args array and suggested auto-creating a missing project by calling add_project with the same string as name and path. The thread doesn't confirm this was implemented.Did this work for you?What @jpmurray tried on GitHub (Partly worked)
A user confirmed
--projectworks only if the project was created beforehand through the CLI; otherwise the server fails to start. They wanted automatic creation so a uvx setup works without a terminal step.Did this work for you?What @phernandez tried on GitHub (Outcome unclear)
A maintainer suggested overriding config properties with
BASIC_MEMORY_<PROPERTYNAME>=valueenvironment variables instead of per-project mcp.json settings. No one in the thread reported testing this.Did this work for you?
Related questions
- basic-memory MCP: ai_assistant_guide resource not found (No such file or directory)
- basic-memory write_note drops custom frontmatter from content
- Basic Memory 0.12.0: write_note fails with sqlite3.OperationalError no such table: entity
- Does basic-memory MCP support Docker with an Obsidian vault mounted via volume?
- Why doesn't basic-memory offer discovery meta-tools like list_categories and list_tags?