Skip to main content
Glama
bads1de

GNews API MCP Server

by bads1de

GNews API MCP Server

An MCP server implementation that integrates with the GNews API, providing access to the latest news articles across various categories and languages.

GNews API と連携する MCP サーバーの実装で、様々なカテゴリや言語にわたる最新のニュース記事へのアクセスを提供します。

Features

  • Global News Coverage: Access news from over 60,000 sources worldwide

  • Multiple Languages: Support for 22 languages including Japanese, English, and more

  • Category-based News: Access news from different categories like general, business, technology, sports, etc.

  • Keyword Search: Search for news articles containing specific keywords

  • Customizable Results: Control the number of results returned

  • Rich Content: Get article titles, publication dates, links, and content snippets

日本語

  • グローバルニュースカバレッジ: 世界中の 60,000 以上のソースからニュースにアクセス

  • 複数言語対応: 日本語、英語を含む、22 の言語をサポート

  • カテゴリベースのニュース: 一般、ビジネス、テクノロジー、スポーツなど、様々なカテゴリのニュースにアクセス

  • キーワード検索: 特定のキーワードを含むニュース記事を検索

  • カスタマイズ可能な結果: 返される結果の数を制御

  • リッチコンテンツ: 記事のタイトル、発行日、リンク、コンテンツスニペットを取得

Related MCP server: Google News13 MCP Server

Tools

  • search-news

    • Search for news articles containing specific keywords

    • Inputs:

      • keyword (string): Search term

      • lang (string, optional): Language code (default: ja)

      • country (string, optional): Country code (default: jp)

      • max (number, optional): Number of results to return (max 10, default 5)

  • get-top-headlines

    • Retrieve the latest top headlines from a specified category

    • Inputs:

      • category (string, optional): News category (general, world, nation, business, technology, entertainment, sports, science, health)

      • lang (string, optional): Language code (default: ja)

      • country (string, optional): Country code (default: jp)

      • max (number, optional): Number of results to return (max 10, default 5)

日本語

  • search-news

    • 特定のキーワードを含むニュース記事を検索

    • 入力パラメータ:

      • keyword (string): 検索キーワード

      • lang (string, オプション): 言語コード (デフォルト: ja)

      • country (string, オプション): 国コード (デフォルト: jp)

      • max (number, オプション): 返される結果の数 (最大 10、デフォルト 5)

  • get-top-headlines

    • 指定されたカテゴリの最新トップヘッドラインを取得

    • 入力パラメータ:

      • category (string, オプション): ニュースカテゴリ (general, world, nation, business, technology, entertainment, sports, science, health)

      • lang (string, オプション): 言語コード (デフォルト: ja)

      • country (string, オプション): 国コード (デフォルト: jp)

      • max (number, オプション): 返される結果の数 (最大 10、デフォルト 5)

Configuration

Getting an API Key

  1. Sign up for a GNews.io account

  2. Choose a plan (Free tier available with 100 requests/day)

  3. Generate your API key

日本語

  1. GNews.io でアカウントを作成

  2. プランを選択(無料プランは 1 日 100 リクエスト)

  3. API キーを生成

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

日本語: claude_desktop_config.json に以下を追加します:

Docker

