一个提供热点新闻头条信息功能的模型上下文协议(Model Context Protocol)服务器。
Project description
Juhe News MCP Server
一个提供新闻头条信息功能的模型上下文协议(Model Context Protocol)服务器。该服务器使大型语言模型(LLMs)能够获取当前最新的热点新闻头条(包括:推荐、国内、科技、体育等类型)及详细内容信息。
Components
Tools
服务器实现了两个工具:
- get_news_list: 根据新闻类型获取今日热点新闻头条
- 需要传入 "type"(新闻类型)作为选填的字符串参数。
async def get_news_list(type: str = "top", page: int = 1, page_size: int = 20) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
- get_news_content: 根据新闻类型获取今日热点新闻头条
- 需要传入 "uniquekey"(新闻id)作为必须的字符串参数。
async def get_news_content(uniquekey: str) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
Install
This server requires Python 3.10 or higher. Install dependencies using uv (recommended) or pip
Using uv (recommended)
When using uv no specific installation is needed. We will use uvx to directly run jnews-mcp-server.
uvx jnews-mcp-server
Using PIP
Alternatively you can install jnews-mcp-server via pip:
pip install jnews-mcp-server
After installation, you can run it as a script using:
python -m jnews_mcp_server
Configuration
Environment Variables
JUHE_NEWS_API_KEY: 聚合数据的新闻头条API密钥。获取:https://www.juhe.cn/docs/api/id/235
JUHE_NEWS_API_KEY=your_api_key
Claude Desktop
- On MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Using uvx
"mcpServers": {
"jnews-mcp-server": {
"command": "uvx",
"args": [
"jnews-mcp-server"
],
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
}
}
}
Using pip installation
"mcpServers": {
"jnews-mcp-server": {
"command": "pip",
"args": [
"-m",
"jnews-mcp-server"
],
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
}
}
}
Debugging
You can use the MCP inspector to debug the server. For uvx installations:
npx @modelcontextprotocol/inspector uvx jnews-mcp-server
Or if you've installed the package in a specific directory or are developing on it:
cd path/to/servers/src/jnews-mcp-server
npx @modelcontextprotocol/inspector uv run jnews-mcp-server
Examples of Questions for Cline
- "今日有哪些热点新闻?"
- "当前体育热点头条?"
- "第5条新闻的详细内容"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jnews_mcp_server-0.1.3.tar.gz.
File metadata
- Download URL: jnews_mcp_server-0.1.3.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc2e578886754df8d63eb62f383af463a32a185a1f1708c6f3f5a47a9eef808f
|
|
| MD5 |
916fc3de5d1c955ed42762f488b7588a
|
|
| BLAKE2b-256 |
62c2379d78991b60c386080aa9cc3bff1002a2d9015bf4183b8bf92db14d4df3
|
Provenance
The following attestation bundles were made for jnews_mcp_server-0.1.3.tar.gz:
Publisher:
publish-pypi.yml on juhemcp/jnews-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jnews_mcp_server-0.1.3.tar.gz -
Subject digest:
bc2e578886754df8d63eb62f383af463a32a185a1f1708c6f3f5a47a9eef808f - Sigstore transparency entry: 183980769
- Sigstore integration time:
-
Permalink:
juhemcp/jnews-mcp-server@c636bab39b9439defaa5c993037f8bc806eeebe9 -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/juhemcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@c636bab39b9439defaa5c993037f8bc806eeebe9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file jnews_mcp_server-0.1.3-py3-none-any.whl.
File metadata
- Download URL: jnews_mcp_server-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95268fc3b4d420975c04721089caa2a3952fb35565ae9dbcacdee835fddaa682
|
|
| MD5 |
b96c8351dd0f1cb96b9006940e4ebd59
|
|
| BLAKE2b-256 |
75232a45a12d59155f996fcd2bc3f39beb026107817b6ec03f8f7329d55747df
|
Provenance
The following attestation bundles were made for jnews_mcp_server-0.1.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on juhemcp/jnews-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jnews_mcp_server-0.1.3-py3-none-any.whl -
Subject digest:
95268fc3b4d420975c04721089caa2a3952fb35565ae9dbcacdee835fddaa682 - Sigstore transparency entry: 183980773
- Sigstore integration time:
-
Permalink:
juhemcp/jnews-mcp-server@c636bab39b9439defaa5c993037f8bc806eeebe9 -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/juhemcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@c636bab39b9439defaa5c993037f8bc806eeebe9 -
Trigger Event:
release
-
Statement type: