Newsmcp With Mediastackapi
N

Newsmcp With Mediastackapi

2 points
6.2K

Installation

Copy the following command to your Client for configuration
Note: Your key is sensitive information, do not share it with anyone.

๐Ÿš€ Mediastack News MCP Server

A FastMCP server that exposes the Mediastack News API as MCP (Model Context Protocol) tools. It can be used as a plug-and-play backend for Smithery.ai or any other MCP-compatible agent platform.

๐Ÿš€ Quick Start

This is a FastMCP server that exposes the Mediastack News API as MCP tools. It can serve as a plug - and - play backend for Smithery.ai or other MCP - compatible agent platforms.

โœจ Features

  • get_latest_news: Fetches the most recent news stories with various filtering options.
  • get_sources: Lists available news sources with filtering capabilities.

๐Ÿ“ฆ Installation

  1. Clone this repository:
git clone <repository-url>
cd NewsMCP_with_MediastackAPI
  1. Install the required Python packages:
pip install -r requirements.txt

๐Ÿ“š Documentation

โš™๏ธ Configuration

This server requires a Mediastack API key to function.

  1. Get a free API key from mediastack.com.
  2. Create a file named .env in the project's root directory.
  3. Add your API key to this file in the following format:
MEDIASTACK_API_KEY=your_api_key_here

The server will automatically load this environment variable when a tool is called.

๐Ÿ’ป Running Locally

To start the MCP server, run the following command:

python server.py

By default, the server will start on http://0.0.0.0:8080.

๐Ÿ› ๏ธ Available Tools

1. get_latest_news

Fetches the most recent news stories from Mediastack. Parameters:

  • keywords (Optional): Search terms to filter news.
  • sources (Optional): News sources, comma - separated (e.g., "cnn,bbc").
  • countries (Optional): Country codes, comma - separated (e.g., "us,gb").
  • languages (Optional): Language codes, comma - separated (e.g., "en,fr").
  • categories (Optional): News categories, comma - separated.
  • date (Optional): A specific date or date range (YYYY - MM - DD).
  • sort (Optional): Sort order (published_desc, published_asc, popularity).
  • limit (Optional): Maximum number of results to return (default: 25, max: 100).
  • offset (Optional): Pagination offset.

2. get_sources

Lists available news sources from Mediastack. Parameters:

  • search (Optional): A search term to filter sources.
  • sources (Optional): Specific sources, comma - separated.
  • countries (Optional): Country codes, comma - separated.
  • languages (Optional): Language codes, comma - separated.
  • categories (Optional): News categories, comma - separated.
  • limit (Optional): Maximum number of results to return (default: 25, max: 100).
  • offset (Optional): Pagination offset.

โ˜๏ธ Deployment on Smithery.ai

  1. Push this repository to GitHub.
  2. Connect your GitHub repository to Smithery.ai.
  3. Smithery will automatically detect the smithery.yaml configuration.
  4. Set your MEDIASTACK_API_KEY in Smithery's environment variables.
  5. Deploy and start using the MCP tools. For more information, visit the Smithery.ai Documentation.

๐Ÿ“‚ Project Structure

.
โ”œโ”€โ”€ app.py           # MCP tool definitions
โ”œโ”€โ”€ server.py        # FastMCP server setup
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ smithery.yaml    # Smithery deployment configuration
โ”œโ”€โ”€ Dockerfile       # Instructions for building a Docker image
โ”œโ”€โ”€ LICENSE          # Project license
โ”œโ”€โ”€ .env             # (Local) Environment variables
โ””โ”€โ”€ README.md        # This file

๐Ÿ“„ License

This project is licensed under the MIT License.

Alternatives

M
Maverick MCP
Python
6.9K
4 points
K
Klavis
Klavis AI is an open-source project that provides a simple and easy-to-use MCP (Model Context Protocol) service on Slack, Discord, and Web platforms. It includes various functions such as report generation, YouTube tools, and document conversion, supporting non-technical users and developers to use AI workflows.
TypeScript
13.7K
5 points
S
Scrapling
Scrapling is an adaptive web scraping library that can automatically learn website changes and re - locate elements. It supports multiple scraping methods and AI integration, providing high - performance parsing and a developer - friendly experience.
Python
12.3K
5 points
A
Apple Health MCP
An MCP server for querying Apple Health data via SQL, implemented based on DuckDB for efficient analysis, supporting natural language queries and automatic report generation.
TypeScript
9.7K
4.5 points
M
MCP Server Airbnb
Certified
MCP service for Airbnb listing search and details query
TypeScript
15.5K
4 points
V
Video Editing MCP
Video Editor MCP is a video editing server that provides video upload, search, generation, and editing functions, supporting operations through the LLM and Video Jungle platforms.
Python
14.0K
4 points
B
Bilibili MCP Js
Certified
A Bilibili video search server based on the Model Context Protocol (MCP), providing API interfaces to support video content search, paginated queries, and video information return, including LangChain call examples and test scripts.
TypeScript
18.3K
4.2 points
M
MCP Youtube
Download YouTube subtitles via yt - dlp and connect to Claude.ai through the MCP protocol for video content analysis
TypeScript
10.9K
4 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
17.8K
4.5 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
28.3K
5 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
56.8K
4.3 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
18.1K
4.3 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
52.3K
4.5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
25.1K
5 points
C
Context7
Context7 MCP is a service that provides real-time, version-specific documentation and code examples for AI programming assistants. It is directly integrated into prompts through the Model Context Protocol to solve the problem of LLMs using outdated information.
TypeScript
78.3K
4.7 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
37.7K
4.8 points