npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

bing-news-mcp-server

v1.0.0

Published

A streamable HTTP MCP server for fetching Bing news data

Readme

📰 Bing News MCP Server

npm version License: Apache-2.0 Node.js

A powerful Model Context Protocol (MCP) server that provides seamless access to Bing News data through a streamable HTTP interface. Perfect for AI applications, chatbots, and news aggregation services.

✨ Features

  • 🔍 Smart News Search - Search Bing News with advanced filtering options
  • 🔥 Trending News - Get the hottest news stories across different categories
  • 🌐 Multi-language Support - Support for different markets and languages
  • Streamable HTTP Protocol - Modern MCP implementation with HTTP transport
  • 🛡️ Robust Error Handling - Comprehensive error handling and validation
  • 📱 Responsive Design - Clean, formatted output perfect for AI consumption

🚀 Quick Start

Installation

npm install bing-news-mcp-server

Running the Server

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

The server will start on http://localhost:3000 with the MCP endpoint at /mcp.

Health Check

Visit http://localhost:3000/health to verify the server is running properly.

🔧 Configuration

Client Configuration

Add this to your MCP client configuration (e.g., mcp.json):

{
  "mcpServers": {
    "bing-news": {
      "type": "streamableHttp",
      "url": "http://localhost:3000/mcp",
      "timeout": 600
    }
  }
}

Using with Gateway (Optional)

For production deployments, you can use the SuperGateway:

npm run start:gateway

This will proxy the server through http://localhost:3100/mcp.

Custom Headers

If you need authentication or custom headers:

{
  "mcpServers": {
    "bing-news": {
      "type": "streamableHttp",
      "url": "http://localhost:3000/mcp",
      "timeout": 600,
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN",
        "X-API-Key": "your-api-key"
      }
    }
  }
}

🛠️ Available Tools

1. Bing News Search (bing_news_search)

Search for specific news articles based on your query.

Parameters:

  • query (required): Search terms for news articles
  • count (optional): Number of articles to return (1-50, default: 10)
  • freshness (optional): Time filter - "Day", "Week", "Month" (default: "Week")
  • market (optional): Market/region code (default: "en-US")

Example:

{
  "query": "artificial intelligence breakthrough",
  "count": 15,
  "freshness": "Day",
  "market": "en-US"
}

2. Trending News (bing_news_trending)

Get the most popular and trending news stories.

Parameters:

  • category (optional): News category - "all", "world", "business", "technology", "entertainment", "sports", "science", "health" (default: "all")
  • count (optional): Number of articles to return (1-50, default: 15)
  • market (optional): Market/region code (default: "en-US")

Example:

{
  "category": "technology",
  "count": 20,
  "market": "en-US"
}

📊 Response Format

Both tools return structured news data including:

  • Title - Article headline
  • URL - Direct link to the full article
  • Snippet - Brief article summary
  • Source - News publisher
  • Published Date - When the article was published
  • Image URL - Article thumbnail (when available)
  • Category - News category (for trending news)

🏗️ Development

Project Structure

src/
├── index.ts              # Main MCP server entry point
└── tools/
    ├── bing-news.ts      # News search functionality
    └── bing-trending.ts  # Trending news functionality

Building from Source

# Clone the repository
git clone https://github.com/guangxiangdebizi/bing-news-mcp-server.git
cd bing-news-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

Adding Custom Tools

  1. Create a new tool file in src/tools/
  2. Export a tool object with name, description, parameters, and run method
  3. Import and register the tool in src/index.ts

🌍 Supported Markets

The server supports various international markets:

  • en-US - United States (English)
  • en-GB - United Kingdom (English)
  • zh-CN - China (Chinese Simplified)
  • ja-JP - Japan (Japanese)
  • de-DE - Germany (German)
  • fr-FR - France (French)
  • es-ES - Spain (Spanish)
  • And many more...

🔒 Security & Best Practices

  • The server implements CORS protection
  • Request validation and sanitization
  • Rate limiting considerations
  • Secure header handling
  • No sensitive data logging

📈 Performance

  • Efficient HTTP client with connection pooling
  • Optimized HTML parsing with Cheerio
  • Session management for stateless HTTP
  • Automatic cleanup of inactive sessions
  • Configurable timeouts and limits

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

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

👨‍💻 Author

Xingyu Chen

🙏 Acknowledgments


Star this repository if you find it helpful!