trackmcp
Back to directory
joao-santillo

web-search-mcp-server

View on GitHub

Servidor MCP que busca documentação mais atualizada de tools

0 stars PythonAI & Machine Learning Updated May 3, 2025

Documentation

Web Search MCP Server with ChromaDB Vector Database

This MCP server provides tools for web search and vector database functionality using LangChain and ChromaDB.

Features

  • 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

1. Install dependencies:

bash
pip install -e .
# or
uv pip install -e .

2. Create a `.env` file with the following variables:

code
# 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

3. Run the server:

bash
python main.py

Available Tools

  • `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 ChromaDB
  • `search_vectordb(query: str, top_k: int, filter_criteria: Optional[Dict[str, Any]])`: Search the vector database
  • `delete_document_from_vectordb(document_id: str)`: Delete a document by ID
  • `batch_add_documents_to_vectordb(documents: List[Dict[str, Any]])`: Add multiple documents in a batch
  • `create_retriever(search_type: str, search_kwargs: Optional[Dict[str, Any]])`: Create a retriever for the vector database

Example Usage

python
# 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 .` and `isort .`
  • Lint code: `ruff check .`
  • Type check: `mypy .`

Frequently asked questions

What is web-search-mcp-server?

web-search-mcp-server is Servidor MCP que busca documentação mais atualizada de tools

How do I install web-search-mcp-server?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is web-search-mcp-server open source?

Yes — it is hosted on GitHub at https://github.com/joao-santillo/web-search-mcp-server.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP