JNews
About
Lightweight Python FastAPI server implementation for streamlined server-side interactions, using modern tooling like uv for dependency management and GitHub Actions for automated testing and deployment.
Details
- Author
- juhemcp
- Repository
- juhemcp/jnews-mcp-server
- Downloads
- 1,459
- Categories
- Design, Developer Tools, Infrastructure, Automation, Frontend
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
JNewsCommand (node, npx, python, etc.)uvxArguments-
Argument 1
jnews-mcp-server
Environment-
JUHE_NEWS_API_KEY
your_api_key
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
JUHE_NEWS_API_KEY: 聚合数据的新闻头条API密钥。获取:https://www.juhe.cn/docs/api/id/235
JUHE_NEWS_API_KEY=your_api_key
get_news_list
根据新闻类型获取今日热点新闻头条. Parameters: type (optional string, default is 'top'), page (int, default is 1), page_size (int, default is 20)
get_news_content
根据新闻类型获取今日热点新闻头条. Parameters: uniquekey (string, required)
服务器实现了两个工具:
- 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]:
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"jnews": {
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
},
"args": [
"jnews-mcp-server"
],
"command": "uvx"
}
}
}
Linux
{
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
},
"args": [
"jnews-mcp-server"
],
"command": "uvx"
}
Macos
{
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
},
"args": [
"jnews-mcp-server"
],
"command": "uvx"
}
Windows
{
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
},
"args": [
"-m",
"jnews_mcp_server"
],
"command": "python"
}
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 pipUsing 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
<details>
<summary>Using uvx</summary>
"mcpServers": {
"jnews-mcp-server": {
"command": "uvx",
"args": [
"jnews-mcp-server"
],
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
}
}
}
</details>
<details>
<summary>Using pip installation</summary>
"mcpServers": {
"jnews-mcp-server": {
"command": "python",
"args": [
"-m",
"jnews_mcp_server"
],
"env": {
"JUHE_NEWS_API_KEY": "your_api_key"
}
}
}
</details>
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
1. "今日有哪些热点新闻?" 2. "当前体育热点头条?" 3. "第5条新闻的详细内容"29:["$","div",null,{"className":"my-8 pb-8 h-full max-w-5xl mx-auto","children":["$","div",null,{"className":"grid grid-cols-1 md:grid-cols-3 gap-6","children":["$","$L30",null,{"mcp":{"id":"mcp_MAKrIqyJGoOL","name":"JNews","description":"Lightweight Python FastAPI server implementation for streamlined server-side interactions, using modern tooling like uv for dependency management and GitHub Actions forSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





