NewsAPI MCP Server

NewsAPI MCP Server

Enables news search and headline retrieval using NewsAPI. Supports getting top headlines by country and category, and searching articles across thousands of sources.

Category
Visit Server

README

NewsAPI MCP Server

mpak NimbleBrain Discord License: MIT

A Model Context Protocol (MCP) server that provides news search and headline retrieval using NewsAPI. Get top headlines by country and category, or search articles across thousands of sources.

View on mpak registry | Built by NimbleBrain

Install

Install with mpak:

mpak install @nimblebraininc/newsapi

Configuration

Get your API key from NewsAPI, then configure:

mpak config set @nimblebraininc/newsapi api_key YOUR_API_KEY

Claude Code

claude mcp add newsapi -- mpak run @nimblebraininc/newsapi

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "newsapi": {
      "command": "mpak",
      "args": ["run", "@nimblebraininc/newsapi"]
    }
  }
}

See the mpak registry page for full install options.

Tools

get_top_headlines

Get top news headlines by country and category.

Parameter Type Required Description
query string No Keywords to search in article headlines
country string No 2-letter country code (default: "us")
category string No One of: "business", "entertainment", "general", "health", "science", "sports", "technology"
page_size integer No Number of results, max 100 (default: 10)

Example call:

{
  "name": "get_top_headlines",
  "arguments": {
    "country": "us",
    "category": "technology",
    "page_size": 5
  }
}

Example response:

{
  "articles": [
    {
      "title": "New AI breakthrough announced",
      "description": "Researchers have developed a new approach...",
      "url": "https://example.com/article",
      "source": "TechCrunch",
      "author": "Jane Smith",
      "published_at": "2026-02-13T10:00:00Z"
    }
  ],
  "total_results": 5
}

search_news

Search news articles across all sources. Note: Only returns articles from the last 30 days (NewsAPI free tier limitation).

Parameter Type Required Description
query string Yes Search keywords or phrase
sources string No Comma-separated source IDs (e.g. "bbc-news,cnn")
domains string No Comma-separated domains (e.g. "bbc.co.uk,techcrunch.com")
from_date string No Oldest article date, ISO 8601 (e.g. "2026-01-01")
to_date string No Newest article date, ISO 8601 (e.g. "2026-01-31")
language string No 2-letter language code (default: "en")
sort_by string No "relevancy", "popularity", or "publishedAt" (default: "publishedAt")
page_size integer No Number of results, max 100 (default: 10)

Example call:

{
  "name": "search_news",
  "arguments": {
    "query": "artificial intelligence",
    "sort_by": "relevancy",
    "page_size": 5
  }
}

Example response:

{
  "query": "artificial intelligence",
  "articles": [
    {
      "title": "The State of AI in 2026",
      "description": "A comprehensive look at how AI has evolved...",
      "url": "https://example.com/ai-2026",
      "source": "Wired",
      "author": "John Doe",
      "published_at": "2026-02-10T14:30:00Z",
      "content": "First 200 characters of the article content..."
    }
  ],
  "total_results": 127
}

Quick Start

Local Development

git clone https://github.com/NimbleBrainInc/mcp-newsapi.git
cd mcp-newsapi

# Install dependencies
uv sync

# Set API key
cp .env.example .env
# Edit .env with your API key

# Run the server (stdio mode)
uv run python -m mcp_newsapi.server

The server supports HTTP transport with:

  • Health check: GET /health
  • MCP endpoint: POST /mcp

Development

# Install with dev dependencies
uv sync --group dev

# Run all checks (format, lint, typecheck, unit tests)
make check

# Run unit tests
make test

# Run with coverage
make test-cov

About

NewsAPI MCP Server is published on the mpak registry and built by NimbleBrain. mpak is an open registry for Model Context Protocol servers.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured