Milvus MCP: Milvus Lite URI must end in .db with an existing parent dir
Fixes the Milvus MCP server failing to start with Milvus Lite because the URI does not end in .db or the parent directory does not exist. Pymilvus rejects Lite URIs without the suffix or with a missing parent dir. The fix is creating the parent directory and using an absolute URI ending in .db. Use for Milvus Lite setups; not for server or cloud URIs.
TL;DR: Milvus Lite needs a URI ending in .db whose parent directory already exists. mkdir -p the parent, use an absolute path ending in .db, and the server starts.
Error: Milvus Lite URI must end with .db / parent directory does not existFix it
- Create the parent directory first:
mkdir -p [HOME]/...- Set the URI to an absolute path ending in
.db:
{
"env": {
"MILVUS_URI": "[HOME]/..."
}
}- Restart the MCP client.
Expected: the server starts with Milvus Lite. The first call creates the collection.
When to use this
- Using Milvus Lite (no server, no cloud) and the server fails at startup.
- The URI is relative or missing the
.dbsuffix.
When NOT to use this
MILVUS_URIpoints athttp://orhttps://. That is server/cloud mode; Lite rules do not apply.- Permission denied on an existing Lite path. That is filesystem permissions.
Compatibility
- zilliztech/mcp-server-milvus with Milvus Lite (pymilvus + milvus-lite).
- macOS and Linux. Windows cannot run Milvus Lite; connect to a remote deployment instead.
Why it happens
Milvus Lite is an embedded library, not a server, so the URI is really a filesystem path with conventions: the .db suffix tells pymilvus it is a Lite path, and the parent must exist because Lite will not create it. The naming is misleading since the path becomes a directory tree (collections/, databases/, LOCK), not one file.
Edge cases
- Do not point two processes at the same Lite path concurrently. Lite locking is not multi-process safe.
- Back up the whole directory tree, not just a file. The data spans several subdirectories.
- Milvus Lite ignores the database name setting (no named databases in Lite). Leave MILVUS_DB at default.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.