Skip to main content
News API via MCP Server

Real-time news is only as powerful as how quickly you can work with it. Writing custom scripts and manually handling API responses for integrating live news data into your AI-powered workflows is long outdated. With the Newsdata.io MCP Server, that barrier is gone.

This guide walks you through everything: what MCP is, how to install and configure the server, how to connect it to popular AI editors and assistants, and how to make your first tool calls.

What is MCP and Why Does it Matter?

Model Context Protocol (MCP) is an open protocol designed to give AI models structured, safe access to external tools and data. Instead of copy-pasting API responses into a chat window, MCP lets an AI client call a tool directly and get back structured data it can work with.

In simple terms, it can be considered a universal plugin system for AI assistants. With the NewsData.io MCP server, your AI client can:

  • Fetch the latest breaking news on any topic,
  • Pull historical news for research or analysis,
  • Query cryptocurrency or financial market coverage,
  • Discover available news sources by country, language, or category.

All of this happens within the flow of your conversation or coding session – no extra scripts, no manual API calls.

Prerequisites

Before you begin, make sure you have the following:

  • A NewsData.io API key — register here to get one. A free plan is sufficient for getting started.
  • Python 3.10+ is installed on your system.
  • uv — a fast Python package manager. Install it with:

curl -LsSf https://astral.sh/uv/install.sh | sh

  • Git, to clone the repository.

Available Tools

The NewsData.io MCP server exposes five tools that map directly to the NewsData.io API endpoints:


Tool

Endpoint

Description
get_latest_news/api/1/latestBreaking and recent news from the past 48 hours
get_archive_news/api/1/archiveHistorical news with from_date / to_date filters
get_crypto_news/api/1/cryptoCryptocurrency and blockchain-focused coverage
get_market_news/api/1/marketStock, financial, and market-related news
get_news_sources/api/1/sourcesSource discovery by country, category, or language
get_news_counts/api/1/countAggregate article counts over a date range (hour/day buckets or single all total)
get_crypto_counts/api/1/crypto/countAggregate crypto article counts over a date range
get_market_counts/api/1/market/countAggregate market article counts over a date range

Each tool accepts the same rich set of query parameters supported by Newsdata.io API – keywords, countries, languages, categories, sentiments, and more.

Installation 

Step 1: Clone the Repository

git clone https://github.com/newsdataapi/newsdata.io-mcp.git
cd newsdata.io-mcp
uv sync

The uv sync command installs all dependencies from the project’s pyproject.toml.

Step 2: Configure your API Key

Create a .env file in the project root:

NEWSDATA_API_KEY=your_newsdata_api_key
REQUEST_TIMEOUT=30

  • NEWSDATA_API_KEYRequired. Your NewsData.io API key.
  • REQUEST_TIMEOUTOptional. Defaults to 30 seconds.

That’s all the setup you need.

Running the Server

The server supports two transport modes depending on how your client communicates:

stdio Transport (Recommended for Desktop/CLI Clients)

uv run newsdata-mcp --transport stdio

Streamable HTTP Transport (For Remote/Web Clients)

Used when clients connect over a network, such as ChatGPT Desktop:

uv run newsdata-mcp --transport streamable-http --host 0.0.0.0 --port 8000

You can also run the server using the module syntax:

python -m newsdata_mcp.server --transport stdio
python -m newsdata_mcp.server --transport streamable-http --host 0.0.0.0 --port 8000

Connecting to AI Clients

The NewsData MCP server is designed to work across the growing ecosystem of MCP-compatible AI clients – from desktop assistants to agentic coding tools. Once connected, your AI client gets direct, structured access to live and historical news data without the need for any additional coding or manual API handling. The configuration pattern is consistent across clients; you point the client to the server binary, pass your API key as an environment variable, and restart. The sections below mention the exact steps for setting up each of the supported clients.

The simplest way is to add the server to your MCP client’s JSON config. Each client picks up the config on restart. Substitute /path/to/newsdata.io-mcp for your local clone path.

Claude Code

Claude code is Anthropic’s agentic coding tool. Add the server via the CLI:

claude mcp add newsdata-mcp -- uv --directory /path/to/newsdata.io-mcp run newsdata-mcp --transport stdio

Or add it manually to your Claude Code MCP config file (~/.claude/mcp.json globally, or .claude/mcp.json per project):

{
"mcpServers": {
"newsdata-mcp": {
"command": "uv",
"args": ["run", "newsdata-mcp", "--transport", "stdio"],
"cwd": "/path/to/newsdata.io-mcp",
"env": {
"NEWSDATA_API_KEY": "your_newsdata_api_key"
}
}
}
}

Restart Claude Code. You can now ask it things like “Fetch the latest tech news from the US,” and it will call get_latest_news directly.

Claude Desktop

Edit the Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
"mcpServers": {
"newsdata-mcp": {
"command": "uv",
"args": ["run", "newsdata-mcp", "--transport", "stdio"],
"cwd": "/path/to/newsdata.io-mcp",
"env": {
"NEWSDATA_API_KEY": "your_newsdata_api_key"
}
}
}
}

Restart Claude Desktop. The NewsData tools will appear in the tools menu, and Claude will call them automatically when your query requires news data.

Cursor

Create or edit .cursor/mcp.json in your project root (or ~/.cursor/mcp.json globally):

