Skip to main content

bing-search-mcp-wx

A Model Context Protocol (MCP) server implementation for Bing web search with UTF-8 support. This package provides a simple interface to perform Bing web searches through MCP tools.

Installation

Install using pip:

pip install bing-search-mcp-wx

Requires Python 3.10 or higher.

Configuration

The package requires a Bing API key to function. You can configure it in two ways:

  1. Environment variable: Create a .env file with:

    BING_API_KEY=your-api-key-here
    
  2. Programmatically:

    from bing_search_mcp_wx.server import initialize_mcp
    
    initialize_mcp("your-api-key-here")
    

Usage

Basic usage example:

from bing_search_mcp_wx.server import initialize_mcp, bing_search

# Initialize with your API key
initialize_mcp("your-api-key-here")

# Perform a basic search
results = bing_search("query")

# Search with custom result count
results = bing_search("query", result_count=5)

API Reference

initialize_mcp(apiKey: str)

Initialize the MCP server with the Bing API key.

  • Parameters:
    • apiKey (str): The Bing API key

bing_search(query: str, result_count: int = 10) -> str

Perform a web search using Bing.

  • Parameters:
    • query (str): The search query string
    • result_count (int, optional): Number of results to return. Defaults to 10
  • Returns:
    • JSON string containing the search results or error information

Dependencies

  • mcp[cli] >= 1.2.0
  • python-dotenv >= 1.0.0
  • requests >= 2.31.0

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for bing-search-mcp-wx 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bing-search-mcp-wx 0.1.0
File Size Uploaded
bing_search_mcp_wx-0.1.0.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bing-search-mcp-wx 0.1.0
File Interpreter ABI Platform
bing_search_mcp_wx-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / bing_search_mcp_wx-0.1.0.tar.gz

Download URL bing_search_mcp_wx-0.1.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
38a05045d29be783ffdf643b90737516539aba94012c24b6b334a0063812175c
BLAKE2b-256 checksum
How to use checksums
66cd34d543ec17cfae460b5dfc2bc2cba5f089da9f1629a09cbb91784059faee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / bing_search_mcp_wx-0.1.0-py3-none-any.whl

Download URL bing_search_mcp_wx-0.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4eb5015f1b2fd1d69dd3be3d6126dc92e3258defe1864a9323a63c1bf2650a6
BLAKE2b-256 checksum
How to use checksums
40d700f01655420930defffecdb63cca852effdb24167a5869660a92139b71ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page