Are you the author? Sign in to claim
NewsMCP_with_MediastackAPI
A FastMCP server that exposes the Mediastack News API as MCP (Model Context Protocol) tools. This server can be used as a plug-and-play backend for Smithery.ai or any other MCP-compatible agent platform.
get_latest_news: Fetches the most recent news stories with various filtering options.get_sources: Lists available news sources with filtering capabilities.Clone this repository:
git clone <repository-url>
cd NewsMCP_with_MediastackAPI
Install the required Python packages:
pip install -r requirements.txt
This server requires a Mediastack API key to function.
.env in the project's root directory.MEDIASTACK_API_KEY=your_api_key_here
The server will automatically load this environment variable when a tool is called.
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.
get_latest_newsFetches 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.get_sourcesLists 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.smithery.yaml configuration.MEDIASTACK_API_KEY in Smithery's environment variables.For more information, visit the Smithery.ai Documentation.
.
├── 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
This project is licensed under the MIT License.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows