MCP News Server

by eluc1a

news-mcp MCP サーバー

MCP ニュースサーバー

コンポーネント

リソース

サーバーは、リソース URI を介してデータベースに保存されているニュース記事を公開します。

  • news://{category}/{limit} : 指定されたカテゴリの最新記事のリストを取得します。
    • {category} : カテゴリ(例: techdata_sciencenews )で記事をフィルタリングします。完全なリストについてはツールの説明をご覧ください。
    • {limit} (オプション、デフォルト 10): 返される記事の最大数を指定します。
  • 返される各記事には、タイトル、リンク、公開日、ソースが含まれます。

プロンプト

現在、サーバーはプロンプトを公開していません。(要約ロジックは内部に存在しますが、MCP プロンプト経由では利用できません)。

ツール

サーバーは 1 つのツールを実装します。

  • summarize_news : データベースから生のニュース記事を取得し、クライアント (LLM) が要約できるようにします。
    • オプションのcategory (文字列) とlimit (整数、デフォルトは 20) 引数を取ります。
    • それぞれidtitlelinkpublishedsourcecontentを含む記事辞書のリストを返します。
    • 利用可能なカテゴリ: techdata_sciencellm_toolscybersecuritylinuxaudio_dspstartupsnewsscienceresearchpolicy

構成

サーバーは、 DATABASE_URL環境変数 (デフォルトはpostgresql://localhost/mcp_news ) を介して構成された PostgreSQL データベースに依存します。

news_gatherer.pyスクリプト (個別に実行/スケジュール設定することを目的としたもの) は、さまざまな RSS フィードからデータベースにデータを入力します。

要約ロジック (内部、MCP 経由では公開されません) は、 OPENAI_API_KEY環境変数を介して構成された OpenAI API を使用します。

その他の構成(環境変数またはデフォルト経由):

  • LOOKBACK_HOURS : news_gatherer.pyが新しい記事を検索する期間 (デフォルト: 6)。
  • SUMMARY_WORD_TARGET : 内部要約の目標単語数 (デフォルト: 500)。
  • MAX_ARTICLES_PER_SUMMARY : 1 つのサマリー バッチに含まれる記事の最大数 (デフォルト: 25)。
  • KEYWORD_FILTER : 内部要約ロジックで使用されるキーワード。

クイックスタート

インストール

クロードデスクトップ

MacOS の場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

発達

建築と出版

配布用のパッケージを準備するには:

  1. 依存関係を同期し、ロックファイルを更新します。
uv sync
  1. パッケージディストリビューションをビルドします。
uv build

これにより、 dist/ディレクトリにソースとホイールのディストリビューションが作成されます。

  1. PyPI に公開:
uv publish

注: 環境変数またはコマンド フラグを使用して PyPI 資格情報を設定する必要があります。

  • トークン: --tokenまたはUV_PUBLISH_TOKEN
  • またはユーザー名/パスワード: --username / UV_PUBLISH_USERNAMEおよび--password / UV_PUBLISH_PASSWORD

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用を強くお勧めします。

次のコマンドを使用して、 npm経由で MCP Inspector を起動できます。

npx @modelcontextprotocol/inspector uv --directory ~/dev/news-mcp run news-mcp

起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。

-
security - not tested
-
license - not tested
-
quality - not tested

テクノロジー、データサイエンス、サイバーセキュリティなど、さまざまなカテゴリのニュース記事へのアクセスを提供し、最新のコンテンツを取得および要約できるサーバーです。

  1. Components
    1. Resources
    2. Prompts
    3. Tools
  2. Configuration
    1. Quickstart
      1. Install
    2. Development
      1. Building and Publishing
      2. Debugging

    Related MCP Servers

    • A
      security
      F
      license
      A
      quality
      This server allows users to perform web searches using Perplexity AI, providing a tool for retrieving search results through a simple API interface.
      Last updated -
      1
      2
      TypeScript
    • A
      security
      A
      license
      A
      quality
      A server allowing interaction with Reddit via the public API, enabling browsing frontpage posts, retrieving subreddit details, and reading post comments through a Model Context Protocol.
      Last updated -
      8
      30
      Python
      MIT License
      • Apple
      • Linux
    • A
      security
      A
      license
      A
      quality
      A server that enhances AI assistants with the ability to update your JSON Resume by analyzing your coding projects, automatically extracting skills and generating professional descriptions.
      Last updated -
      3
      216
      28
      TypeScript
      The Unlicense
      • Apple
      • Linux
    • -
      security
      A
      license
      -
      quality
      A server that allows AI assistants to search for research papers, read their content, and access related code repositories through the PapersWithCode API.
      Last updated -
      4
      Python
      MIT License

    View all related MCP servers

    ID: 9vuy62f77m