{
"mcpServers": {
"newsdata-mcp": {
"command": "uv",
"args": ["run", "newsdata-mcp", "--transport", "stdio"],
"cwd": "/path/to/newsdata.io-mcp",
"env": {
"NEWSDATA_API_KEY": "your_newsdata_api_key"
}
}
}
}

Restart Cursor. The server will appear under Cursor Settings → MCP.

VS Code (GitHub Copilot)

Create .vscode/mcp.json in your workspace:

{
"servers": {
"newsdata-mcp": {
"type": "stdio",
"command": "uv",
"args": ["run", "newsdata-mcp", "--transport", "stdio"],
"cwd": "/path/to/newsdata.io-mcp",
"env": {
"NEWSDATA_API_KEY": "your_newsdata_api_key"
}
}
}
}

Reload VS Code. The server will be picked up by GitHub Copilot Chat when the agent mode is active.

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
"mcpServers": {
"newsdata-mcp": {
"command": "uv",
"args": ["run", "newsdata-mcp", "--transport", "stdio"],
"cwd": "/path/to/newsdata.io-mcp",
"env": {
"NEWSDATA_API_KEY": "your_newsdata_api_key"
}
}
}
}

Restart Windsurf. The tools are available to Cascade in agentic mode.

ChatGPT Desktop (OpenAI)

ChatGPT Desktop requires HTTP transport. Start the server in HTTP mode:

uv run newsdata-mcp --transport streamable-http --host 127.0.0.1 --port 8000

Then open ChatGPT → Settings → Connectors → Add custom connector and register http://127.0.0.1:8000/mcp as the connector endpoint.

Example Tool Calls

Once connected, your AI client calls tools automatically based on your prompts. Here are representative examples of what those tool calls look like under the hood:

Fetch Latest News with Boolean Queries

get_latest_news(
q="((pizza OR burger) AND healthy)",
country="us",
language="en"
size=10
)

The q parameters support full boolean logic – AND, OR, NOT, and parentheses for grouping – identical to the NewsData.io API.

Fetch Historical News

get_archive_news(
q="ukraine war",
from_date="2025-01-01",
to_date="2025-01-31",
language="en"
)

Historical data access depends on your subscription plan. Paid plans support up to 2–5 years of archive data.

Fetch Crypto News

get_crypto_news(
coin="btc, eth",
sentiment="positive"
)

The sentiment parameter filters results by positive, negative, or neutral sentiment — powered by NewsData.io’s built-in text analysis.

Fetch Market News

get_market_news(
symbol="AAPL,NVDA",
country="us"
)

Filter financial news by stock ticker symbol, sector, or country.

Discover News Sources

get_news_sources(
language="en",
priority_domain="top"
)

Returns a list of news sources matching your filters. Useful for scoping queries for high-authority publishers.

Running With Docker

If you prefer containerized deployments, a Dockerfile is included.

Build the Image

docker build -t newsdata-mcp

Run in HTTP Mode

docker run --rm -p 8000:8000 \
-e NEWSDATA_API_KEY=your_newsdata_api_key \
newsdata-mcp

Run in stdio Mode

docker run --rm -i \
-e NEWSDATA_API_KEY=your_newsdata_api_key \
newsdata-mcp --transport stdio

Pass a .env File

docker run --rm -p 8000:8000 \
--env-file .env \
-e REQUEST_TIMEOUT=45 \
newsdata-mcp

Practical Use Cases

  • Newsroom Research: Ask Claude to summarize yesterday’s coverage on a specific topic across English-language top-tier sources – all in a single conversational turn.
  • Financial Analysis: While reviewing a company’s code or documents in Cursor, ask for the latest market news on a stock ticker without leaving your editor.
  • Crypto Monitoring: Connect the server to your AI assistant and ask for a daily digest of positive Bitcoin and Ethereum news each morning.
  • Historical Research: Use get_archive_news with date ranges to pull coverage of specific events for journalism, academic, or competitive intelligence work.
  • Source Discovery: Use get_news_sources to find which publishers in a given country and language are available before scoping your query.

Plan Limits to Keep in Mind

  • Free plan results are delayed compared to paid plans.
  • Result size is capped by the plan. Typically, 10 results on the free tier and up to 50 on paid plans.
  • Archive access requires a paid subscription; historical range varies by plan.

For full details on plan limits, visit the NewsData.io pricing page.

The NewsData.io MCP server turns a powerful API into a first-class tool inside any MCP-compatible AI environment. Whether you are building AI-driven news applications, conducting research in an agentic coding session, or just want live news context inside your AI assistant, the setup takes under five minutes and works across the entire ecosystem of modern AI clients.

Get your API Key at newsdata.io/register and the server code at github.com/newsdataapi/newsdata.io-mcp

FAQs

Q1. Do I need to write any code to use the MCP server?

No. Once the server is installed and configured in your AI client, you interact with it entirely through natural language. The AI handles tool selection and parameter construction automatically.

Q2. Can I use the MCP server on the free NewsData.io plan?

Yes. The free plan works with get_latest_news, get_crypto_news, get_market_news, and get_news_sources. Archive access requires a paid plan.

Q3. Can I run the server remotely and connect multiple clients?

Yes. Use –transport streamable-http and deploy the container on any cloud server. Multiple clients can connect to the same server URL.

Q4. Does the MCP server support all NewsData.io query parameters?

Yes. Each tool passes through all supported parameters – country, language, category, sentiment, size, and more – directly to the corresponding API endpoint.

Q5. Where can I find the full NewsData.io API reference?

The complete documentation is available at – https://newsdata.io/documentation

Leave a Reply