MCP server for Weaviate vector search
## Weaviate Vector Database MCP Server: AI-Native Database The **Weaviate MCP Server** integrates Weaviate vector database into Google Antigravity, enabling semantic search, hybrid queries, and AI model integration directly from your development environment. ### Why Weaviate MCP? - **Vector Search**: Semantic similarity search at scale - **Hybrid Search**: Combine vector and keyword search - **ML Integration**: Built-in vectorization modules - **GraphQL API**: Flexible query interface - **Multi-Modal**: Text, images, and custom vectors ### Key Features #### 1. Semantic Search ```python # Vector similarity search result = await mcp.query( class_name="Document", near_text="machine learning applications in healthcare", limit=10, return_properties=["title", "content", "category"] ) for obj in result["data"]["Get"]["Document"]: print(f"Document: {obj['title']} - Distance: {obj['_additional']['distance']}") # Hybrid search result = await mcp.hybrid_search( class_name="Product", query="gaming laptop", alpha=0.5, # Balance between vector and keyword limit=20 ) ``` #### 2. Object Operations ```python # Create object with auto-vectorization obj = await mcp.create_object( class_name="Article", properties={ "title": "Introduction to Neural Networks", "content": "Neural networks are...", "category": "AI" } ) # Create with custom vector await mcp.create_object( class_name="Article", properties={"title": "Custom Vector Article"}, vector=[0.1, 0.2, 0.3, ...] # Your embedding ) # Batch import await mcp.batch_create( class_name="Article", objects=[ {"properties": {"title": "Article 1", "content": "..."}}, {"properties": {"title": "Article 2", "content": "..."}} ] ) ``` #### 3. Schema Management ```python # Create class with vectorizer await mcp.create_class({ "class": "Product", "vectorizer": "text2vec-openai", "moduleConfig": { "text2vec-openai": {"model": "text-embedding-ada-002"} }, "properties": [ {"name": "name", "dataType": ["text"]}, {"name": "description", "dataType": ["text"]}, {"name": "price", "dataType": ["number"]} ] }) # Get schema schema = await mcp.get_schema() ``` #### 4. Aggregations ```python # Aggregate with filters result = await mcp.aggregate( class_name="Product", group_by="category", aggregations=[ {"property": "price", "type": "mean"}, {"property": "price", "type": "count"} ], where={"path": ["inStock"], "operator": "Equal", "valueBoolean": True} ) ``` ### Configuration ```json { "mcpServers": { "weaviate": { "command": "npx", "args": ["-y", "@anthropic/mcp-weaviate"], "env": { "WEAVIATE_URL": "http://localhost:8080", "WEAVIATE_API_KEY": "your-api-key", "OPENAI_API_KEY": "your-openai-key" } } } } ``` ### Use Cases **Semantic Search**: Build intelligent search engines. **Recommendation Systems**: Content and product recommendations. **RAG Applications**: Retrieval-augmented generation. **Image Search**: Visual similarity search. The Weaviate MCP enables vector search within your development environment.
{
"mcpServers": {
"weaviate": {
"mcpServers": {
"weaviate": {
"env": {
"WEAVIATE_URL": "http://localhost:8080",
"WEAVIATE_API_KEY": "YOUR_API_KEY"
},
"args": [
"-y",
"@anthropic/mcp-server-weaviate"
],
"command": "npx"
}
}
}
}
}