Skip to main content

MCP Server

The GNews MCP server lets AI assistants search news articles and get top headlines through the Model Context Protocol. It is hosted by GNews: there is nothing to install, you only connect your client to it with your API key.

SettingValue
URLhttps://mcp.gnews.io/
TransportStreamable HTTP
AuthenticationX-Api-Key header with your GNews API key
Registryio.github.gnews-io/gnews in the official MCP Registry

Each tool call makes one API request with your key: it counts toward your daily quota and follows your plan (articles per request, historical archive and data freshness, see Article Availability).

Connect Your Client​

Replace YOUR_API_KEY with the key from your dashboard.

Claude Code​

claude mcp add --transport http gnews_api https://mcp.gnews.io/ --header "X-Api-Key: YOUR_API_KEY"

Cursor​

In ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
"mcpServers": {
"gnews": {
"url": "https://mcp.gnews.io/",
"headers": {
"X-Api-Key": "YOUR_API_KEY"
}
}
}
}

VS Code​

In .vscode/mcp.json. VS Code asks for the key the first time and stores it securely:

{
"inputs": [
{
"type": "promptString",
"id": "gnews-api-key",
"description": "GNews API key",
"password": true
}
],
"servers": {
"gnews": {
"type": "http",
"url": "https://mcp.gnews.io/",
"headers": {
"X-Api-Key": "${input:gnews-api-key}"
}
}
}
}

Gemini CLI​

In ~/.gemini/settings.json:

{
"mcpServers": {
"gnews": {
"httpUrl": "https://mcp.gnews.io/",
"headers": {
"X-Api-Key": "YOUR_API_KEY"
}
}
}
}

Other Clients​

Any MCP client that supports the Streamable HTTP transport and custom headers can connect with the URL and header above.

Available Tools​

Searches articles by keywords, like the Search endpoint.

ParameterDefaultDescription
qrequiredKeywords, with the query syntax (quotes, AND, OR, NOT, parentheses)
langany2-letter language code, e.g. en
countryany2-letter country code of the source, e.g. us
max10Number of articles, from 1 to 100 depending on your plan
in_fieldstitle, descriptionWhere to search, comma-separated: title, description, content
sortbypublishedAtpublishedAt (most recent first) or relevance
date_fromnoneMinimum publication date: YYYY-MM-DD or ISO 8601 (2026-10-01T08:30:00Z)
date_tononeMaximum publication date, same formats
page1Page number

top_headlines​

Gets the current trending articles of a category, like the Top Headlines endpoint.

ParameterDefaultDescription
categorygeneralgeneral, world, nation, business, technology, entertainment, sports, science or health
langany2-letter language code, e.g. en
countryany2-letter country code, e.g. us
max10Number of articles, from 1 to 100 depending on your plan
qnoneOptional keywords to filter the headlines
date_fromnoneMinimum publication date: YYYY-MM-DD or ISO 8601
date_tononeMaximum publication date, same formats
page1Page number

Both tools return the same JSON as the API, see JSON Response. The server also exposes the API documentation as MCP resources (docs://gnews/cheatsheet, docs://gnews/search, docs://gnews/top-headlines).

Example Prompts​

  • What are today's top technology headlines in the United States, in English?
  • Find English articles about the Federal Reserve from the last 3 days, most relevant first.
  • Summarize this morning's business news in France.

Privacy​

The server is a proxy: it forwards your key to the GNews API with each request and does not store it. It records anonymous usage statistics for each tool call (tool name, MCP client name and version, success or error, duration, and the lang, country, category, max, page and sortby parameters). Your API key is only recorded as a one-way hash, and your search queries are never recorded.

Source Code​

The server is open source: github.com/gnews-io/gnews-io-mcp-server.