-
Notifications
You must be signed in to change notification settings - Fork 471
Description
SInce claude code gives the issue below:
❯ /mcp
⎿ Failed to reconnect to claude-context.
I have tried to start the mcp server locally.
npx @zilliz/claude-context-mcp@latest
And I ended up with the error below:
[Bug] Milvus address resolution fails: “Address is required and could not be resolved from token”
Summary
Starting the Claude Context MCP server crashes when initializing MilvusVectorDatabase with a Zilliz Cloud token, with the error: “Address is required and could not be resolved from token.” Supplying MILVUS_ADDRESS manually fixes the crash, but the auto-resolution from MILVUS_TOKEN appears broken or undocumented for Claude Code MCP setups.
Environment
- Client: Claude Code (CLI) on macOS
- MCP server: @zilliz/claude-context-mcp@latest (via npx)
- Core: @zilliz/claude-context-core (transitive)
- Node: v20.x
- OS: macOS (Apple Silicon)
- Zilliz Cloud: Personal API key (cluster reachable via public endpoint)
- Embeddings: OpenAI (OPENAI_API_KEY set)
Steps to Reproduce
- Add MCP server to Claude Code using only OPENAI_API_KEY and MILVUS_TOKEN as per quick start:
claude mcp add claude-context -e OPENAI_API_KEY=sk-xxx -e MILVUS_TOKEN=zzz -- npx @zilliz/claude-context-mcp@latest - Start MCP server (or reconnect from Claude Code).
- Observe crash during MilvusVectorDatabase initialization.
Observed Logs / Stack Trace
[LOG] MCP server started and listening on stdio.
[LOG] [SYNC-DEBUG] Server connection established successfully
…
Error: Address is required and could not be resolved from token
at MilvusVectorDatabase.resolveAddress (.../milvus-vectordb.js:39:19)
at MilvusVectorDatabase.initialize (.../milvus-vectordb.js:14:44)
at new MilvusVectorDatabase (.../milvus-vectordb.js:11:43)
at new ContextMcpServer (.../claude-context-mcp/dist/index.js:41:32)
at main (.../claude-context-mcp/dist/index.js:240:20)
Expected Behavior
- If MILVUS_TOKEN is provided, MCP should resolve the cluster address automatically (if supported), or
- Documentation should require MILVUS_ADDRESS explicitly and the code should surface a clear configuration error rather than hard-crashing.
Workaround
Launching MCP with explicit MILVUS_ADDRESS allows successful startup:
MILVUS_ADDRESS=https://
MILVUS_TOKEN=
OPENAI_API_KEY=sk-xxx
npx @zilliz/claude-context-mcp@latest
Notes
- GitHub README examples for several MCP clients (Cursor, Gemini, etc.) include MILVUS_ADDRESS, but the Claude Code quick-start does not. This discrepancy likely contributes to misconfiguration.
- If auto-resolution from token is intended, perhaps the code path is failing to read cluster metadata from Zilliz Cloud or requires an additional env (region/base URL).
- A better error message and/or default to require MILVUS_ADDRESS would improve UX.
Requests
- Clarify whether MILVUS_ADDRESS is mandatory in all clients.
- Update the Claude Code quick-start to include MILVUS_ADDRESS (to match other client examples).
- Consider catching this initialization error and returning a configuration hint rather than throwing.
- If auto-resolution is supported, document required envs and fix resolveAddress to handle common token formats.
Thanks!