Skip to main content
Glama

News MCP Server

📰 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!

✨ 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

🙏 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!

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

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.

  1. ✨ Features
    1. 🚀 Quick Start
      1. 1. Installation
      2. 2. API Configuration
      3. 3. Configure Environment
      4. 4. Build & Run
    2. 🔧 Usage
      1. With Claude Desktop
      2. Available Tools
    3. 🧠 How Smart Switching Works
      1. 📊 Supported Languages
        1. 🛠️ Development
          1. Project Structure
          2. Scripts
          3. Adding New APIs
        2. 🤝 Contributing
          1. ��� License
            1. 👨‍💻 Author
              1. 🙏 Acknowledgments

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  This server enables users to perform Google News searches with automatic categorization and multi-language support via SerpAPI integration.
                  Last updated -
                  1
                  514
                  69
                  JavaScript
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  A server that provides web scraping and intelligent content searching capabilities using the Firecrawl API, enabling AI agents to extract structured data from websites and perform content searches.
                  Last updated -
                  5
                  2
                  TypeScript
                  MIT License
                  • Apple
                  • Linux
                • A
                  security
                  F
                  license
                  A
                  quality
                  A server providing access to news articles from various categories including tech, data science, cybersecurity, and more, allowing retrieval and summarization of latest content.
                  Last updated -
                  1
                  2
                  Python
                • A
                  security
                  F
                  license
                  A
                  quality
                  Provides access to Naver Search APIs, allowing AI agents to search across multiple categories (blogs, news, books, images, shopping items, etc.) with structured responses optimized for LLM consumption.
                  Last updated -
                  13
                  3
                  Python
                  • Apple
                  • Linux

                View all related MCP servers

                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/guangxiangdebizi/news-mcp'

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