searxng-search

Public

Forked from rzk/searxng-search

99 Downloads

README

SearXNG Search Plugin for LM Studio

This plugin enables LM Studio assistants to search the web using a local SearXNG instance, providing privacy-focused metasearch capabilities similar to how Vane (Perplexica) utilizes SearXNG.

Prerequisites

  • Running SearXNG Instance: You must have SearXNG installed and running locally (e.g. at http://localhost:8081 to prevent possible conflicts with other services)

  • JSON API Enabled: Ensure your SearXNG settings.yml includes:

    search:
      formats:
        - html
        - json
    

Installation

  • Download this plugin from LM Studio Hub or install manually
  • Configure the plugin settings in LM Studio:
    • SearXNG URL: Your instance URL (default: http://localhost:8081) (if a different port is used, update "config.ts" accordingly. Note that current port setting is "8081" to prevent possible conflicts with other services)
    • Default Results Count: How many results to return per query (1-20)
    • Timeout: Request timeout in milliseconds

Usage

Once installed, the plugin provides two tools:

  • search_web: Search the internet using SearXNG
  • fetch_page_content: Retrieve and extract text from specific URLs

The assistant will automatically invoke these tools when web search is needed.

Project Structure

lms-plugin-searxng/
├── manifest.json
├── package.json
├── tsconfig.json
├── README.md
└── src/
    ├── index.ts
    ├── config.ts
    └── toolsProvider.ts

Troubleshooting

  • "JSON format not enabled": Ensure your SearXNG settings.yml includes json in search formats
  • Connection timeouts: Verify SearXNG is running and accessible at the configured URL
  • No results: Check that SearXNG has search engines enabled in its configuration

Comparison with Existing Solutions

Unlike the DuckDuckGo plugin which relies on DuckDuckGo's HTML scraping, this SearXNG implementation offers:

  • Privacy control: Data never leaves your infrastructure (when using local SearXNG)
  • Customizable sources: SearXNG aggregates 70+ search engines configurable by the user
  • No rate limits: Local instances aren't subject to external API quotas
  • Metadata richness: Access to result scores and source engine attribution

License

MIT