8``oct.mcp`` - Secure MCP server package for Option C Tools.
10This package implements the six-layer pipeline described in the
11Secure MCP Architecture Blueprint (Phase 5A read-only tools +
12Phase 5B write tools with HITL consent):
14 Layer 1 - Gateway (workspace binding, rate limiting)
15 Layer 2 - Input Validator (Pydantic models, path containment)
16 Layer 2.5 - Safety Gate (HITL consent + dry-run enforcement, Phase 5B)
17 Layer 3 - Policy Engine (tool allowlist, profile enforcement)
18 Layer 4 - Execution Sandbox (env sanitisation, subprocess isolation)
19 Layer 5 - Output Redactor (secret patterns, path anonymisation)
20 Layer 6 - Audit Logger (JSONL at ~/.oct-mcp/audit.log)
22Entry point: ``python -m oct.mcp [--project-root PATH] [--profile PROFILE]``
26- Re-export the config and safety-gate entry points the server and its
28- Keep the layer ordering above authoritative: every tool call traverses
35 L2 - (none) the package root re-exports only; each layer reports itself
36 L3 - (none) see oct.mcp.policy, oct.mcp.safety and oct.mcp.audit
41- The package root holds no pipeline logic; each layer lives in its own
42 module and is imported explicitly.
43- ``__all__`` is the supported surface; anything else is internal.
47- oct.core.diagnostics (_dbg structured logger, imported but never called at package import)
48- oct.mcp.config (McpConfig and load_config, re-exported)
49- oct.mcp.safety (SafetyGate and SafetyDecision, re-exported)
55from oct.core.diagnostics
import _dbg
57__all__ = [
"McpConfig",
"load_config",
"SafetyGate",
"SafetyDecision"]