Skip to content
Conduit

mcp server

secnews

SecNews v0.8.6: 面向 AI + 安全从业者的单机 AI Native 证据工作台 · 全链证据账本 资讯→Signal→Case→Claim→Run→Artifact→Knowledge · NAV4 四菜单壳 (资讯/知识/行动/设置) · llm-wiki-2.0 wiki-first 知识库 · MITRE ATT&CK/NVD 安全图谱 · MCP 开放 19 个工具 ·

anyeduke11/secnewscommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 21, 2026

SecNews · AI + 安全 知识工作站

SecNews(开发代号 hotspot)是面向 AI + 安全从业者 的单机 AI Native 证据工作台。 全站收敛为 NAV4 四菜单壳:资讯 → 知识 → 行动 → 设置, 主干为 资讯 → Signal → Case → Claim → Run → Artifact → Knowledge 全链证据账本 (Agent 产出提案 · 人负责审批 · 每个结论带证据回执 · 每次失败显式可归因)。 通过 MCP 协议 对外暴露 19 个工具 (11 读 + 8 写), Cursor / Claude Desktop / Trae / Claude Code 等外部 AI Agent 零改造接入。

一个人 · 一台电脑 · 零外部服务。


快速开始

git clone https://github.com/anyeduke11/secnews.git && cd secnews

# 后端(端口 8000)
python -m venv .venv && source .venv/bin/activate
pip install -r backend/requirements.txt
python run.py                        # http://127.0.0.1:8000

# 前端(端口 8898,严格端口,占用即报错)
cd frontend && npm install && npm run dev   # http://localhost:8898

代理配置(可选):backend/proxy_config.json 默认 mode=off。 需要时把 127.0.0.1:7897 改成你的代理端口; security_collector 和 github_collector 走代理才能拿到数据, 前端 /settings 可运行时改,无需重启。

隐私保护:proxy_config.json / .env / *.db / node_modules 全部已在 .gitignore 排除。 仓库仅包含 proxy_config.example.json / .env.example 模板, 你需要本地复制并填入自己的代理 / API key,不会被推送到 GitHub。

为什么选择 SecNews?

能力说明
热点聚合19 采集器 · 14 质量门禁 · 7 大领域覆盖
知识沉淀md 真源 · kl_pipeline 5 阶段 · FTS5 检索 · 注意力评分
项目管理CodeGarden 项目生命周期 + 服务网格 + 资源中枢
安全图谱MITRE ATT&CK · NVD CVE · 等保 / 关基 / 数安法
证据账本Run 账本 · 提案通道 · 证据回执 · 失败显式可归因
AI 协作19 MCP 工具 · 外部 AI Agent 零改造接入
单机部署SQLite + 单进程 · 零外部依赖 · git clone 即跑

NAV4 — 四菜单壳(v0.8.5 起,v0.8.6 AI Native 主干)

SentinelShell 4-tab + 管道心跳条全站常驻,是唯一壳;v1.0 九领域对象以能力区块内嵌(SignalPanel / CaseQueuePanel / ExecOverviewPanel):

菜单路由解决什么
资讯/19 采集器 · 14 质量门禁 · Pipeline 流水线 · 趋势 / 搜索 / 导出 · 信号面板
知识/knowledgeLLM-Wiki 2.0 · md 真源 · kl_pipeline 5 阶段 · FTS5 · 案件队列 · 画布
行动/action执行总览 · CodeGarden 联动 · 项目 · 服务 · 资源 · 事件
设置/settingsdsh 受管子进程 / pi agent / 同步策略 / MCP / 观测

工具页经 PageLayout + menuOf() 自动归属四菜单:/skill-store(SK 能力包)· /knowledge/canvas(画布 demo)· /maint(维护)等。

旧路由全部重定向兼容(透传 query):/secnews /judge /judge/graph /garden → 对应四菜单;v1 四入口 /workbench /intel → /,/cases → /action。

主题支持 3 态:light / dark / paper(纸面版暖米黄纸底 + 衬线字体)。

架构

MCP Server — 19 个工具

11 读 + 8 写,外部 AI Agent 零改造接入(/api/mcp SSE 通道 + python -m backend.mcp_stdio_main stdio 通道双暴露)。

读 (11)写 (8)
search_hotspots · get_hotspot · list_favorites · search_knowledge · get_personal_profile · wiki_search · wiki_read · wiki_graph · db_trace · kl_status · dsh_analyzeadd_favorite · remove_favorite · add_annotation · update_knowledge_item · wiki_write · kl_enqueue · kl_retry · dsh_summarize

stdio 配置(粘到你的 AI Agent 配置):

