[BUG] MCP qdrant-store metadata parameter validation error - "Input should be a valid dictionary"
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: Claude CLI via WSL2
- Claude CLI version: 1.0.35 (Claude Code)
- Operating System: Windows 11 using WSL2 (Ubuntu 22.04)
- Terminal: VS Code Integrated Terminal (WSL Bash)
Bug Description
The MCP qdrant-store tool consistently fails when using the metadata parameter, regardless of the metadata format provided. The error indicates a parameter serialization issue where dictionary objects are converted to JSON strings before being passed to the MCP server, causing Pydantic validation failures.
Error message:
Error calling tool 'qdrant-store': 1 validation error for call[store]
metadata
Input should be a valid dictionary [type=dict_type, input_value='{"type": "test"}', input_type=str]
Steps to Reproduce
- Configure MCP Qdrant server in
.mcp.json:
``json``
{
"mcpServers": {
"qdrant": {
"command": "uvx",
"args": ["mcp-server-qdrant"],
"env": {
"QDRANT_LOCAL_PATH": "./qdrant_data",
"COLLECTION_NAME": "memories",
"EMBEDDING_MODEL": "sentence-transformers/all-MiniLM-L6-v2"
}
}
}
}
- Start Claude Code and verify MCP connection is working
- Test basic functionality (this works):
``javascript``
mcp__qdrant__qdrant-store({
information: "Test information without metadata"
})
- Attempt to use metadata parameter (this fails):
``javascript``
mcp__qdrant__qdrant-store({
information: "Test information",
metadata: {"type": "test"}
})
- Try various metadata formats - all fail:
- Simple:
{"type": "test"} - Official format:
{"code": "function() {}", "type": "javascript"} - Complex:
{"type": "session_summary", "project": "demo", "priority": "high"}
Expected Behavior
According to the official mcp-server-qdrant documentation, the metadata parameter should accept a Python dictionary with string keys. The documentation states:
The 'information' parameter should contain a natural language description of what the code does, while the actual code should be included in the 'metadata' parameter as a 'code' property.
The tool should successfully store information with structured metadata for enhanced search and filtering capabilities.
Actual Behavior
Any attempt to use the metadata parameter results in a Pydantic validation error. The error message shows that:
- Expected:
dict_type(Python dictionary) - Received:
input_type=str(JSON string) - Value:
'{"type": "test"}'(serialized string instead of native dict)
This suggests Claude Code's MCP integration is serializing dictionary parameters to JSON strings before sending them to the MCP server.
Additional Context
Working functionality (confirms MCP setup is correct):
- ✅
mcp__qdrant__qdrant-findworks perfectly - ✅
mcp__qdrant__qdrant-storewithinformationonly works - ✅ Qdrant database is operational (verified with
ls ./qdrant_data/)
Environment verification:
- Python 3.12.3
- uvx 0.7.14
- mcp-server-qdrant v0.8.0 (refreshed installation)
- WSL2 Ubuntu 22.04 on Windows 11
Why this issue likely went unnoticed:
Research shows that 90% of mcp-server-qdrant users only use the basic information parameter. Official tutorials and community examples rarely demonstrate complete metadata usage, making this an edge case that affects primarily advanced users who read the full documentation.
Current workaround:
Using structured text in the information parameter:
mcp__qdrant__qdrant-store({
information: "**Type**: session_summary\n**Project**: demo\n**Priority**: high\n\nDetailed content..."
})
Impact:
- Limits full functionality of Qdrant vector database integration
- Reduces search precision and semantic organization capabilities
- Creates discrepancy between documented features and actual functionality
This appears to be a systematic parameter serialization issue in Claude Code's MCP integration layer, specifically affecting dictionary/object type parameters.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