News API MCP Server

by kcjonnyc

389 downloads Not rated yet

About

MCP server for NewsAPI integration - enables AI assistants to search articles, get headlines, and browse news sources

Explore

- Search through millions of articles from worldwide sources
- Get breaking news headlines and top stories
- Discover and filter available news sources
- Configurable via environment variable and MCP settings
- Test integration with dedicated test command

1. Install dependencies:

   npm install

2. Get a NewsAPI key:
- Sign up at NewsAPI.org
- Get your free API key (up to 100 requests/day)

3. Configure environment:
Create a .env file in the project root:

   NEWS_API_KEY=your_api_key_here

4. Build the project:

   npm run build

Add to your MCP settings (e.g., ~/.cursor/mcp.json):

{
  "mcpServers": {
    "news-mcp": {
      "command": "npm",
      "args": ["run", "start", "--prefix", "/path/to/news_mcp"]
    }
  }
}

- searchArticles - Search through millions of articles from news sources worldwide.
- getTopHeadlines - Get breaking news headlines and top stories.
- getSources - Discover and filter available news sources.

A Model Context Protocol (MCP) server that provides access to news content through the NewsAPI.org service. This server enables AI assistants to search articles, get top headlines, and browse news sources.

Setup

1. Install dependencies:

   npm install

2. Get a NewsAPI key:
- Sign up at NewsAPI.org
- Get your free API key (up to 100 requests/day)

3. Configure environment:
Create a .env file in the project root:

   NEWS_API_KEY=your_api_key_here

4. Build the project:

   npm run build

MCP Configuration

Add to your MCP settings (e.g., ~/.cursor/mcp.json):

{
  "mcpServers": {
    "news-mcp": {
      "command": "npm",
      "args": ["run", "start", "--prefix", "/path/to/news_mcp"]
    }
  }
}

Available Tools

- searchArticles - Search through millions of articles from news sources worldwide.
- getTopHeadlines - Get breaking news headlines and top stories.
- getSources - Discover and filter available news sources.

Development

Development mode (with auto-reload):

npm run dev

Build for production:

npm run build
npm start

Test NewsAPI integration:

npm run test-api

License

MIT

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.