Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Generate Docs

on:
push:
branches:
- main
- dev

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Generate HTML docs with Sphinx
run: |
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints
sphinx-apidoc -o docs/source src/news_mcp_server

- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: api-docs
path: docs
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ dmake build # 构建 Docker 镜像
- 引入基于 JWT 或 OAuth2 的更安全鉴权机制
- 支持多进程/多实例共享会话(如使用 Redis Session Store)
- 优化 Elasticsearch 查询性能,添加缓存层(Redis)
- 集成请求限流和熔断策略,以防止高频或恶意请求
- 增加端到端集成测试覆盖,并配置 CI/CD 流水线
- 支持 ES 聚合查询与热门关键词统计功能
- 提供 Swagger UI 或 Postman 集合示例
Expand Down
6 changes: 3 additions & 3 deletions src/news_mcp_server/mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from .services.news_service import NewsService
from .clients.elastic_client import AsyncElasticClient
from .middlewares.audit import AuditMiddleware
import structlog
logger = structlog.get_logger(__name__)

from .utils.logger import logger
logger.info("News MCP module")


class NewsMCP(FastMCP):
"""FastMCP server with authentication middleware."""
pass
Expand Down