内容
[<img src="https://raw.githubusercontent.com/hurutta/bangla-news-mcp/main/assets/bangla_news_mcp_logo.png" style="height:138px" align="right">](https://github.com/hurutta/bangla-news-mcp)
<div style="display: flex; align-items: center;">
<div style="flex: 1;">
<h1 style="margin: 0;">Bangla News MCP Server</h1>
<p style="margin-top: 0;">一个模型上下文协议(Model Context Protocol, MCP)服务器,用于获取孟加拉新闻,以为LLMs提供上下文。</p>
</div>
</div>
<hr>
<div align="center" style="line-height: 0;">
[](https://github.com/modelcontextprotocol/servers)
[](https://smithery.ai/server/@hurutta/bangla-news-mcp)
[](https://pypi.org/project/bangla-news-mcp/)
[](https://img.shields.io/github/v/tag/hurutta/bangla-news-mcp)
[](https://img.shields.io/github/issues/hurutta/bangla-news-mcp)
[](https://github.com/hurutta/bangla-news-mcp/blob/main/LICENSE)
</div>
## 📖 描述
一个轻量级的 [模型上下文协议(Model Context Protocol, MCP)](https://modelcontextprotocol.io/introduction) 服务器,以结构化格式提供用孟加拉语撰写的孟加拉国新闻。
旨在与LLM模型和新闻聚合平台无缝集成。
快速、可扩展,并针对孟加拉语处理进行了优化。
## 🔬 安装
### 通过Smithery安装
要通过 [Smithery](https://smithery.ai/server/@hurutta/bangla-news-mcp) 自动安装bangla-news-mcp到Claude Desktop:
```bash
npx -y @smithery/cli install @hurutta/bangla-news-mcp --client claude
```
### 使用虚拟环境
```bash
# 创建虚拟环境
python3 -m venv venv
source venv/bin/activate
# 安装包
pip install git+https://github.com/hurutta/bangla-news-mcp.git
```
### 从源代码构建
```bash
# 创建虚拟环境
python3 -m venv venv
source venv/bin/activate
# 克隆仓库
git clone https://github.com/hurutta/bangla-news-mcp
cd bangla-news-mcp
# 以开发模式安装
pip install -e .
```
## 🔌 使用
### Claude.app的配置
添加到你的Claude设置中:
```json
{
"mcpServers": {
"bangla_news": {
"command": "python",
"args": [
"-m",
"bangla_news_mcp"
],
"disabled": false,
"autoApprove": []
}
}
}
```
👆🏼 如果你在虚拟环境中安装了pip包,请调整`command`和`args`。
## 🛠️ 可用工具
#### 获取最新的孟加拉新闻头条
- `fetch_latest_news_headlines`: 返回最新的各种类别的孟加拉新闻列表
#### 按查询获取孟加拉新闻
- `fetch_news_headlines_by_query`: 返回用户查询的孟加拉新闻列表
## 🔌 开发
#### 激活安装了该包的虚拟环境,并运行 -
```bash
source venv/bin/activate
python -m bangla_news_mcp
```
<hr>