Skip to main content

LlamaIndex reader for wigolo — local-first web search MCP server

Project description

wigolo-llamaindex

LlamaIndex reader for wigolo — a local-first web search MCP server for AI coding agents.

Installation

pip install wigolo-llamaindex

Requires wigolo to be available via npx:

npm install -g wigolo
# or use npx (default, no install needed)

Quick Start

Fetch URLs into Documents

from wigolo_llamaindex import WigoloMcpClient, WigoloWebReader

async def main():
    async with WigoloMcpClient() as client:
        reader = WigoloWebReader(client=client)
        docs = await reader.aload_data(urls=[
            "https://docs.python.org/3/library/asyncio.html",
            "https://docs.python.org/3/library/typing.html",
        ])
        for doc in docs:
            print(f"{doc.metadata['title']}: {len(doc.text)} chars")

Search and Load

from wigolo_llamaindex import WigoloMcpClient, WigoloSearchReader

async def main():
    async with WigoloMcpClient() as client:
        reader = WigoloSearchReader(
            client=client,
            max_results=5,
            include_domains=["docs.python.org"],
        )
        docs = await reader.aload_data(query="Python asyncio best practices")

Use in a RAG Pipeline

from llama_index.core import VectorStoreIndex
from wigolo_llamaindex import WigoloMcpClient, WigoloWebReader

async def build_index():
    async with WigoloMcpClient() as client:
        reader = WigoloWebReader(client=client)
        docs = await reader.aload_data(urls=[
            "https://react.dev/learn",
            "https://react.dev/reference/react",
        ])
        index = VectorStoreIndex.from_documents(docs)
        return index

Section Extraction

reader = WigoloWebReader(client=client, section="API Reference")
docs = await reader.aload_data(urls=["https://docs.example.com/api"])
# Only loads the "API Reference" section from each page

API Reference

WigoloMcpClient

Async MCP client that communicates with wigolo via subprocess.

  • command — executable (default: "npx")
  • args — arguments (default: ["wigolo"])
  • timeout — seconds (default: 30.0)
  • Supports async with context manager

WigoloWebReader

Fetches URLs and converts to Documents.

  • clientWigoloMcpClient instance
  • render_js — "auto", "always", "never" (default: "auto")
  • section — extract only a specific heading section
  • max_chars — cap content length
  • use_auth — use stored browser session

Methods:

  • load_data(urls: list[str]) -> list[Document]
  • aload_data(urls: list[str]) -> list[Document]
  • lazy_load_data(urls: list[str]) -> Iterator[Document]

WigoloSearchReader

Searches the web and converts results to Documents.

  • clientWigoloMcpClient instance
  • max_results — default 5
  • include_domains / exclude_domains — domain filters
  • category — "general", "code", "docs", "news", "papers"

Methods:

  • load_data(query: str) -> list[Document]
  • aload_data(query: str) -> list[Document]
  • lazy_load_data(query: str) -> Iterator[Document]

License

GNU AGPL-3.0-only — same license as the parent wigolo project. Full terms in the root LICENSE.

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

wigolo_llamaindex-0.2.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wigolo_llamaindex-0.2.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file wigolo_llamaindex-0.2.1.tar.gz.

File metadata

  • Download URL: wigolo_llamaindex-0.2.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for wigolo_llamaindex-0.2.1.tar.gz
Algorithm Hash digest
SHA256 14d4dc9f091e8d76d92fdb940effe3d9eed1ffe318f69883b2c13f7863ad276f
MD5 488f11150ef7b4042c0a13b07e1da5c9
BLAKE2b-256 a6b85e171a8d14a76d80681e9fae62ff1d700197ce7846bc97b2c194cb01eab6

See more details on using hashes here.

File details

Details for the file wigolo_llamaindex-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wigolo_llamaindex-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a6791ff1fc39ef232042aed815106407e152cddeaa08810a309eae5aa2fe315
MD5 3e15bfd41557a91dbdee66d2af681daf
BLAKE2b-256 bee24245ae46e14f3c21e288e5484faeeb5cd56dc3b8122d77f1c2314f30edf0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page