Skip to main content

通用 AI 搜索 MCP 服务器,支持任何兼容 OpenAI API 格式的 AI 模型

Project description

AI Search MCP Server

PyPI version Python versions License

通用 AI 搜索 MCP 服务器,支持任何兼容 OpenAI API 格式的 AI 模型进行联网搜索。

特性

  • 支持任何 OpenAI API 兼容的模型
  • 支持流式和非流式响应
  • 自动过滤 AI 思考内容
  • 完全可配置
  • Windows 平台完美支持中文显示

安装

# 使用 uvx(推荐)
uvx ai-search-mcp

# 或使用 pip
pip install ai-search-mcp

更新

# 使用 pip 更新
pip install --upgrade ai-search-mcp

# 使用 uvx 会自动使用最新版本
uvx ai-search-mcp

卸载

# 使用 pip 卸载
pip uninstall ai-search-mcp

# uvx 不需要卸载,每次运行都是独立环境

快速开始

Kiro IDE

编辑 .kiro/settings/mcp.json:

{
  "mcpServers": {
    "ai-search": {
      "command": "uvx",
      "args": ["ai-search-mcp"],
      "env": {
        "AI_API_URL": "http://localhost:10000",
        "AI_API_KEY": "your-api-key",
        "AI_MODEL_ID": "Grok"
      }
    }
  }
}

Claude Desktop

编辑 claude_desktop_config.json:

{
  "mcpServers": {
    "ai-search": {
      "command": "uvx",
      "args": ["ai-search-mcp"],
      "env": {
        "AI_API_URL": "http://localhost:10000",
        "AI_API_KEY": "your-api-key",
        "AI_MODEL_ID": "Grok"
      }
    }
  }
}

配置

必需环境变量

变量 说明
AI_API_URL AI API 地址
AI_API_KEY API 密钥
AI_MODEL_ID 模型 ID

可选环境变量

变量 默认值 说明
AI_TIMEOUT 60 超时时间(秒),复杂查询建议设为 120
AI_STREAM true 流式响应
AI_FILTER_THINKING true 过滤思考内容

超时配置建议

如果遇到复杂查询超时,可以增加超时时间:

{
  "mcpServers": {
    "ai-search": {
      "command": "uvx",
      "args": ["ai-search-mcp"],
      "env": {
        "AI_API_URL": "http://localhost:10000",
        "AI_API_KEY": "your-api-key",
        "AI_MODEL_ID": "Grok",
        "AI_TIMEOUT": "120"
      }
    }
  }
}

支持的服务

任何兼容 OpenAI API 格式的服务都可以使用,例如:

  • Grok(本地部署)
  • OpenAI(GPT-4、GPT-3.5)
  • 本地模型(Ollama、LM Studio)
  • 其他兼容服务

命令行工具

# 查看版本
ai-search-mcp --version

# 验证配置
ai-search-mcp --validate-config

开发

git clone https://github.com/lianwusuoai/ai-search-mcp.git
cd ai-search-mcp
pip install -e .

许可证

MIT License

链接

Project details


Download files

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

Source Distribution

ai_search_mcp-1.0.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

ai_search_mcp-1.0.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file ai_search_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: ai_search_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ai_search_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3bd115559b1077189945e783fd6b4a20863ef11ca538803aa7ed7fcbb39f0418
MD5 fec52ea1d53aef0d605d60d6ae63af27
BLAKE2b-256 decd5c51fe4b9b554ef3bea7039c1bcf3fab68aa54fca54ed5d8440b2f459693

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_search_mcp-1.0.0.tar.gz:

Publisher: publish.yml on lianwusuoai/ai-search-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_search_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ai_search_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ai_search_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90d640e1661d2b6cc0c92279c053dcd3a69def67ddefac47a68029eca34e4f35
MD5 406176fefc8c3b070574f6943e45c32f
BLAKE2b-256 91f0bc91c6f80cae4be8bd7f147950977ece7e206c6b067800a93e38b756a75b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_search_mcp-1.0.0-py3-none-any.whl:

Publisher: publish.yml on lianwusuoai/ai-search-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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