Skip to main content
Glama
Lynxe-public

Bing CN MCP Enhanced

by Lynxe-public

Bing CN MCP

一个基于 MCP (Model Context Protocol) 的中文必应搜索工具,可以直接通过 Claude 或其他支持 MCP 的 AI 来搜索必应并获取网页内容。

特点

  • 支持中文搜索结果

  • 无需 API 密钥,直接爬取必应搜索结果

  • 提供网页内容获取功能

  • 轻量级,易于安装和使用

  • 专为中文用户优化

  • 支持 Claude 等 AI 工具调用

安装

全局安装

npm install -g bing-cn-mcp-enhanced

或者直接通过 npx 运行

npx bing-cn-mcp-enhanced

使用方法

启动服务器

bing-cn-mcp-enhanced

或者使用 npx:

npx bing-cn-mcp-enhanced

在支持 MCP 的环境中使用

在支持 MCP 的环境(如 Cursor)中,配置 MCP 服务器来使用它:

  1. 找到 MCP 配置文件(例如 .cursor/mcp.json

  2. 添加服务器配置:

{
  "mcpServers": {
    "EnhancedBing": {
      "command": "npx",
      "args": [
        "bing-cn-mcp-enhanced"
      ]
    }
  }
}

Windows用户的配置

{
  "mcpServers": {
    "EnhancedBing": {
        "command": "cmd",
        "args": [
          "/c",
          "npx",
          "bing-cn-mcp-enhanced"
      ]
    }
  }
}
  1. 现在你可以在 Claude 中使用 mcp__bing_searchmcp__fetch_webpage 工具了

查看日志

MCP 服务器的日志输出到 stderr。如果你想将日志保存到文件以便查看,可以通过修改 MCP 配置来实现:

macOS/Linux 用户

方案 1:将日志保存到文件

{
  "mcpServers": {
    "EnhancedBing": {
      "command": "sh",
      "args": [
        "-c",
        "npx bing-cn-mcp-enhanced 2>> ~/.mcp-logs/bing-cn-mcp-enhanced.log"
      ]
    }
  }
}

方案 2:同时输出到终端和文件(使用 tee)

{
  "mcpServers": {
    "EnhancedBing": {
      "command": "sh",
      "args": [
        "-c",
        "npx bing-cn-mcp-enhanced 2>&1 | tee -a ~/.mcp-logs/bing-cn-mcp-enhanced.log >&2"
      ]
    }
  }
}

{ "mcpServers": { "EnhancedBing": { "args": [ "bing-cn-mcp-enhanced" ], "command": "npx" } } } 方案 3:按日期创建日志文件

{
  "mcpServers": {
    "EnhancedBing": {
      "command": "sh",
      "args": [
        "-c",
        "mkdir -p ~/.mcp-logs && npx bing-cn-mcp-enhanced 2>> ~/.mcp-logs/bing-cn-mcp-enhanced-$(date +%Y-%m-%d).log"
      ]
    }
  }
}

Windows 用户

方案 1:将日志保存到文件

{
  "mcpServers": {
    "bingcn": {
      "command": "cmd",
      "args": [
        "/c",
        "npx bing-cn-mcp-enhanced 2>> %USERPROFILE%\\.mcp-logs\\bing-cn-mcp-enhanced.log"
      ]
    }
  }
}

方案 2:使用 PowerShell(推荐)

{
  "mcpServers": {
    "bingcn": {
      "command": "powershell",
      "args": [
        "-Command",
        "$logDir = Join-Path $env:USERPROFILE '.mcp-logs'; if (-not (Test-Path $logDir)) { New-Item -ItemType Directory -Path $logDir | Out-Null }; $logFile = Join-Path $logDir 'bing-cn-mcp-enhanced.log'; npx bing-cn-mcp-enhanced 2>&1 | Tee-Object -FilePath $logFile -Append"
      ]
    }
  }
}

查看日志文件

  • macOS/Linux: ~/.mcp-logs/bing-cn-mcp-enhanced.log~/.mcp-logs/bing-cn-mcp-enhanced-YYYY-MM-DD.log

  • Windows: %USERPROFILE%\.mcp-logs\bing-cn-mcp-enhanced.log

你可以使用以下命令实时查看日志:

# macOS/Linux
tail -f ~/.mcp-logs/bing-cn-mcp-enhanced.log

# Windows (PowerShell)
Get-Content %USERPROFILE%\.mcp-logs\bing-cn-mcp-enhanced.log -Wait -Tail 50

支持的工具

搜索必应并获取结果列表。

参数:

  • query: 搜索关键词

  • num_results: 返回结果数量(默认为 5)

fetch_webpage

根据搜索结果 ID 获取对应网页的内容。

参数:

  • result_id: 从 bing_search 返回的结果 ID

自定义配置

你可以通过创建 .env 文件来自定义配置,例如:

# 用户代理设置
USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

注意事项

  • 某些网站可能有反爬虫措施,导致 fetch_webpage 无法获取内容

  • 本工具仅供学习和研究使用,请勿用于商业目的

  • 请遵守必应的使用条款和相关法律法规

作者

Lynxe

许可证

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lynxe-public/bing-mcp-cn-enhanced'

If you have feedback or need assistance with the MCP directory API, please join our Discord server