Saferagenticai Mcp

io.github.NellInc由 GitHub 帳號 NellInc 發布v0.4.2更新於 Nov 6, 2026

Read-only tools over the Safer Agentic AI framework: 239 patterns + 15 heuristics.

發布方自己的服務:OnionLens Tor Tools

已驗證Streamable HTTP可網頁執行知識與記憶AI 與機器學習

概覽

AI 產生的概覽

唯讀 MCP 伺服器,提供 Safer Agentic AI 框架的 239 條模式與 15 條維運經驗,讓助理在設計代理時查閱安全準則。

可以做什麼
  • 瀏覽框架的 16 個套件及其子目標數量
  • 依 pattern_id 或 display_id 取得單一要求與其模式指引,或依套件、類型、內容類型、信心度篩選列出要求
  • 以欄位加權關鍵字搜尋模式,並把自然語言任務描述對應到依套件分組的候選模式
  • 將不完整的 ID、slug 片段或標題解析為標準 pattern_id,並查詢出向與入向交叉參照
  • 讀取從生產環境代理部署中歸納的維運經驗,可依套件或關鍵字篩選
適用情境
適合在助理協助設計、審查或強化代理式 AI 系統時,隨時查閱此框架的準則、模式與交叉參照。它是參考資料查詢工具,不執行程式碼或執行期操作。
執行需求
可使用遠端端點,或在本地安裝 Python 套件 saferagenticai-mcp(透過 uvx、pipx 或虛擬環境執行)。未宣告需要帳號、API 金鑰或環境變數。README 指出本地版本僅支援 stdio。
安裝前請注意
所有工具皆為唯讀,沒有寫入或審查工具。模式皆為模型產生的草稿,沒有人工審查流程,信心度僅為起草模型的自評,應視為未經查證的參考。README 亦指出本地版本尚未實作遠端傳輸與驗證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Saferagenticai Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.NellInc%2Fsaferagenticai-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "saferagenticai": {
      "type": "http",
      "url": "https://mcp.saferagenticai.org/mcp"
    }
  }
}

README

SaferAgenticAI MCP Server

Serves the SaferAgenticAI framework (canonical criteria + Implementation Patterns layer) to coding assistants via the Model Context Protocol.

Available in

Published to the canonical MCP catalogues — install from a registry-aware client or the CLI below:

Also rolling out across the wider MCP ecosystem: mcp.directory, mcpservers.org, PulseMCP (via the registry ingest), and mcp.so.

Install

Pick the path that matches your setup.

Option 1 — uvx (fastest, no manual venv)

If you have uv installed, point your MCP client at:

uvx --from git+https://github.com/NellInc/saferagenticai-mcp saferagenticai-mcp

uv handles isolation and caches the install. Works for single-command config lines in ~/.claude/mcp.json.

Option 2 — pipx (isolated global install)

bash
pipx install "git+https://github.com/NellInc/saferagenticai-mcp"

Exposes saferagenticai-mcp globally; updated with pipx upgrade saferagenticai-mcp.

Option 3 — manual venv (works offline from a checkout)

Homebrew / system Python blocks direct pip install under PEP 668, so if you've cloned the repo and want an editable install:

bash
python3 -m venv research/mcp/.venvresearch/mcp/.venv/bin/pip install -e research/mcp/server

Produces research/mcp/.venv/bin/saferagenticai-mcp. Pattern YAML edits in the repo are picked up live (editable mode).

Option 4 — from PyPI

bash
pipx install saferagenticai-mcp# or, with the modern uv toolchain:uv tool install saferagenticai-mcp# or plain pip:pip install --user saferagenticai-mcp

For audit-trail reproducibility, pin the version: pipx install saferagenticai-mcp==0.3.6. The package bundles criteria-v1.json + 238 pattern YAMLs + 4 exemplars

  • operational_heuristics.yaml inside saferagenticai_mcp/_data/, so a wheel install works without any repo checkout. (The 0.3.0 wheel predates the corpus extension and bundles only 214 patterns, no heuristics; 0.3.1 is the first complete build.)

Configure (Claude Code)

