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 withcontext manager
WigoloWebReader
Fetches URLs and converts to Documents.
client—WigoloMcpClientinstancerender_js— "auto", "always", "never" (default: "auto")section— extract only a specific heading sectionmax_chars— cap content lengthuse_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.
client—WigoloMcpClientinstancemax_results— default 5include_domains/exclude_domains— domain filterscategory— "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
Release history Release notifications | RSS feed
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 wigolo_llamaindex-0.2.0.tar.gz.
File metadata
- Download URL: wigolo_llamaindex-0.2.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ffd2a03861409ce7bb78819499dd5e8fb11d9bd0acd4b0ba40f17eba8e4eceb
|
|
| MD5 |
e913da5e7bf7a7059408c0ab9848d15c
|
|
| BLAKE2b-256 |
fc1e78bdfdd95ef6d8206a43c0a8aa2b5fe4f5404ca3d7edb44c070b1e45a156
|
File details
Details for the file wigolo_llamaindex-0.2.0-py3-none-any.whl.
File metadata
- Download URL: wigolo_llamaindex-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfc1ff18a4cec1aa205c6fd30d80c833bf9aca66b320be6e10e77e7aab3bb948
|
|
| MD5 |
ecd922007068995a4bdb62fc911abdc2
|
|
| BLAKE2b-256 |
6fca5780bca2d0242bcc3b7b60c77139b2261bc3f5f50a94582ecc9b52d3578d
|