{
  "mcpServers": {
    "hotspot": {
      "command": "python",
      "args": ["-m", "backend.mcp_stdio_main"],
      "cwd": "/绝对路径/secnews"
    }
  }
}
AI Agent配置文件路径
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
Trae~/.trae/mcp_config.json
Cursor~/.cursor/mcp.json
Claude Code项目根目录 .mcp.json

启动 AI Agent 后直接说「给我列最近 24h 的安全热点」「把今天这几条喂给 kl_pipeline」即可。

技术选型

组件选型理由
Web 框架FastAPIasync + OpenAPI 生态成熟
主存储SQLite WAL + llm-wiki-2.0/零部署 · FTS5 · git 友好 · LLM 可直读 · md 文件是 source of truth
调度APScheduler · 59 jobs单进程内调度,无外部 MQ;含 8 个扩展 job 按 gate 过滤
采集器19 个 BaseCollector7 大领域覆盖,stdin/stdout 标准化
路由器101 个 FastAPI include_routercore 白名单 + 扩展域按 feature_gates 条件注册(16 gate)
业务服务161 个 services 包含 ai_hub / kl_pipeline / dsh / wiki_fs / model_router / agent_bridge / skills 等
MCPfastapi-mcpOpenAPI → MCP 自动转换 · 19 个工具
前端React 18 + Vite 5 + TypeScript210+ 组件 · 类型安全 · 热重载
图表echarts + recharts看板风格
加密Fernet (PBKDF2 派生)secrets · 同步包
跨端同步WebDAV (坚果云) · zip 容器加密包最小化 · 不依赖云服务

数字由 scripts/generate_meta.py AST 反推维护,CI generate_meta.py --check 强约束, 改完注册代码必须同步 docs/ARCHITECTURE.md。

路线图

历史版本(GitHub Releases)

每个版本附带源码 zip(git archive 产物,不含依赖与个人数据):

版本发布日期关键里程碑源码归档
v0.8.72026-10-14公开仓库交付收口:PII 卫生清理(本机路径/个人标识中性化)+ 版本/文档/资产全链对齐(v0.8.6 主干零改动)Source code (zip)
v0.8.62026-10-14AI Native 换主干:全链证据账本(资讯→Signal→Case→Claim→Run→Artifact→Knowledge)+ 提案通道 + 对话式命令栏Source code (zip)
v0.8.52026-09-08反向收敛:v0.8 三层 Sentinel 唯一壳恢复 + v1.0 九领域对象降级为能力区块Source code (zip)
v0.8.22026-09-05治理合批:全局并发单一真相源 + 配置热重载(gate 5s TTL)Source code (zip)
v0.8.12026-09-05七 gate 开闸 + 运行时弹性层 + graceful shutdown + deep 场景权重重排Source code (zip)
v0.8.02026-09-04v0.8 Skills 四阶段收口:20 内置 skill + /skill-store + /dashboardSource code (zip)
v0.7.42026-09-01观测深化 + 扩展开闸 + i18n 全量 + secrets ACL + 历史债清偿Source code (zip)
v0.7.02026-08-30Sentinel Terminal 三层工作流 (Data/Judge/Action)Source code (zip)
v0.6.02026-08-27统一工作台 6 tab · dsh 受管子进程 · CRM 业绩座舱Source code (zip)
v0.5.12026-08-26Chunks / Attention · FTS5 检索 · 5 维注意力评分Source code (zip)
v0.5.02026-08-23LLM-Wiki 2.0 · kl_pipeline 5 阶段 · md 真源Source code (zip)
v0.4.32026-08-19软分层 / Feature Gates · core/exec 边界Source code (zip)

main 分支动态:v0.8.7 已发版(公开仓库交付收口),main 与 tag v0.8.7 对齐。

测试

# 后端(5468+ passed)
python -m pytest backend/tests/ --tb=short -q
python -m pytest backend/tests/ -k "merge"        # 单一域筛选
python -m py_compile backend/services/sync_merge.py

# 前端(722+ passed)
cd frontend
npx vitest run
npx tsc --noEmit
npm run build

CI: .github/workflows/ci.yml — Python compile + pytest + tsc + vitest + vite build + generate_meta.py --check + harness_analyze.py --check。

常见问题

Q: 为什么不内置 LLM 推理? A: 让用户在自己已配好的 AI Agent 环境(Cursor / Claude Desktop / Trae / Claude Code)中推理, 避免重复配置和 API key 管理。SecNews 只负责数据存储 + 19 工具暴露。

