JUHE API Marketplace
guangxiangdebizi avatar
MCP Server

News MCP Server

A smart news search server that automatically switches between multiple news APIs when one reaches its limit, enabling reliable searching across 20+ languages without worrying about API quotas.

3
GitHub Stars
11/22/2025
Last Updated
MCP Server Configuration
1{
2 "name": "news-mcp",
3 "command": "node",
4 "args": [
5 "path/to/news-mcp/build/index.js"
6 ]
7}
JSON7 lines
  1. Home
  2. MCP Servers
  3. news-mcp

README Documentation

šŸ“° News MCP Server

A smart news search MCP (Model Context Protocol) server with automatic API switching for reliable news fetching. Never worry about API limits again!

News Server MCP server

✨ Features

  • šŸ”„ Smart API Switching: Automatically switches between multiple news APIs when one reaches its limit
  • šŸ†“ Multiple Free APIs: Supports 5+ free news APIs with generous daily quotas
  • šŸ“Š Quota Management: Intelligent tracking of daily API usage limits
  • šŸŒ Multi-language Support: Search news in 20+ languages
  • ⚔ Fast & Reliable: Failover mechanism ensures you always get results
  • šŸ› ļø Easy Setup: Simple configuration with environment variables

šŸš€ Quick Start

1. Installation

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

# Install dependencies
npm install

# Copy environment template
cp .env.example .env

2. API Configuration

Get free API keys from any of these services (you only need one, but more = better reliability):

ServiceDaily LimitSign Up LinkPriority
TheNewsAPIUnlimited*Get KeyšŸ„‡ Highest
NewsData.io~200 requestsGet Key🄈 High
NewsAPI.org100 requestsGet KeyšŸ„‰ Medium
GNews100 requestsGet KeyšŸ… Medium
TwinglyTrial availableGet KeyšŸŽ–ļø Low

*Claimed unlimited for free tier

3. Configure Environment

Edit .env file and add your API keys:

# Add at least one API key (more is better for reliability)
THE_NEWS_API_KEY=your_api_key_here
NEWSDATA_IO_KEY=your_api_key_here
NEWSAPI_ORG_KEY=your_api_key_here
GNEWS_API_KEY=your_api_key_here
TWINGLY_API_KEY=your_api_key_here

4. Build & Run

# Build the project
npm run build

# Start the MCP server
npm start

# Or run in development mode
npm run dev

šŸ”§ Usage

With Claude Desktop

Add to your Claude Desktop configuration:

Stdio Mode (Local Development):

{
  "mcpServers": {
    "news-mcp": {
      "command": "node",
      "args": ["path/to/news-mcp/build/index.js"]
    }
  }
}

SSE Mode (Web Access):

# Start SSE server
npm run sse
{
  "mcpServers": {
    "news-mcp": {
      "type": "sse",
      "url": "http://localhost:3100/sse",
      "timeout": 600
    }
  }
}

Available Tools

search_news

Search for news articles with automatic API switching.

Parameters:

  • query (required): Search keywords or topics
  • language (optional): Language code (default: "en")
  • limit (optional): Number of articles (1-10, default: 5)

Example:

// Search for technology news
{
  "query": "artificial intelligence",
  "language": "en",
  "limit": 5
}

// Search for Chinese news
{
  "query": "ē§‘ęŠ€ę–°é—»",
  "language": "zh",
  "limit": 3
}

🧠 How Smart Switching Works

  1. Priority Order: APIs are tried in order of reliability and quota limits
  2. Quota Tracking: System tracks daily usage for each API
  3. Automatic Failover: When an API fails or reaches limit, automatically tries the next one
  4. Success Guarantee: Continues until successful response or all APIs exhausted
TheNewsAPI (āˆž) → NewsData.io (200) → NewsAPI.org (100) → GNews (100) → Twingly (50)

šŸ“Š Supported Languages

  • English (en) - All APIs
  • Chinese (zh) - Most APIs
  • Spanish (es) - Most APIs
  • French (fr) - Most APIs
  • German (de) - Most APIs
  • And 15+ more languages

šŸ› ļø Development

Project Structure

src/
ā”œā”€ā”€ index.ts              # MCP server entry point
ā”œā”€ā”€ config.ts             # API configuration management
└── tools/
    └── newsSearch.ts     # Smart news search tool

Scripts

npm run build     # Build TypeScript
npm run dev       # Development mode with watch
npm start         # Start built server
npm run sse       # Start SSE server on port 3100

Adding New APIs

  1. Add API configuration to src/config.ts
  2. Implement API-specific request logic in src/tools/newsSearch.ts
  3. Add environment variable to .env.example

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  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

  • 🌐 Website: GitHub Profile
  • šŸ“§ Email: guangxiangdebizi@gmail.com
  • šŸ’¼ LinkedIn: Xingyu Chen
  • šŸ“¦ NPM: @xingyuchen

šŸ™ Acknowledgments

  • Model Context Protocol for the amazing MCP framework
  • All the news API providers for their generous free tiers
  • The open-source community for inspiration and support

⭐ If this project helped you, please give it a star!

Quick Install

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright Ā© 2025 - All rights reserved