Web Search MCP Server with ChromaDB Vector Database
LocalAbout Web Search MCP Server with ChromaDB Vector Database
An MCP server combining web search with a ChromaDB vector database, for developers who need library documentation lookup or vector-document operations. It supports semantic search, metadata filtering, and batch operations.
Key features
- 01Search popular library documentation
- 02Extract web page content
- 03Store and retrieve ChromaDB documents
- 04Semantic similarity search
- 05Metadata filtering and batch operations
Use cases
- 01Look up LangChain, LlamaIndex, or OpenAI docs
- 02Add and search documents in a vector database
- 03Filter vector search results by metadata
MCP support
The MCP server exposes web documentation search and ChromaDB tools for storing, searching, and deleting documents, as well as creating retrievers.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEWeb Search MCP Server with ChromaDB Vector Database
This MCP server provides tools for web search and vector database functionality using LangChain and ChromaDB.
Features
Web Search
- Search documentation for popular libraries (LangChain, LlamaIndex, OpenAI)
- Extract content from web pages
Vector Database (ChromaDB)
- Store and retrieve documents with vector embeddings
- Perform semantic similarity search
- Filter documents based on metadata
- Batch operations for efficiency
Setup
- Install dependencies:
pip install -e .
# or
uv pip install -e .
- Create a
.envfile with the following variables:
# Serper API for web search
USER_AGENT=Mozilla/5.0
SERPER_API_URL=https://google.serper.dev/search
SERPER_API_KEY=your_serper_api_key
# ChromaDB configuration
CHROMA_PERSIST_DIRECTORY=./chroma_db
EMBEDDING_MODEL_NAME=sentence-transformers/all-MiniLM-L6-v2
# Transport mode (stdio or sse)
TRANSPORT=stdio
- Run the server:
python main.py
Available Tools
Web Search
get_docs(query: str, library: str): Search documentation for specified libraries
Vector Database (ChromaDB)
add_document_to_vectordb(content: str, metadata: Optional[Dict[str, Any]]): Add a single document to ChromaDBsearch_vectordb(query: str, top_k: int, filter_criteria: Optional[Dict[str, Any]]): Search the vector databasedelete_document_from_vectordb(document_id: str): Delete a document by IDbatch_add_documents_to_vectordb(documents: List[Dict[str, Any]]): Add multiple documents in a batchcreate_retriever(search_type: str, search_kwargs: Optional[Dict[str, Any]]): Create a retriever for the vector database
Example Usage
# Add a document to the vector database
doc_id = await add_document_to_vectordb(
content="This is a sample document about ChromaDB vector databases.",
metadata={"source": "example", "category": "vector_db"}
)
# Search for similar documents
results = await search_vectordb(
query="How do vector databases work?",
top_k=2,
filter_criteria={"category": "vector_db"}
)
# Delete a document
status = await delete_document_from_vectordb(document_id=doc_id)
# Add multiple documents at once
doc_ids = await batch_add_documents_to_vectordb([
{
"content": "Document 1 content",
"metadata": {"source": "example", "category": "general"}
},
{
"content": "Document 2 content",
"metadata": {"source": "example", "category": "specific"}
}
])
Development
- Format code:
black .andisort . - Lint code:
ruff check . - Type check:
mypy .
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.