-
Notifications
You must be signed in to change notification settings - Fork 504
Description
Describe the bug
There is a ~/.context/mcp-codebase-snapshot.json file which stores the indexing statuses of codebases. When indexing a new codebase from a different claude-code project, the file gets overwritten rather than appending the new codebase it, making claude-context forget that the codebase was indexed. This is particularly problematic if you use a self hosted milvus instance, because in this case there is no syncing with the cloud.
I also observed this issue when trying to index multiple codebases concurrently. The snapshot file gets overwritten every time and at the end of the concurrent indexing, there's only one codebase snapshot at the json: the codebase that's indexing finished last.
Suggestions:
When writing into ~/.context/mcp-codebase-snapshot.json file, check if it has contents and merge it to the in-memory content before writing.
Also lock the file while it's being written to protect it from overwriting by concurrent claude-context processes.
Or maybe do sync with self hosted milvus instances as well.
What's your MCP Client Setting
"claude-context": {
"type": "stdio",
"command": "sh",
"args": [
"-c",
"export $(grep '^OPENAI_API_KEY=' .env | xargs) && exec npx @zilliz/claude-context-mcp@latest"
],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}",
"MILVUS_ADDRESS": "localhost:19531"
}
}Thank you if you address this.