Skip to main content
Glama
tisDDM

SearXNG MCP Server

by tisDDM

SearXNG MCP 서버

AI 비서가 개인정보 보호 메타검색 엔진인 SearXNG를 사용하여 웹 검색을 수행할 수 있도록 하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. SearX.space 에서 무작위 인스턴스를 자동으로 선택하여 추가 배포 없이 바로 작동하며, 기본 인증을 사용하는 개인 인스턴스도 지원합니다.

특징

  • 제로 구성 설정 : SearX.space 의 임의의 공개 인스턴스를 사용하여 즉시 작동합니다.

  • 개인 인스턴스 지원 : 기본 인증 옵션을 사용하여 자신의 SearXNG 인스턴스에 연결합니다.

  • 사용자 정의 가능한 매개변수로 웹 검색 수행

  • 여러 검색 엔진 지원

  • 개인 정보 보호 중심 검색 결과

  • 마크다운 형식의 검색 결과

  • 모든 매개변수에 대한 합리적인 기본값

주의 - 이 목적을 위해 공용 인스턴스를 사용할 수 없고 "요청이 상태 코드 429로 실패했습니다"라는 메시지가 반환될 수 있습니다.

Related MCP server: OneSearch MCP Server

설치

필수 조건

  • Node.js(v16 이상)

  • npm(v7 이상)

  • SearXNG 인스턴스에 대한 액세스(자체 호스팅 또는 공개)

소스에서 설치

지엑스피1

구성

