Skip to main content

基于MCP技术的SearXNG搜索引擎服务器

Project description

mcp_server_searXNG

基于MCP技术的网络搜索功能服务器,使用SearXNG搜索引擎实现隐私友好的网络搜索功能。

功能特点

此服务器提供以下主要功能:

  • 通过多个搜索引擎进行网络搜索
  • 支持多种搜索类别(一般、图片、新闻等)
  • 自定义搜索引擎选择
  • 语言筛选
  • 时间范围过滤
  • 搜索结果数量控制

可用工具

  • web_search - 使用SearXNG执行网络搜索
    • 必需参数:
      • query (string): 搜索查询内容
    • 可选参数:
      • categories (array): 搜索类别,例如 ['general', 'images', 'news']
      • engines (array): 搜索引擎,例如 ['google', 'bing', 'duckduckgo']
      • language (string): 搜索语言代码,默认为 "zh"
      • max_results (integer): 最大结果数量,默认为 10
      • time_range (string): 时间范围过滤 ('day', 'week', 'month', 'year')

安装方法

使用 pip 安装

# 安装
pip install mcp_server_searxng

# 获取最新版本
pip install --upgrade mcp_server_searxng

使用示例

配置为 MCP 服务

在您的 MCP 配置中添加:

"mcpServers": {
  "searxng": {
    "command": "python",
    "args": ["-m", "mcp_server_searxng", "--instance-url=https://your-searxng-instance.com"]
  }
}

调用示例

{
  "name": "web_search",
  "arguments": {
    "query": "气候变化研究",
    "categories": ["general"],
    "engines": ["google"],
    "language": "zh",
    "max_results": 15,
    "time_range": "month"
  }
}

调试

您可以使用 MCP inspector 来调试服务器:

npx @modelcontextprotocol/inspector python -m mcp_server_searxng

实际效果展示


基于我自己chat_mcp的测试

许可证

mcp_server_searXNG 使用 MIT 许可证。这意味着您可以自由使用、修改和分发此软件,但需遵守 MIT 许可证的条款和条件。详情请参阅项目仓库中的 LICENSE 文件。

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_searxng-0.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_searxng-0.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_searxng-0.2.tar.gz.

File metadata

  • Download URL: mcp_server_searxng-0.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for mcp_server_searxng-0.2.tar.gz
Algorithm Hash digest
SHA256 0ffbc9cf0c6f17a437fe20df01a5539afe6c2fd5c326bfdaec16c51a0336a1aa
MD5 203f58c90945fcef7463b80733372cd3
BLAKE2b-256 f4e4e153043ad8c1fe1ec525de1cf3ed21e66f03bffab8a85e8af11283d7c3e1

See more details on using hashes here.

File details

Details for the file mcp_server_searxng-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_searxng-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a5e2076a18830222d12935ba178e0aacb766a8d50a28fb859db977bde7ebb4e
MD5 483b5ec020dfe54a1f79daefd5e9a483
BLAKE2b-256 f77696bae35189de5d0de9261e4352de83a848c411c774d538194e6d845861b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page