
strumbyte/mcp-writ
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Обеспечение соблюдения политики, песочница ОС и аудит JSON-RPC для серверов MCP
Обзор
Реализация политики, песочница ОС и аудит JSON-RPC для локальных серверов стандартного контекстного протокола (MCP). mcp-writ находится между клиентом MCP и сервером, обеспечивая соблюдение мелкозернистых политик безопасности — управление доступом к файловой системе, фильтрация сискалов и листинг инструментов. Анализ Native syscall охватывает Linux x86-64 и AArch64 ELF и macOS ARM64 Mach-O. mcp-writ - это точка правоприменения контрольной плоскости: он проверяет определения инструментов сервера, когда конфигурируется значок «инструменты-список-хэш», разрешает или отклоняет инструменты / вызов, ограничивает путь и аргументы хоста, контролирует среду запуска и записывает журнал аудита. Инспекция плоскости данных — DLP, шлюзы HTTP / SSE, суждение на основе LLM — это работа другого уровня; развертывайте mcp-письменный ряд с такими инспекторами, а не ожидайте, что он заменит их. — песочница ОС на Linux, Windows и macOS в сочетании с аудитом JSON-RPC. — работает без привилегий root.
Обзор (машинный перевод)
/ Японский
Обеспечение соблюдения политики, песочница ОС и аудит JSON-RPC для локального стио Серверы Model Context Protocol (MCP). mcp-writ находится между клиентом MCP и сервером, обеспечивая соблюдение мелкозернистых политик безопасности — управление доступом к файловой системе, фильтрация сискалов и листинг инструментов. Native syscall анализ охватывает Linux x86-64 и AArch64 ELF и macOS ARM64 Mach-O — см. Поддерживаемые цели.
mcp-writ является контрольно-плановой точкой правоприменения: он проверяет сервер.
когда конфигурируется tools-list-hash, разрешает или
Отрицает tools/call, ограничивает путь и принимает аргументы, контролирует
среды запуска и записывает журнал аудита.
Инспекция самолёта данных — DLP, шлюзы HTTP/SSE, основанные на LLM
суждение — это работа другого уровня; развертывайте mcp-writ последовательно с таким
Вместо того, чтобы ожидать, что они заменят их.
Особенности
Многоуровневая защита — песочница ОС на Linux, Windows и macOS в сочетании с аудитом JSON-RPC. ** Непривилегированная операция** — работает без привилегий root.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
mcp-writ
Policy enforcement, OS sandboxing, and JSON-RPC auditing for local stdio Model Context Protocol (MCP) servers. mcp-writ sits between the MCP client and server, enforcing fine-grained security policies — filesystem access control, syscall filtering, and tool allowlisting. Native syscall analysis covers Linux x86-64 and AArch64 ELF binaries and macOS ARM64 Mach-O binaries — see Supported targets.
mcp-writ is a control-plane enforcement point: it verifies the server’s
tool definitions when a tools-list-hash pin is configured, permits or
denies tools/call, constrains path and host arguments, controls the
launch environment, and records an audit log.
Data-plane inspection — response-body DLP, HTTP/SSE gateways, LLM-based
judgment — is a different layer’s job; deploy mcp-writ in series with such
inspectors rather than expecting it to replace them.
Features
- Multi-layer defense — OS sandboxing on Linux, Windows, and macOS, combined with JSON-RPC auditing.
- Non-privileged operation — runs without root privileges.
- Static analysis — inspect native ELF and Mach-O binaries and supported scripts — Python and JavaScript/TypeScript sources; other script files are identified from their shebang or the command name — to surface capabilities before execution.
- Policy generation and testing — generate KDL policy drafts, with optional tool discovery, self-tests, and dry-run auditing to help review them.
- Container support — build and wrap MCP server images, then run them with policy enforcement using Docker or Podman.
- Tool access controls — check tool permissions and arguments, hide denied or unlisted tools from
tools/list, protect sensitive paths, and optionally restrict sequences of tool calls. - Tool definition verification — scan advertised tool definitions, verify pinned hashes, and revalidate changes before resuming tool calls.
See the detailed guide for configuration, enforcement behavior, and platform limitations.
Architecture
flowchart TB
subgraph "Analysis: policy drafting"
I["Inspectorstatic analysis"] -->|capability profile| L["Legislatorpolicy drafting"]
T["MCP servertools/list discovery"] -.->|intent profile| L
L --> P[("policy.kdl")]
end
subgraph "Runtime enforcement"
P --> W["WardenOS sandbox"]
P --> A["AuditorJSON-RPC proxy"]
C["MCP client"] |stdio| A
A |stdio| S["MCP server"]
W -.->|applied before spawn| S
end
style I fill:#e3f2fd
style L fill:#e8f5e9
style W fill:#fff3e0
style A fill:#fce4ec
Inspector analyzes binaries and supported source files. Legislator uses those results and optional live tool discovery to draft a policy. At runtime, Warden applies the OS sandbox and Auditor checks MCP traffic. See the
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"filesystem": {
"command": "mcp-writ",
"args": [
"run",
"--policy", "/opt/mcp-config/policy.kdl",
"--audit-log", "/opt/mcp-logs/audit.jsonl",
"--", "mcp-server-filesystem", "/srv/mcp-data"
],
"env": {}
}
}
}