news-mcp MCP サーバー
MCP ニュースサーバー
コンポーネント
リソース
サーバーは、リソース URI を介してデータベースに保存されているニュース記事を公開します。
news://{category}/{limit}
: 指定されたカテゴリの最新記事のリストを取得します。{category}
: カテゴリ(例:tech
、data_science
、news
)で記事をフィルタリングします。完全なリストについてはツールの説明をご覧ください。{limit}
(オプション、デフォルト 10): 返される記事の最大数を指定します。
- 返される各記事には、タイトル、リンク、公開日、ソースが含まれます。
プロンプト
現在、サーバーはプロンプトを公開していません。(要約ロジックは内部に存在しますが、MCP プロンプト経由では利用できません)。
ツール
サーバーは 1 つのツールを実装します。
summarize_news
: データベースから生のニュース記事を取得し、クライアント (LLM) が要約できるようにします。- オプションの
category
(文字列) とlimit
(整数、デフォルトは 20) 引数を取ります。 - それぞれ
id
、title
、link
、published
、source
、content
を含む記事辞書のリストを返します。 - 利用可能なカテゴリ:
tech
、data_science
、llm_tools
、cybersecurity
、linux
、audio_dsp
、startups
、news
、science
、research
、policy
。
- オプションの
構成
サーバーは、 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
発達
建築と出版
配布用のパッケージを準備するには:
- 依存関係を同期し、ロックファイルを更新します。
- パッケージディストリビューションをビルドします。
これにより、 dist/
ディレクトリにソースとホイールのディストリビューションが作成されます。
- PyPI に公開:
注: 環境変数またはコマンド フラグを使用して PyPI 資格情報を設定する必要があります。
- トークン:
--token
またはUV_PUBLISH_TOKEN
- またはユーザー名/パスワード:
--username
/UV_PUBLISH_USERNAME
および--password
/UV_PUBLISH_PASSWORD
デバッグ
MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用を強くお勧めします。
次のコマンドを使用して、 npm
経由で MCP Inspector を起動できます。
起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
テクノロジー、データサイエンス、サイバーセキュリティなど、さまざまなカテゴリのニュース記事へのアクセスを提供し、最新のコンテンツを取得および要約できるサーバーです。
Related MCP Servers
- AsecurityAlicenseAqualityThis server enables users to perform Google News searches with automatic categorization and multi-language support via SerpAPI integration.Last updated -155972JavaScriptMIT License
- AsecurityAlicenseAqualityProvides tools to fetch and search news from The Verge's RSS feed, allowing users to get today's news, retrieve random articles from the past week, and search for specific keywords in recent Verge content.Last updated -352TypeScriptMIT License
Juhe News MCP Serverofficial
AsecurityFlicenseAqualityA Model Context Protocol server that enables large language models to access the latest trending news headlines and detailed content across various categories including recommended, domestic, technology, and sports news.Last updated -2Python- -securityFlicense-qualityA modular, scalable news aggregation backend that provides a unified interface to TheNewsAPI for retrieving current and historical news articles with advanced filtering capabilities, designed specifically for consumption by AI agents.Last updated -4