Q: 能多用户吗? A: 当前是单用户本地工作站,无多用户 / 权限隔离。SQLite WAL 模式下 WORKERS=1 是约束条件。

Q: 数据怎么备份? A: 3 选 1:

  1. backend/data/backup_*.db(24h 滚动,APScheduler 自动)
  2. WebDAV 同步包(坚果云 · zip + Fernet 加密)
  3. git 跟踪 llm-wiki-2.0/ 目录

Q: 端口冲突怎么办? A: 后端改 PORT=8001 启动;前端改 vite --port 8899。 8898 是受保护端口(CodeGarden 资源中枢),禁止释放。

Q: 为什么不用 PostgreSQL / Redis / Celery? A: 违反「简单胜过复杂」原则 — 单机单用户场景下 SQLite WAL + APScheduler 已足够; 引入分布式组件会破坏「git clone 就能跑」的承诺。

Q: dsh / pi agent 怎么启停? A: 走前端 /settings 一键启停(gate dsh=true), 控制面经 /api/dsh/control/*;pi 执行 agent 经 /api/agents/run 调用。

贡献

新源 → 继承 BaseCollector + 测试 新门禁 → 继承 BaseGate + 进 pipeline.py 新 MCP tool → mcp_types.py 加 Pydantic + mcp_config.py 加 operation_id(当前 19 个工具: 11 读 + 8 写) 新前端能力 → 只能以四菜单区块进入,禁止新一级入口 / 新壳

详细:AGENTS.md · CLAUDE.md · docs/ARCHITECTURE.md · docs/CHANGELOG.md

禁止:

  • 提交 .env / 真实 proxy 配置 / 个人数据 / SQLite 数据库
  • 引入 Redis / PostgreSQL / Celery(违反「简单胜过复杂」原则)
  • 多 worker(SQLite WAL 锁限制)

许可证

LICENSE — GNU GPL-3.0


English

SecNews (codename hotspot) is a single-user local workstation for AI + security practitioners. The whole app is unified into the NAV4 4-tab shell: Feed → Knowledge → Action → Settings, with a persistent pipeline heartbeat bar. It exposes 19 MCP tools (11 read + 8 write) to external AI Agents — Cursor, Claude Desktop, Trae, Claude Code — with zero modifications.

One person · one machine · zero external services.

Quick start

git clone https://github.com/anyeduke11/secnews.git && cd secnews
python -m venv .venv && source .venv/bin/activate
pip install -r backend/requirements.txt
python run.py                          # http://127.0.0.1:8000
cd frontend && npm install && npm run dev   # http://localhost:8898

Configure backend/proxy_config.json (set your proxy port, default mode=off). Copy proxy_config.example.json → proxy_config.json first; the real file is gitignored.

MCP stdio config

{
  "mcpServers": {
    "hotspot": {
      "command": "python",
      "args": ["-m", "backend.mcp_stdio_main"],
      "cwd": "/absolute/path/to/secnews"
    }
  }
}

Releases

VersionDateMilestone
v0.8.72026-10-14Public-repo delivery closeout: PII hygiene sweep (machine-local paths / personal identifiers neutralized) + version/doc/asset alignment (v0.8.6 trunk unchanged)
v0.8.62026-10-14AI Native main-trunk swap: end-to-end evidence ledger (Feed → Signal → Case → Claim → Run → Artifact → Knowledge) + proposal channel + command bar
v0.8.52026-09-08Reverse convergence: v0.8 three-layer Sentinel as the only shell + v1.0 domain objects demoted to embedded capability blocks
v0.8.22026-09-05Governance batch: global concurrency single source of truth + config hot-reload (gate 5s TTL)
v0.8.12026-09-05Seven gates opened + runtime elasticity + graceful shutdown + deep scenario reranking
v0.8.02026-09-04v0.8 Skills 4-stage closeout: 20 built-in skills + /skill-store + /dashboard
v0.7.42026-09-01Observability deepening + expansion gates + i18n + secrets ACL + historical debt
v0.7.02026-08-30Sentinel Terminal 3-layer workflow (Data / Judge / Action)
v0.6.02026-08-27Unified workbench (6 tab) · dsh as managed subprocess · CRM cockpit
v0.5.12026-08-26Chunks / Attention · FTS5 search · 5-dimensional attention scoring
v0.5.02026-08-23LLM-Wiki 2.0 · kl_pipeline 5-stage · md as source of truth
v0.4.32026-08-19Soft core/exec partitioning · Feature Gates (TOML)

main branch: v0.8.7 (public-repo delivery closeout) has been released; main is aligned with tag v0.8.7.

License

LICENSE — GNU GPL-3.0

↑↓ navigate openesc close