saferagenticai-mcp
This server exposes the SaferAgenticAI safety framework to coding assistants over MCP, letting them query normative subgoals, safety design patterns, and operational heuristics.
Orient & survey:
list_suitesreturns all 16 suites;review_statsgives coverage, per-suite/per-confidence breakdowns, and validation issues.Retrieve requirements:
get_requirementfetches a subgoal plus its Pattern layer by id or display_id;list_requirementsfilters by suite, type, content type, confidence, or missing patterns.Search patterns:
search_patternsdoes field-weighted keyword ranking withmatched_in, snippets, and confidence flags;resolve_idcanonicalizes loose references.Task-driven discovery:
find_patterns_for_taskmaps natural-language task descriptions to the most relevant patterns grouped by suite.Trace references:
get_cross_referencesreturns outgoing adjacencies (author-asserted plus same-suite siblings);get_reverse_referencesshows incoming citations.Support review workflow:
list_unreviewedsurfaces un-reviewed patterns sorted by confidence and human-review flags.Operational heuristics:
list_operational_heuristicsandget_operational_heuristicexpose production-derived safety principles, framework mappings, design patterns, anti-patterns, and discovery narratives.Read-only design: server is intentionally read-only; review edits happen directly in YAML for auditability.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
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:
PyPI —
saferagenticai-mcpOfficial MCP Registry —
io.github.NellInc/saferagenticai-mcp
Also rolling out across the wider MCP ecosystem: mcp.directory, mcpservers.org, PulseMCP (via the registry ingest), and mcp.so.
Related MCP server: RemoteBridge
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-mcpuv handles isolation and caches the install. Works for single-command config
lines in ~/.claude/mcp.json.
Option 2 — pipx (isolated global install)
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:
python3 -m venv research/mcp/.venv
research/mcp/.venv/bin/pip install -e research/mcp/serverProduces research/mcp/.venv/bin/saferagenticai-mcp. Pattern YAML edits in
the repo are picked up live (editable mode).
Option 4 — from PyPI
pipx install saferagenticai-mcp
# or, with the modern uv toolchain:
uv tool install saferagenticai-mcp
# or plain pip:
pip install --user saferagenticai-mcpFor 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.yamlinsidesaferagenticai_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
{
"mcpServers": {
"saferagenticai": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/NellInc/saferagenticai-mcp",
"saferagenticai-mcp"
]
}
}
}With pipx or manual venv
{
"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)
Tool | Input | Returns |
| — | 16 suites with titles and subgoal counts |
|
| one subgoal + its Pattern layer; falls back to fuzzy candidates if no exact match |
| suite/type/content_type/confidence filters | filtered subgoal list with reliability signals |
|
| field-weighted ranked matches with |
|
| outgoing adjacencies |
|
| incoming adjacencies (who cites this pattern) |
|
| canonicalise a partial id, slug fragment, or display_id; always returns candidates |
|
| top patterns grouped by suite for a task description; defaults to compact mode for cheap triage |
|
| patterns without |
| — | coverage %, per-suite, per-confidence; plus validation issue count |
|
| operational heuristics distilled from production agentic AI deployment, optionally filtered by suite or keyword |
|
| single operational heuristic by id (e.g. |
Data sources
Normative framework:
framework/catalog/, loaded through the generatedassessor/src/data/criteria-v1.jsonprojectionPattern 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)
python3 -c "
from saferagenticai_mcp.framework_loader import load_framework
idx = 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'sversionfield.Pattern layer:
v1-draftwhile this directory is being populated;v1once 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_reviewedwrite 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.
Available Tools
12 toolsfind_patterns_for_taskAInspect
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.
Inputs: task (required), limit, verbosity.
get_cross_referencesAInspect
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.
Inputs: id (required), include_inferred.
get_operational_heuristicAInspect
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.
Inputs: id (required).
get_requirementAInspect
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.
Inputs: id (required), include_pattern.
get_reverse_referencesAInspect
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.
Inputs: id (required).
list_operational_heuristicsAInspect
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.
Inputs: query, suite_id.
list_requirementsBInspect
List subgoals matching filters (suite_id, suite_type, content_type, min_confidence, missing_pattern_only). Results capped by limit (default 50, max 100).
Inputs: limit, suite_id, suite_type, content_type, +3 more.
list_suitesAInspect
List all 16 suites in the SaferAgenticAI framework (9 drivers + 7 inhibitors) with subgoal counts and titles. Call this first to orient.
Inputs: no named parameters.
list_unreviewedAInspect
Return patterns that have not been human-reviewed yet (no reviewed_by). Sorted low-confidence first, then needs_human_review flagged, then alpha. Use during Phase 3 review to pick the next pattern to examine.
Inputs: limit.
resolve_idAInspect
Resolve a loose reference (partial id, display_id, slug fragment, or title keyword) to canonical pattern_id(s). Call this when you have a rough reference and need the exact id before calling get_requirement. Always returns candidates — never 'not found'.
Inputs: query (required), limit.
review_statsAInspect
Coverage stats: total patterns, reviewed %, per-suite and per-confidence breakdown. Surfaces load-time validation issue count.
Inputs: no named parameters.
search_patternsAInspect
Field-weighted keyword search across the framework. Substring match on lowercased terms; field weights: title 10x, summary 4x, SFR text 3x, description 2x, pattern body 1x. matched_in reports the highest-weighted field that matched. No semantic / embedding search — known limitation, see /mcp.html. Use verbosity='compact' to drop snippets and confidence flags (~70% smaller payload) when triaging.
Inputs: query (required), limit, verbosity.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool serves a distinct purpose: searching patterns, retrieving specific requirements or heuristics, listing suites or unreviewed patterns, resolving IDs, etc. No two tools overlap in functionality.
All tools use a consistent verb_noun pattern in snake_case (e.g., find_patterns_for_task, get_requirement, list_suites) with clear, predictable verbs.
12 tools is well-scoped for a framework knowledge base; each tool addresses a specific query or operation without redundancy or unnecessary complexity.
The set covers all likely user needs: orientation (list_suites), searching (search_patterns, find_patterns_for_task), retrieval (get_requirement, get_operational_heuristic), cross-referencing (get_cross_references, get_reverse_references), resolution (resolve_id), and review (review_stats, list_unreviewed). No obvious gaps.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Read-only, no-auth MCP server over Human x AI's Content Hub and confirmed 2027 facts.
Read-only MCP server for the OPERANT AI operating-agent calibration benchmark.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn educational MCP server that exposes system tools (like IP, hostname, file operations, ping) for AI agents to execute via HTTP.MIT
- AlicenseNot gradedqualityDmaintenanceA safe, configurable MCP server enabling AI agents to sync, deploy, diagnose, and compare remote servers via structured tools like rsync and SSH.55 npm5MIT
- AlicenseNot gradedqualityDmaintenanceA safe, allowlisted MCP server that lets AI agents run only a tiny set of harmless tools (echo, datetime, hash, dig, GET-only curl, whois, status checks) against explicitly allowed hosts, with sanitization, rate limiting, timeouts, and full audit logging.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that equips AI agents with real-world tools including file operations, read-only MySQL queries, web summarization, safe calculations, and system info. It uses stdio transport and enforces safety guardrails like SELECT-only database access and AST-based math evaluation.MIT