A Chinese Microsoft Bing search tool based on the MCP (Model Context Protocol). It can directly search Bing and fetch web content through AI tools like Claude or others that support MCP.

Features

  • Supports Chinese search results
  • No API key required, directly scrapes Bing search results
  • Provides webpage content fetching functionality
  • Lightweight, easy to install and use
  • Optimized for Chinese users
  • Supports invocation by AI tools such as Claude

Installation

Global Installation

npm install -g bing-cn-mcp

Or run directly using npx

npx bing-cn-mcp

Usage

Start the server

bing-cn-mcp

Or use npx:

npx bing-cn-mcp

Use in an MCP-supported environment

In environments that support MCP (such as Cursor), configure the MCP server to utilize it:

  1. Locate your MCP configuration file (e.g., .cursor/mcp.json)
  2. Add the server configuration:
{
  "mcpServers": {
    "bingcn": {
      "command": "npx",
      "args": [
        "bing-cn-mcp"
      ]
    }
  }
}

For Windows users:

{
  "mcpServers": {
    "bingcnmcp": {
        "command": "cmd",
        "args": [
          "/c",
          "npx",
          "bing-cn-mcp"
      ]
    }
  }
}
  1. Now you can use the mcp__bing_search and mcp__fetch_webpage tools within Claude

Supported Tools

Searches Bing and retrieves a list of results.

Parameters: - query: Search keyword(s) - num_results: Number of results to return (default is 5)

fetch_webpage

Fetches the content of a specific webpage based on the result ID from bing_search.

Parameters: - result_id: The result ID returned from bing_search

Custom Configuration

You can customize settings by creating a .env file, for example:

# User agent setting
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

Notes

  • Some websites may employ anti-scraping measures, which could prevent fetch_webpage from retrieving content
  • This tool is intended for learning and research purposes only, not for commercial use
  • Please comply with Bing’s terms of service and all applicable laws and regulations

Author

slcatwujian

License

MIT

[
  {
    "description": "使用必应搜索指定的关键词,并返回搜索结果列表,包括标题、链接、摘要和ID",
    "inputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "additionalProperties": false,
      "properties": {
        "num_results": {
          "default": 5,
          "description": "返回的结果数量,默认为5",
          "type": "number"
        },
        "query": {
          "description": "搜索关键词",
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "name": "bing_search"
  },
  {
    "description": "根据提供的ID获取对应网页的内容",
    "inputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "additionalProperties": false,
      "properties": {
        "result_id": {
          "description": "从bing_search返回的结果ID",
          "type": "string"
        }
      },
      "required": [
        "result_id"
      ],
      "type": "object"
    },
    "name": "fetch_webpage"
  }
]