Skip to main content

wigolo-langchain

LangChain integration for wigolo — a local-first web search MCP server for AI coding agents.

Installation

pip install wigolo-langchain

Requires wigolo to be available via npx:

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

Quick Start

As a Retriever

from wigolo_langchain import WigoloMcpClient, WigoloSearchRetriever

async def main():
    async with WigoloMcpClient() as client:
        retriever = WigoloSearchRetriever(
            client=client,
            max_results=5,
            include_domains=["docs.python.org"],
        )
        docs = await retriever.ainvoke("Python asyncio tutorial")
        for doc in docs:
            print(doc.metadata["title"], doc.metadata["url"])

As LangChain Tools (for Agents)

from wigolo_langchain import WigoloMcpClient, WigoloSearchTool, WigoloFetchTool

async def main():
    async with WigoloMcpClient() as client:
        search = WigoloSearchTool(client=client)
        fetch = WigoloFetchTool(client=client)

        # Use in a LangChain agent
        tools = [search, fetch]

Custom MCP Server Command

# Use a local development build instead of npx
client = WigoloMcpClient(command="node", args=["./dist/index.js"])

API Reference

WigoloMcpClient

Async MCP client that communicates with wigolo via subprocess.

  • command — executable to run (default: "npx")
  • args — arguments (default: ["wigolo"])
  • timeout — request timeout in seconds (default: 30.0)
  • connect() / disconnect() — lifecycle management
  • call_tool(name, arguments) — invoke any wigolo MCP tool
  • Supports async with context manager

WigoloSearchRetriever

LangChain BaseRetriever that searches via wigolo.

  • client — WigoloMcpClient instance
  • max_results — max search results (default: 5)
  • include_domains — domain whitelist
  • category — "general", "code", "docs", "news", "papers"

WigoloSearchTool / WigoloFetchTool

LangChain BaseTool wrappers for wigolo search and fetch.

  • Accept the same parameters as the wigolo MCP tools
  • Return JSON strings (for agent consumption)
  • Handle errors gracefully (return error JSON instead of raising)

License

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

Metadata

Release files for wigolo-langchain 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wigolo-langchain 0.3.1
File Size Uploaded Provenance Actions
wigolo_langchain-0.3.1.tar.gz 11.7 kB Without provenance Details for wigolo_langchain-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wigolo-langchain 0.3.1
File Interpreter ABI Platform Actions
wigolo_langchain-0.3.1-py3-none-any.whl Python 3 none any Details for wigolo_langchain-0.3.1-py3-none-any.whl

Total release size: 21.4 kB

Release files / wigolo_langchain-0.3.1.tar.gz

Download URL wigolo_langchain-0.3.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
391a71c17170d33f6b8e295f4c44e95de18a2ca1cea20f16e4079be44614e3e7
BLAKE2b-256 checksum
How to use checksums
cea84a4b6a4f883ada93bd1ae6572e2d1e40f4787b29dda3f010f81a67421547
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / wigolo_langchain-0.3.1-py3-none-any.whl

Download URL wigolo_langchain-0.3.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96e09a0adba6aea6b675629791ae31c4fb38aae6ac600cc1a72f2357da397868
BLAKE2b-256 checksum
How to use checksums
c1a092792f9fff7361d782a17340072bad1d7c27df6c555d03b40d0c7b8ad745
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for wigolo-langchain 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page