oct
Loading...
Searching...
No Matches
oct.mcp Namespace Reference

Namespaces

namespace  __main__
namespace  audit
namespace  config
namespace  executor
namespace  metrics
namespace  policy
namespace  policy_loader
namespace  redactor
namespace  safety
namespace  sandbox
namespace  server
namespace  stdout_diversion
namespace  tools
namespace  validator

Detailed Description

Purpose
-------
``oct.mcp`` - Secure MCP server package for Option C Tools.

This package implements the six-layer pipeline described in the
Secure MCP Architecture Blueprint (Phase 5A read-only tools +
Phase 5B write tools with HITL consent):

    Layer 1 - Gateway (workspace binding, rate limiting)
    Layer 2 - Input Validator (Pydantic models, path containment)
    Layer 2.5 - Safety Gate (HITL consent + dry-run enforcement, Phase 5B)
    Layer 3 - Policy Engine (tool allowlist, profile enforcement)
    Layer 4 - Execution Sandbox (env sanitisation, subprocess isolation)
    Layer 5 - Output Redactor (secret patterns, path anonymisation)
    Layer 6 - Audit Logger (JSONL at ~/.oct-mcp/audit.log)

Entry point: ``python -m oct.mcp [--project-root PATH] [--profile PROFILE]``

Responsibilities
----------------
- Re-export the config and safety-gate entry points the server and its
  callers consume.
- Keep the layer ordering above authoritative: every tool call traverses
  them in sequence.

Diagnostics
-----------
Domain: MCP
Levels:
    L2 - (none) the package root re-exports only; each layer reports itself
    L3 - (none) see oct.mcp.policy, oct.mcp.safety and oct.mcp.audit
    L4 - (none)

Contracts
---------
- The package root holds no pipeline logic; each layer lives in its own
  module and is imported explicitly.
- ``__all__`` is the supported surface; anything else is internal.

Dependencies
------------
- oct.core.diagnostics (_dbg structured logger, imported but never called at package import)
- oct.mcp.config (McpConfig and load_config, re-exported)
- oct.mcp.safety (SafetyGate and SafetyDecision, re-exported)