MCP server for Weaviate vector database
Project description
Weaviate MCP Server
Weaviate vector database integration for AI assistants via Model Context Protocol (MCP)
Developed and maintained by Arclio - Secure MCP service management for AI applications
🚀 Quick Start
Test the server immediately using the Model Context Protocol (MCP) Inspector, or install and run it directly.
Option 1: Instant Setup with MCP Inspector (Recommended for Testing)
# First, start a local Weaviate instance
docker-compose -f docker-compose.weaviate.yml up -d
# Then test with MCP Inspector
npx @modelcontextprotocol/inspector \
-e WEAVIATE_URL="localhost" \
-e WEAVIATE_HTTP_PORT="8080" \
-e WEAVIATE_GRPC_PORT="50051" \
-e WEAVIATE_OPENAI_API_KEY="your-openai-api-key" \
-- \
uvx --from weaviate-mcp weaviate-mcp
Replace your-openai-api-key with your actual OpenAI API key.
Option 2: Direct Installation & Usage
-
Install the package:
pip install weaviate-mcp
-
Set Environment Variables:
export WEAVIATE_URL="localhost" export WEAVIATE_HTTP_PORT="8080" export WEAVIATE_GRPC_PORT="50051" export WEAVIATE_OPENAI_API_KEY="your-openai-api-key"
-
Run the MCP Server:
python -m weaviate_mcp
Option 3: Using uvx (Run without full installation)
# Ensure WEAVIATE_* environment variables are set as shown above
uvx --from weaviate-mcp weaviate-mcp
📋 Overview
weaviate-mcp is a Python package that enables AI models to interact with Weaviate vector databases through the Model Context Protocol (MCP). It acts as a secure and standardized bridge, allowing AI assistants to leverage Weaviate's powerful vector search and storage capabilities without direct database credential exposure.
What is MCP?
The Model Context Protocol (MCP) provides a standardized interface for AI models to discover and utilize external tools and services. This package implements an MCP server that exposes Weaviate capabilities as discrete, callable "tools."
Key Benefits
- AI-Ready Integration: Purpose-built for AI assistants to naturally interact with vector databases.
- Standardized Protocol: Ensures seamless integration with MCP-compatible AI systems and hubs.
- Enhanced Security: Database credentials remain on the server, isolated from the AI models.
- Comprehensive Vector Operations: Offers semantic search, hybrid search, and full CRUD operations.
- Dynamic Schema Management: Create and manage collections on-the-fly without predefined schemas.
- Robust Error Handling: Provides consistent error patterns for reliable operation.
- Extensive Testing: Underpinned by a comprehensive test suite for correctness and stability.
🏗️ Prerequisites & Setup
Step 1: Weaviate Instance Setup
You need a running Weaviate instance. Choose one of these options:
Option A: Local Development with Docker (Recommended)
-
Download the Docker Compose file:
curl -O https://raw.githubusercontent.com/your-repo/arclio-mcp-tooling/main/docker-compose.weaviate.yml
-
Create environment file:
cp weaviate-mcp.env.example .env # Edit .env and add your OpenAI API key
-
Start Weaviate:
docker-compose -f docker-compose.weaviate.yml up -d
-
Verify Weaviate is running:
curl http://localhost:8080/v1/.well-known/ready
Option B: Weaviate Cloud Services (WCS)
- Sign up at Weaviate Cloud Services
- Create a new cluster
- Note your cluster URL and API key
- Set environment variables accordingly
Step 2: OpenAI API Key
This MCP server uses OpenAI's text embedding models for vectorization:
- Get your API key from OpenAI Platform
- Set the
WEAVIATE_OPENAI_API_KEYenvironment variable
⚙️ Configuration
Environment Variables
The MCP server requires the following environment variables:
# Essential connection settings
export WEAVIATE_URL="localhost" # Weaviate host (without http/https)
export WEAVIATE_HTTP_PORT="8080" # HTTP port
export WEAVIATE_GRPC_PORT="50051" # gRPC port (for better performance)
# Required for text vectorization
export WEAVIATE_OPENAI_API_KEY="your-api-key" # OpenAI API key
# Optional authentication (if your Weaviate instance requires it)
# export WEAVIATE_API_KEY="your-weaviate-api-key"
# export WEAVIATE_USERNAME="username"
# export WEAVIATE_PASSWORD="password"
# Optional performance settings
# export WEAVIATE_TIMEOUT="60" # Connection timeout in seconds
# export WEAVIATE_USE_SSL="false" # Use SSL/TLS connection
Configuration File
For persistent configuration, create a .env file:
# Copy the example file
cp weaviate-mcp.env.example .env
# Edit with your actual values
nano .env
🛠️ Exposed Capabilities (Tools)
This package exposes comprehensive tools for AI interaction with Weaviate.
Collection Management Tools
weaviate_create_collection: Create new collections with custom schemasweaviate_delete_collection: Delete existing collectionsweaviate_get_schema: Retrieve current database schema
Data Management Tools
weaviate_insert_object: Insert single objects with duplicate checkingweaviate_batch_insert_objects: Batch insert multiple objects efficientlyweaviate_get_object: Retrieve objects by UUIDweaviate_get_objects: Query multiple objects with filtering and paginationweaviate_update_object: Update existing objectsweaviate_delete_object: Delete objects by UUID
Search & Query Tools
weaviate_vector_search: Semantic vector search using embeddingsweaviate_hybrid_search: Combined semantic and keyword search
Analytics & Schema Tools
weaviate_aggregate: Perform aggregation operationsweaviate_get_schema_info: Get detailed schema information with statisticsweaviate_validate_collection_exists: Check if a collection existsweaviate_get_collection_stats: Get statistics for a specific collection
🔍 Troubleshooting
Connection Issues
-
"Connection refused": Ensure Weaviate is running on the specified host and port
curl http://localhost:8080/v1/.well-known/ready -
"Authentication failed": Check your Weaviate credentials and API keys
-
"SSL/TLS errors": Verify
WEAVIATE_USE_SSLsetting matches your Weaviate configuration
OpenAI Integration Issues
- "Invalid API key": Verify your
WEAVIATE_OPENAI_API_KEYis correct and active - "Rate limit exceeded": OpenAI API has usage limits; check your quota
MCP Server Issues
- "Tool not found": Verify the tool name matches exactly (case-sensitive)
- "Invalid arguments": Check the tool's parameter requirements and types
- "Server not responding": Check server logs for error messages
For detailed debugging, inspect the server's stdout/stderr logs.
📝 Contributing
Contributions are welcome! Please refer to the main README.md in the arclio-mcp-tooling monorepo for guidelines on contributing, setting up the development environment, and project-wide commands.
📄 License
This package is licensed under the MIT License. See the LICENSE file in the monorepo root for full details.
🏢 About Arclio
Arclio provides secure and robust Model Context Protocol (MCP) solutions, enabling AI applications to safely and effectively interact with enterprise systems and external services.
Built with ❤️ by the Arclio team
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weaviate_mcp-0.1.0.tar.gz.
File metadata
- Download URL: weaviate_mcp-0.1.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e321ee2dbf7f73c83ddeccfeefc23b2a2217d6ec2ae5d6126bef8d8fafbf3784
|
|
| MD5 |
285a5e1d14fa9e9785bf94521110df28
|
|
| BLAKE2b-256 |
2b4fcb6004d9fcc0df3c897bece37bb8a69b3fca6b5fce708a888910e3763e9b
|
File details
Details for the file weaviate_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: weaviate_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5c1330a25167a4a5be4b814fc7ff24d2733df9873eec26021ca9e14243fc7ef
|
|
| MD5 |
b1a64d737cc500f4755617a2668c040a
|
|
| BLAKE2b-256 |
0c0b5ffcd26a83b6643a842b5f1a2e5d28778681629064440676468a9ed0b2ce
|