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

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

Built distribution (wheel)

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

Total release size: 21.5 kB

Release files / wigolo_langchain-0.3.5.tar.gz

Download URL wigolo_langchain-0.3.5.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fdfbde13c2f3117424d2c2193f82a977e2a4be1ff14bdfb23284b39f28014af0
BLAKE2b-256 checksum
How to use checksums
0f82f0bc04ac490aaba482b1fa23c8aedeafd85d349fbeec793dcae6d5872e47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

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

Security for wigolo-langchain 0.3.5

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