{
  "mcpServers": {
    "gnews": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "GNEWS_API_KEY", "mcp/gnews"],
      "env": {
        "GNEWS_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

NPX

{
  "mcpServers": {
    "gnews": {
      "command": "npx",
      "args": ["-y", "@bads1de/mcp-server-gnews"],
      "env": {
        "GNEWS_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Local

{
  "mcpServers": {
    "gnews": {
      "command": "node",
      "args": ["path/to/mcp-server-gnews/dist/index.js"],
      "env": {
        "GNEWS_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Build

Docker build:

# Build the Docker image
docker build -t mcp/gnews:latest .

日本語

# Dockerイメージをビルド
docker build -t mcp/gnews:latest .

Local build and run:

# Install dependencies
npm install

# Build the project
npm run build

日本語

# 依存関係のインストール
npm install

# プロジェクトのビルド
npm run build

Example Queries

Here are some example queries you can use with this server:

  1. Search for news about a specific topic:

    Search for news about artificial intelligence
  2. Get top headlines in the technology category:

    Get the latest technology headlines
  3. Search for news in a specific language and country:

    Find news about climate change in English from the US
  4. Get business news with a limit:

    Show me the top 3 business headlines

日本語

  1. 特定のトピックに関するニュースを検索:

    人工知能に関するニュースを検索
  2. テクノロジーカテゴリのトップヘッドラインを取得:

    最新のテクノロジーヘッドラインを取得
  3. 特定の言語と国のニュースを検索:

    米国の英語で気候変動に関するニュースを探す
  4. 上限を指定してビジネスニュースを取得:

    ビジネスのトップ3件のヘッドラインを表示

Limitations

  • The free plan of GNews API is limited to 100 requests per day

  • The free plan does not include full article content

  • Commercial use requires a paid subscription

日本語

  • GNews API の無料プランは 1 日あたり 100 リクエストに制限されています

  • 無料プランには完全な記事コンテンツは含まれません

  • 商用利用には有料サブスクリプションが必要です

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.

日本語

この MCP サーバーは MIT ライセンスの下でライセンスされています。これは、MIT ライセンスの利用規約に従って、ソフトウェアを自由に使用、変更、配布できることを意味します。

Available Tools

2 tools
get-top-headlinesB

Get the latest top headline news for the specified category. Returns a list of articles including title, publication date, link, and description.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoNews categorygeneral
langNoLanguage code (e.g. ja, en, fr)ja
countryNoCountry code (e.g. jp, us, gb)jp
maxNoNumber of news articles to retrieve (max 10, default 5)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden but only states it returns 'latest' headlines without specifying freshness, rate limits, or permissions. It fails to disclose behavioral traits beyond parameter descriptions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences: first sentence states purpose, second describes output. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description lists return fields (title, date, link, description), which is adequate. It could mention ordering or error cases, but for a headline tool, it is mostly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds no significant meaning beyond the parameter descriptions. It restates that 'category' is used but does not elaborate on defaults or usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'latest top headline news' and lists the returned fields. However, it does not explicitly differentiate from the sibling tool 'search-news', which would clarify its scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives or when not to use it. The sibling 'search-news' is not mentioned or contrasted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search-newsA

Search for news articles by keyword. Returns a list of articles matching the specified keyword, including title, publication date, link, and description.

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordYesSearch keyword
langNoLanguage code (e.g. ja, en, fr)ja
countryNoCountry code (e.g. jp, us, gb)jp
maxNoNumber of news articles to retrieve (max 10, default 5)

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It only mentions return fields and not aspects like pagination, sorting, rate limits, authentication, or behavior on empty results. This is a significant gap for a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence effectively communicates purpose and return structure. No fluff; front-loaded with action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 simple parameters, no output schema, and no annotations, the description covers the main purpose and returns. Minor gap: does not specify that results are sorted by relevance or date. Still adequate for a straightforward search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. Description adds 'by keyword' reinforcing the primary parameter but does not provide examples or further constraints beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb 'Search' and resource 'news articles' with specific keyword filter. It explicitly lists return fields (title, publication date, link, description), distinguishing it from sibling 'get-top-headlines' which likely returns headlines without keyword search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description implies use when searching by keyword, but does not explicitly state when to use this tool versus the sibling. No exclusions or alternatives provided; context from sibling name partially fills gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.1
    • First observedget-top-headlines
    • First observedsearch-news

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one for top headlines by category and one for keyword search. No overlap in functionality.

Naming Consistency5/5

Both tool names follow a consistent verb-noun pattern using hyphens (get-top-headlines, search-news), making them predictable and easy to differentiate.

Tool Count3/5

With only 2 tools, the server feels thin for a news API, which typically includes more operations like retrieving specific articles or sources. However, the tools cover the core use cases of headline browsing and search.

Completeness4/5

The tools cover the primary news retrieval operations (headlines and search), but lack features like fetching article details by ID or filtering by source, which are minor gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables searching news articles and retrieving top headlines from the GNews API with support for filtering by topic, language, and country.
    -
  • A
    license
    B
    quality
    D
    maintenance
    Provides tools to search and retrieve news across various categories including business, technology, science, and sports via the Google News API. It supports keyword searches, autocomplete suggestions, and region-specific news across multiple languages.
    11
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides news search and trending headlines via GNews API with advanced query syntax and authentication.
    -