Add to ~/.claude/mcp.json (or your IDE's MCP config). Pick the variant that matches your install option.

With uvx

json
{  "mcpServers": {    "saferagenticai": {      "command": "uvx",      "args": [        "--from",        "git+https://github.com/NellInc/saferagenticai-mcp",        "saferagenticai-mcp"      ]    }  }}

With pipx or manual venv

json
{  "mcpServers": {    "saferagenticai": {      "command": "/absolute/path/to/saferagenticai-mcp"    }  }}

For a manual venv checkout, the absolute path is <repo>/research/mcp/.venv/bin/saferagenticai-mcp.

Restart Claude Code / your IDE after editing. The server will load on the first tool call from your assistant.

Tools (12 total)

ToolInputReturns
list_suites—16 suites with titles and subgoal counts
get_requirementid, include_patternone subgoal + its Pattern layer; falls back to fuzzy candidates if no exact match
list_requirementssuite/type/content_type/confidence filtersfiltered subgoal list with reliability signals
search_patternsquery, limit, verbosityfield-weighted ranked matches with matched_in and (in full mode) snippets + confidence flags. Field weights: title 10×, summary 4×, sfr 3×, description 2×, body 1×
get_cross_referencesid, include_inferredoutgoing adjacencies
get_reverse_referencesidincoming adjacencies (who cites this pattern)
resolve_idquerycanonicalise a partial id, slug fragment, or display_id; always returns candidates
find_patterns_for_tasktask, limit, verbositytop patterns grouped by suite for a task description; defaults to compact mode for cheap triage
list_unreviewedlimitpatterns without reviewed_by, sorted low-confidence first
review_stats—coverage %, per-suite, per-confidence; plus validation issue count
list_operational_heuristicssuite_id?, query?operational heuristics distilled from production agentic AI deployment, optionally filtered by suite or keyword
get_operational_heuristicidsingle operational heuristic by id (e.g. OH::geoffrey-pattern); returns full entry with principle, framework mapping, design patterns, and discovery narrative

Data sources

  • Normative framework: framework/catalog/, loaded through the generated assessor/src/data/criteria-v1.json projection
  • Pattern layer: research/mcp/suites/<SUITE>/<pattern_id>.yaml (238 files)
  • Exemplars: research/mcp/exemplars/*.yaml (fallback for four anchor subgoals)
  • Operational heuristics: research/mcp/operational_heuristics.yaml (14 heuristics)

At startup the server loads both and builds an in-memory index keyed by pattern_id. display_id lookups are also supported but may resolve to multiple subgoals (underlined variants).

Smoke test (without MCP installed)

bash
python3 -c "from saferagenticai_mcp.framework_loader import load_frameworkidx = load_framework()print(f'{len(idx.subgoals)} subgoals, {sum(1 for s in idx.subgoals.values() if s.has_pattern)} with patterns')"

Versioning

  • Canonical framework: follows criteria-v1.json's version field.
  • Pattern layer: v1-draft while this directory is being populated; v1 once reviewed.
  • Server: semantic versioning. Current release is 0.3.6 (framework 1.3-draft, full 238-pattern corpus, and operational heuristics bundled). Pin explicitly for audit reproducibility.

What's already built in

  • Hot reload — server stat-walks the source tree on each tool call; edits show up without restart.
  • Load-time validation — required fields, content_type enum, confidence enum. Invalid patterns log WARNINGs but don't fail the server.
  • find_patterns_for_task — natural-language task → top patterns grouped by suite. Replaces the need for a separate embedding index at current scale.
  • Reverse xref index — built at load, queried by get_reverse_references.

Not implemented

  • Auth / remote transport (stdio only).
  • Embedding-based semantic search — the field-weighted keyword scoring is sufficient at 238 patterns; embeddings would be worth it at 10× this scale.
  • mark_reviewed write tool — deliberately not added. Phase 3 review edits go through the YAML directly (editor + git diff = auditable); the MCP stays read-only.

The broader agent-native architecture proposes composite orientation, context-pack, workspace, planning, action, and verification operations. They are explicitly not part of the current 0.3.6 interface. See ../../architecture/README.md for the target and compatibility plan.

The authoritative catalog maps current MCP identifiers and slugs to permanent requirement IDs. Server 0.3.6 retains its twelve-tool interface, loads the generated packaged snapshot, validates saai.catalog.v1, and reports the shared snapshot hash.

License

This server (the code in this directory) is licensed MIT — see LICENSE.

The safety-framework content it serves (the patterns, canonical criteria, and operational heuristics bundled under saferagenticai_mcp/_data/) is part of the SaferAgenticAI framework, published under CC-BY-4.0 at the repository root. Attribution: Nell Watson and the Agentic AI Safety Community of Practice.

來源:README.md,提交 07e3651

工具

10

list_suites

List all 16 suites in the SaferAgenticAI framework (9 drivers + 7 inhibitors) with subgoal counts and titles. Call this first to orient.

無需輸入參數。

get_requirement

Retrieve one subgoal (framework normative content + Pattern layer guidance) by pattern_id (e.g., 'D3::idx2::sandboxing') or display_id (e.g., 'D3.2'). display_id may resolve to multiple subgoals — underlined variants share display_ids.

輸入參數id必填include_pattern

list_requirements

List subgoals matching filters (suite_id, suite_type, content_type, min_confidence, missing_pattern_only). Results capped by limit (default 50, max 100). Every pattern is a model-generated draft (review_status generated_draft; there is no human-review process); confidence is the drafting model's own rating of its draft.

輸入參數limitsuite_idsuite_typecontent_typemin_confidenceinclude_patternmissing_pattern_only

search_patterns

Field-weighted keyword search across the framework. Terms match at word starts on lowercased text and are IDF-weighted, so rare terms outrank ubiquitous ones; field weights: title 10x, summary 4x, SFR text 3x (all of a subgoal's SFRs scored as one field), description 2x, pattern body 1x. `matched_in` reports the highest-weighted field that matched. Common practitioner phrases are expanded to the framework's own terms at half weight (reported in `expanded_terms`), and requirement ids such as d2.1, D2-1 or G1.2 are pinned to the top (`matched_in: identifier`). No semantic / embedding search — known limitation, see /mcp.html. Use verbosity='compact' to drop snippets and confidence flags (~70% smaller payload) when triaging.

輸入參數limitquery必填verbosity

get_cross_references

Return outgoing adjacencies for a pattern. `explicit_cross_references` are author-asserted (each pattern's `cross_references` YAML field). `inferred_adjacent` (when include_inferred=true) currently returns *same-suite siblings only* — it does not do semantic similarity. Treat inferred entries as 'neighbours worth scanning,' not as endorsed dependencies.

輸入參數id必填include_inferred

resolve_id

Resolve a loose reference (partial id, display_id, slug fragment, or title keyword) to canonical pattern_id(s). Case, separator and G/I prefix are normalised (d2.1, D2-1, 'D2 1', G1.2); a hyphen or space returns both the numbered requirement and its underlined variant. Call this when you have a rough reference and need the exact id before calling get_requirement. Always returns candidates — never 'not found'.

輸入參數limitquery必填

find_patterns_for_task

Given a natural-language task description (e.g., 'I'm building a tool-using agent that runs shell commands'), return the most relevant patterns grouped by suite. Use this as a starting point for any cross-cutting design question; then follow up with get_requirement on specific pattern_ids. Defaults to verbosity='compact' (cheap triage); pass 'full' to inline snippets and confidence flags.

輸入參數task必填limitverbosity

get_reverse_references

Return patterns that reference the given pattern_id in their cross_references. Complement to get_cross_references (outgoing); this shows incoming. Use to find all consumers of a given pattern.

輸入參數id必填

list_operational_heuristics

List operational heuristics distilled from production agentic AI deployment (Claude Code, Rewind). These are cross-cutting safety principles discovered through building and operating AI agents, mapped to framework suites. Optional filters: suite_id (heuristics relevant to a specific suite), query (keyword search across titles and principles). Separate from the normative pattern layer — different category of knowledge.

輸入參數querysuite_id

get_operational_heuristic

Retrieve a single operational heuristic by id (e.g., 'OH::geoffrey-pattern'). Returns the full entry: principle, framework mapping, evidence sources from production deployment, design patterns, anti-patterns, and discovery narrative.

輸入參數id必填

版本歷史

3
  1. v0.4.2最新Nov 6, 2026
  2. v0.4.1Nov 3, 2026
  3. v0.3.6Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Onionlens 整合