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.0

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.0
File Size Uploaded Provenance Actions
wigolo_langchain-0.3.0.tar.gz 11.7 kB Without provenance Details for wigolo_langchain-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 21.4 kB

Release files / wigolo_langchain-0.3.0.tar.gz

Download URL wigolo_langchain-0.3.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a3cb26dc3db9cebdafaa03f7bdffee0554b84c2400edbbf7daf03d892cd8fd8f
BLAKE2b-256 checksum
How to use checksums
5ce866bfeca95a3737aa8eecd315928e9e12bb296651d21c6bed986fd6442111
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.0-py3-none-any.whl

Download URL wigolo_langchain-0.3.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80dfe5939eea011d88c5870f3b32149a998ddd0e21d04ad29cf1105d85ef7928
BLAKE2b-256 checksum
How to use checksums
3dc5a0a506f0b1ee0d35402dd20d69061452fd8f9232d36af39162107678a814
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.0

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