SearXNG MCP 서버는 다음 환경 변수로 구성할 수 있습니다.

  • SEARXNG_URL (선택 사항): SearXNG 인스턴스의 URL입니다(예: https://searx.example.com ). 이 값을 지정하지 않으면 SearX.space 에서 임의의 공개 인스턴스가 자동으로 선택되어 추가 배포 없이 서버를 사용할 수 있습니다.

  • USE_RANDOM_INSTANCE (선택 사항): URL이 제공되지 않을 때 무작위 인스턴스 선택을 비활성화하려면 "false"로 설정합니다. 기본값은 "true"입니다.

  • SEARXNG_USERNAME (선택 사항): 개인 인스턴스에 연결할 때 기본 인증을 위한 사용자 이름

  • SEARXNG_PASSWORD (선택 사항): 개인 인스턴스에 연결할 때 기본 인증을 위한 비밀번호

프로젝트의 루트 디렉토리에 있는 .env 파일에서 다음 환경 변수를 설정할 수 있습니다.

SEARXNG_URL=https://searx.example.com
SEARXNG_USERNAME=your_username
SEARXNG_PASSWORD=your_password

용법

서버 실행

# If installed globally
searxngmcp

# If installed from source
node build/index.js

Claude Desktop과 통합

  1. 클로드 데스크톱 열기

  2. 설정 > MCP 서버로 이동하세요

  3. 다음 구성으로 새로운 MCP 서버를 추가합니다.

    {
      "mcpServers": {
        "searxngmcp": {
          "command": "searxngmcp",
          "env": {
            // Optional: If not provided, a random public instance will be used
            "SEARXNG_URL": "https://searx.example.com",
            // Optional: Only needed for private instances with authentication
            "SEARXNG_USERNAME": "your_username",
            "SEARXNG_PASSWORD": "your_password"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }

VSCode에서 Claude와 통합하기

  1. VSCode 열기

  2. 설정 > 확장 프로그램 > Claude > MCP 설정으로 이동하세요.

  3. 다음 구성으로 새로운 MCP 서버를 추가합니다.

    {
      "mcpServers": {
        "searxngmcp": {
          "command": "node",
          "args": ["/path/to/searxng-mcp/build/index.js"],
          "env": {
            // Optional: If not provided, a random public instance will be used
            "SEARXNG_URL": "https://searx.example.com",
            // Optional: Only needed for private instances with authentication
            "SEARXNG_USERNAME": "your_username",
            "SEARXNG_PASSWORD": "your_password"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }

스몰렌제트와 함께 사용

SearXNG MCP는 AI 에이전트 구축을 위한 경량 프레임워크인 Smolagents와 쉽게 통합할 수 있습니다. 이를 통해 웹 검색 및 결과 처리를 지원하는 강력한 리서치 에이전트를 만들 수 있습니다.

from smolagents import CodeAgent, LiteLLMModel, ToolCollection
from mcp import StdioServerParameters

# Configure the SearXNG MCP server
server_parameters = StdioServerParameters(
    command="node",
    args=["path/to/searxng-mcp/build/index.js"],
    env={
        "SEARXNG_URL": "https://your-searxng-instance.com",
        "SEARXNG_USERNAME": "your_username",  # Optional
        "SEARXNG_PASSWORD": "your_password"   # Optional
    }
)

# Create a tool collection from the MCP server
with ToolCollection.from_mcp(server_parameters) as tool_collection:
    # Initialize your LLM model
    model = LiteLLMModel(
        model_id="your-model-id",
        api_key="your-api-key",
        temperature=0.7
    )
    
    # Create an agent with the search tools
    search_agent = CodeAgent(
        name="search_agent",
        tools=tool_collection.tools,
        model=model
    )
    
    # Run the agent with a search prompt
    result = search_agent.run(
        "Perform a search about: 'climate change solutions' and summarize the top 5 results."
    )
    
    print(result)

사용 가능한 도구

검색

개인정보를 보호하는 메타검색 엔진인 SearXNG를 사용하여 웹 검색을 수행하세요. 사용자 정의 가능한 매개변수를 사용하여 관련성 높은 웹 콘텐츠를 제공합니다.

매개변수

매개변수

유형

설명

기본

필수의

질문

끈

검색어

-

예

언어

끈

검색 결과에 대한 언어 코드(예: 'en', 'de', 'fr')

'en'

아니요

시간 범위

끈

검색 결과의 기간입니다. 옵션: '일', '주', '월', '년'

널

아니요

카테고리

문자열 배열

검색할 카테고리(예: '일반', '이미지', '뉴스')

널

아니요

엔진

문자열 배열

사용할 특정 검색 엔진

널

아니요

안전 검색

숫자

안전 검색 수준: 0(해제), 1(보통), 2(엄격)

1

아니요

페이지노

숫자

결과 페이지 번호입니다. 최소 1페이지 이상이어야 합니다.

1

아니요

최대 결과

숫자

반환할 최대 검색 결과 수입니다. 범위: 1~50

10

아니요

예

// Example request
const result = await client.callTool('searxngsearch', {
  query: 'climate change solutions',
  language: 'en',
  time_range: 'year',
  categories: ['general', 'news'],
  safesearch: 1,
  max_results: 5
});

개발

설정

# Clone the repository
git clone https://github.com/tisDDM/searxng-mcp.git
cd searxng-mcp

# Install dependencies
npm install

짓다

npm run build

시청 모드(개발용)

npm run watch

MCP Inspector로 테스트

npm run inspector

특허

MIT

Available Tools

1 tool
searxngsearchC

Perform web searches using SearXNG, a privacy-respecting metasearch engine. Returns relevant web content with customizable parameters.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoriesNoCategories to search in (e.g., 'general', 'images', 'news'). Default: null (all categories).
enginesNoSpecific search engines to use. Default: null (all available engines).
languageNoLanguage code for search results (e.g., 'en', 'de', 'fr'). Default: 'en'en
max_resultsNoMaximum number of search results to return. Range: 1-50. Default: 10.
pagenoNoPage number for results. Must be minimum 1. Default: 1.
queryYesSearch query
safesearchNoSafe search level: 0 (off), 1 (moderate), 2 (strict). Default: 1 (moderate).
time_rangeNoTime range for search results. Options: 'day', 'week', 'month', 'year'. Default: null (no time restriction).

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'privacy-respecting' and 'returns relevant web content,' but doesn't disclose key behavioral traits like rate limits, authentication needs, error handling, or what 'relevant' entails (e.g., ranking, source diversity). For a search tool with no annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, stating the core purpose in the first sentence. The second sentence adds useful context about returns and parameters without redundancy. It could be slightly more structured (e.g., bullet points), but it's efficient with zero waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (8 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and hints at behavior, but lacks details on output format, error cases, or operational constraints. Without annotations or output schema, more context would help the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 8 parameters. The description adds minimal value beyond the schema by mentioning 'customizable parameters' but doesn't provide additional semantics or context for parameter usage. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs web searches using SearXNG, specifying it's a privacy-respecting metasearch engine. It distinguishes the tool by mentioning its privacy focus and customizable parameters, though without siblings, differentiation isn't needed. However, it could be more specific about the exact verb and resource (e.g., 'search the web' rather than 'perform web searches').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It mentions 'customizable parameters' but doesn't explain when specific settings are appropriate. Without siblings, this is less critical, but it still lacks usage context for the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedsearxngsearch

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool's purpose is clearly defined as performing web searches using SearXNG, making it distinct by default.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'searxngsearch' follows a single pattern without any deviations or mixing of conventions.

Tool Count2/5

A single tool is too few for a server that appears to handle web searches, as it lacks operations for refining searches, managing results, or handling other aspects of a search engine's functionality. This feels thin and incomplete for the domain.

Completeness2/5

The tool surface is severely incomplete for a search engine server. It only provides a basic search function, with no tools for filtering results, handling pagination, accessing advanced search features, or managing search history, leading to significant gaps in coverage.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers