Skip to main content

Universal switchboard for the Context-Pipe Protocol (CPP)

Project description

⛓️ Context-Pipe

The Universal Standard for Context Engineering.

CI Tests Python License OSI

context-pipe is a high-performance orchestration layer directly inspired by Unix terminal piping — the same philosophy that made cmd1 | cmd2 | cmd3 the most durable composition primitive in computing. Just as the terminal chains processes through stdin/stdout byte streams, Context-Pipe chains AI tool calls through context streams: each node does one thing, passes its output to the next, and the LLM only sees the final, refined signal.

This is not a metaphor — it is a literal extension. Context-Pipe supports both MCP piping (chaining MCP tool calls through the orchestrator) and terminal piping (any binary, shell command, or script that reads stdin and writes stdout is a valid node). The two modes compose freely in a single pipe definition. And through the mcp-pipe CLI, it extends the terminal itself: the mcp-pipe tool subcommand makes any MCP server — context-mode, serena, GitHub, Firecrawl, or any server registered in pipes.json — directly pipeable from the shell, loading on demand, with no wrapper scripts and no IDE required:

cat error.log | mcp-pipe tool semantic-sift sift_logs | rg "CRITICAL"
curl -s https://example.com | mcp-pipe tool firecrawl scrape | mcp-pipe run semantic-refinery

Today, mcp-pipe run <pipe> already gives the terminal first-class access to any named pipe defined in pipes.json, composing terminal binaries through the same orchestrator used by the IDE.


🚀 The Vision

The AI agent has a fundamental infrastructure problem: every tool call returns raw, unfiltered output directly into the context window. Logs arrive with timestamps. Search results arrive with boilerplate. Agent A's 40KB analysis gets passed verbatim to Agent B. The context window fills. Signal drowns in noise. The LLM degrades.

context-pipe solves this at the infrastructure layer — before the LLM sees anything.

In the Studio of Two philosophy, we build Systems, not Patches. A patch would be a custom filter per tool. A system is a universal protocol: any tool that reads stdin and writes stdout becomes a node. Any sequence of nodes becomes a pipe. Any pipe is named, versioned, audited, and reusable across every project and every agent framework.

The result is a context supply chain: data enters raw, passes through a sequence of refineries (normalize → filter → compress → distil), and arrives at the LLM as dense, high-signal content. Every byte saved is accounted for in the Context Balance Sheet. Every pipe run is traceable. Every A2A handoff is protected.

This is not a wrapper around semantic-sift. It is the orchestration layer that makes any refinery composable, observable, and production-grade. A node can be a binary, a shell command, a Python script, or a full MCP tool (Figma, GitHub, context-mode, or any server registered in pipes.json). If it reads stdin and writes stdout, it belongs in the pipe.

Example — crawl the web, research it, save it, and ship it:

trigger: tool:web_search | tool:web_fetch
[URL]
    → firecrawl/scrape             # MCP node: fetch live page as clean text     ~18,400 tokens
    → markitdown                   # binary node: convert to structured Markdown     ~16,200 tokens
    → rg 'security|vulnerability'  # shell node: surface only relevant sections      ~3,100 tokens
    → prettier --parser markdown   # shell node: normalize formatting                ~3,050 tokens
    → semantic-sift-cli doc        # binary node: distil to high-signal summary        ~420 tokens
          ↳ tee → research.md      # T-pipe: save raw distilled copy to disk
    → security-auditor             # script node: project-specific logic               ~380 tokens
    → github/create_issue          # MCP node: open a tracked issue with findings
Context Balance Sheet (illustrative)
  in:  18,400 tokens  →  out: 380 tokens  —  97.9% saved  ·  1.2s total

Every node is a real subprocess. The T-pipe saves a raw copy at any point without interrupting the chain. The LLM receives only what matters — and every byte in, byte out, and millisecond of latency is recorded in the Context Balance Sheet automatically.


🛠️ Core Components

1. The Context-Pipe Protocol (CPP)

A language-agnostic standard with one rule: a node reads stdin, transforms content, and writes to stdout. Any binary, shell command, Python script, or MCP tool that honours this contract is a valid node. The protocol is defined in doc/CONTEXT_PIPE_PROTOCOL.md and is deliberately simple — no SDKs, no registration, no framework coupling.

2. The Orchestration Spine (orchestrator.py)

The execution engine that chains nodes into pipes. Runs each node as a real OS subprocess with shell=False enforced (no injection surface). Features: per-node timeout guard (PIPE_NODE_TIMEOUT_MS), T-Pipe stream splitting (save raw input to disk before a node processes it), and full trace accounting (input/output size + latency per node).

3. The Universal Switchboard (pipes.json + mappings)

Data-driven routing that resolves the optimal pipe automatically based on three trigger types: tool name (tool:regex), payload size (size:>N), and default fallback. Pipe definitions live in pipes.json (project-level) and optionally ~/.mcp-pipe.json (global, merged with local precedence). No code changes required to add, modify, or re-route pipes.

4. The MCP Surface (server.py + mcp-pipe CLI)

Eight MCP tools expose every capability to AI assistants directly: pipe_run, pipe_run_dynamic, pipe_read_file, pipe_analyze_file, pipe_list_shadow_tools, pipe_agent_handoff, get_pipe_stats, and pipe_onboard. The mcp-pipe CLI mirrors the same surface for terminal-first workflows — no IDE required. Shadow Tool Discovery (pipe_list_shadow_tools) gives the agent a live capability manifest combining configured pipes and curated PATH tools (jq, rg, markitdown, pandoc…).

5. Subconscious Interceptors (pipe_hook.py + onboarding.py)

IDE hooks that apply pipes transparently after every tool call — without the agent needing to invoke pipe_run explicitly. Supported: Cursor (postToolUse), VS Code/GitHub (hooks), Claude Code/Qwen/Codex (PostToolUse), Windsurf and Cline (pre-read security gateway), OpenClaw (native plugin), and pi.dev (native TypeScript extension). For OpenCode, the AGENTS.md SOP mandate is the active strategy (see Known Limitations). pipe_onboard injects all hooks, slash commands (/pipe-run, /pipe-dynamic, /pipe-handoff, /pipe-stats), and the full agent SOP in one command.

6. The A2A Bridge (a2a.py)

pipe_agent_handoff() distils Agent A's output before it enters Agent B's context window. Framework-agnostic — no monkey-patching. Works in CrewAI task callbacks, Google ADK transfer hooks, LangGraph edge functions, or any custom handoff point. Available as both a Python function and an MCP tool. Returns the original output unchanged on any error, so the agent chain is never interrupted.

7. The Native Rust Core (crates/cpipe)

cpipe is the high-performance Rust heart of the Context-Pipe ecosystem. It ports the full orchestration engine — config merging, placeholder resolution, stream routing, and the self-aware bypass guard — to a pre-compiled native binary with <2ms startup latency (500× faster than the Python runtime). It coexists with the Python server: MCP tools stay in Python (FastMCP), while the Rust binary is available as a Tauri sidecar, a standalone CLI (cpipe run, cpipe list, cpipe serve), or a Cargo library for direct embedding in Rust applications. See crates/cpipe/README.md for the full API.


✨ What Makes This Different

Feature What it does Where
Unix pipe model for AI Chain any stdin and stdout tool into a named pipe. Binary, shell, script, or MCP tool — same contract. Advanced Node Types
MCP Node Type Call any MCP tool (Figma, GitHub, context-mode) as a first-class pipe node — no wrapper scripts. doc/MCP_NODE_SPEC.md
Dynamic Pipes AI agents construct and execute ad-hoc node lists at runtime via pipe_run_dynamic — no pipes.json entry required. Dynamic Pipes
Shadow MCP Registry Keep utility MCP servers invisible to the agent's tool list until needed. pipe_list_shadow_tools queries them on demand. Shadow MCP Registry
A2A Agent Handoff Distil Agent A's output before it enters Agent B's context window — framework-agnostic, no monkey-patching. A2A Handoff
Version Awareness Proactive GitHub-backed update alerts in pipe_verify and pipe_onboard to ensure environment parity. Health Checks
Stream Integrity Hardened orchestration engine with non-UTF8 robustness (errors="replace") and null-safe reading. doc/ARCHITECTURE.md
T-Pipe Stream Splitting Save a raw copy of any node's input to disk before it is distilled — for audit, debugging, and quality measurement. 3. T-Pipe Nodes (Stream Splitting)
Adaptive Window Pressure Signals remaining context headroom to every node; semantic-sift auto-adjusts --rate accordingly. Environment Variables
Global Config Share pipe definitions and MCP server registries across all projects — local pipes.json always wins. doc/ARCHITECTURE.md
Shell Alias Injection pipe_install_aliases writes mcp-pipe / cpipe into your shell profile — terminal-ready without venv activation. Terminal Usage
Git Protection pipe_onboard automatically updates .gitignore to protect internal artifacts from being committed. Auto-Onboard
Context Balance Sheet Every pipe run is accounted: chars in, chars out, latency per node, agent attribution, net ROI. Telemetry & ROI

🧠 The Architecture: Semantic Enums (Solving Schema Bloat)

In standard MCP setups, exposing multiple capabilities (PDF parsing, log searching, HTML cleaning) means exposing multiple tools. This causes Schema Bloat: the LLM's system prompt fills with thousands of tokens of complex tool instructions. For Small Language Models (SLMs), this pushes out chat history, overwhelms the context window, and leads to hallucinations.

context-pipe solves this through Semantic Enums. Instead of teaching the AI how to use complex command-line utilities, you expose a single tool: pipe_run(input, pipe_name). The pipe_name parameter is simply an Enum of your predefined pipelines (e.g., ["parse-and-clean-pdf", "extract-critical-errors"]).

This perfectly separates Intent from Execution:

  • The LLM provides the Intent: "I need the clean text of this PDF, so I'll call the parse-and-clean-pdf pipe."
  • pipes.json provides the Execution: [pandoc -> jq -> semantic-sift]

By using brief, concise pipe names, you achieve extreme prompt compression. The AI gets a menu of high-level "buttons to push" rather than reading an instruction manual for every utility on the host machine. Better yet, if you upgrade your backend tooling (e.g., swapping pandoc for markitdown), you never have to update the LLM's prompt. The AI still calls the same pipe; the engine behind it just gets faster.


🚀 Quickstart (60 seconds)

# 1. Install
pip install mcp-context-pipe "semantic-sift[neural]"

# 2. Onboard (auto-creates pipes.json + hooks for your IDE)
context-pipe-onboard   # or: ask your AI "Run pipe_onboard()"

# 3. Verify the full stack
echo "noisy log [14:22:05.123] DEBUG: heartbeat ok" | context-pipe run standard-distill
# → distilled, noise-free output with audit header

Full setup guide (Sovereign Dual-Repo Pattern, venv layout, IDE config): doc/OPERATOR_GUIDE.md


🏗️ Getting Started

1. Installation

Option A: Quick Install (PyPI)

Because MCP servers require an explicit Python executable path in your IDE config, you must create a virtual environment first:

ℹ️ What you get: This installs the Context-Pipe orchestration layer and Semantic-Sift's core Python server. The sift-core Rust binary (for near-instant heuristic sifting) is included in the PyPI wheel — no Rust toolchain required. The [neural] extra adds PyTorch (~1.5 GB) for large-payload semantic compression.

uv venv
# Windows: .\.venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
uv pip install mcp-context-pipe "semantic-sift[neural,multi-modal]"

Option B: Sovereign Pattern (Recommended for Studio of Two) Clone both repos side-by-side. The context-pipe venv acts as the master environment holding both packages. See Section 0 of the Operator's Guide for the full sequence.

# 1. Clone both repos
git clone https://github.com/luismichio/context-pipe.git
git clone https://github.com/luismichio/semantic-sift.git

# 2. Master venv in context-pipe - holds both packages
cd context-pipe
python3.12 -m venv venv
# Windows:
.\venv\Scripts\activate
# macOS/Linux:
# source venv/bin/activate
uv pip install -e .
uv pip install -e ../semantic-sift  # semantic-sift-cli lands in context-pipe/venv/Scripts/ (Win) or venv/bin/ (Mac/Linux)

# 3. ML runtime venv in semantic-sift (Python 3.12 for torch/CUDA compatibility)
cd ../semantic-sift
python3.12 -m venv venv312
# Windows:
.\venv312\Scripts\activate
# macOS/Linux:
# source venv312/bin/activate
uv pip install -e .[neural]         # torch, transformers, llmlingua

Note: The package name on PyPI is mcp-context-pipe but the installed module is context_pipe. The semantic-sift-cli binary is registered only in the venv where semantic-sift is pip-installed (step 2 above). Both pipes.json files must reference that absolute path.

2. Connect the MCP

CRITICAL: For exact configuration paths for Cursor, Gemini, Antigravity, OpenCode, VS Code, and Claude, reference the Master Configuration Matrix.

3. Connect a Refinery

Context-Pipe is the "Switchboard," but it needs a "Refinery" to distill data. Semantic-Sift is the flagship intelligence engine for this ecosystem. It uses heuristic sieves and neural models (BERT/ONNX) to incinerate noise (timestamps, boilerplate) while preserving 95% of the signal.

Note: In the Sovereign Pattern, semantic-sift is cross-installed into context-pipe/venv (step 2 above). Context-Pipe will also auto-discover a separately installed semantic-sift-cli across all known locations (system PATH, pipx, sibling venv directories) via pipe_onboard or pipe_verify.

4. Verify the Installation

After installing both packages, ask your AI assistant to verify the full stack:

"Run pipe_verify() to confirm the installation."

This will report the health of every component and automatically link semantic-sift-cli into pipes.json if it was found in a separate environment.

5. Configure your first Pipe

Edit pipes.json (see pipes.json.example) to define your high-fidelity context streams.

6. Auto-Onboard

Once connected, ask your AI Assistant to configure your workspace:

"Run pipe_onboard(environment='Cursor') to configure this project."

pipe_onboard auto-detects your IDE if environment is omitted — it inspects environment variables and parent-process names to fingerprint 12+ platforms (Cursor, Gemini, Antigravity, OpenCode, VS Code, Windsurf, Claude, Cline, etc.). Pass environment explicitly only when auto-detection is ambiguous.


📚 Documentation

Detailed documentation is available in the doc/ directory.


🐍 Programmatic Usage

Context-Pipe exposes a single pipe() function for direct integration into Python scripts, notebooks, and agent frameworks (LangChain, CrewAI, etc.) — no MCP server or CLI required.

from context_pipe import pipe

# Auto-route based on pipes.json mappings
clean = pipe(raw_logs, tool_name="bash")

# Specify a pipe explicitly
distilled = pipe(document_text, pipe_name="semantic-refinery")

# Minimal usage — returns input unchanged if no pipe resolves
result = pipe(text)

Function signature:

def pipe(
    text: str,
    pipe_name: str | None = None,   # explicit pipe name; auto-routes if omitted
    tool_name: str = "",            # used for trigger matching and telemetry
    config_path: str = "pipes.json",
) -> str: ...

The function always returns the original text unchanged on any error (subprocess failure, missing config, etc.), so it is safe to use as a drop-in filter.

Rust Library (cpipe)

For Rust or Tauri applications, embed the native core directly:

use cpipe::config::load_pipes_config;
use cpipe::orchestrator::run_pipe;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let config = load_pipes_config();
    let pipe = config.pipes.iter().find(|p| p.name == "standard-distill")
        .ok_or("Pipe not found")?;

    let (output, _telemetry) = run_pipe(
        pipe,
        "raw context text here",
        Some("my-tool"), None, &config.servers,
    ).await;

    println!("{output}");
    Ok(())
}

Add to your Cargo.toml:

[dependencies]
cpipe = { git = "https://github.com/luismichio/context-pipe", path = "crates/cpipe" }

Pre-built binaries for Windows, macOS (Intel & Apple Silicon), and Linux are available on the GitHub Releases page, or download via:

python scripts/fetch_cpipe.py

🤝 A2A (Agent-to-Agent) Handoff

When chaining agents, use pipe_agent_handoff to distil Agent A's output before it enters Agent B's context window. Works with any framework — no monkey-patching required.

from context_pipe.a2a import pipe_agent_handoff

# In a CrewAI task callback, ADK transfer hook, or any custom handoff point:
agent_b_input = pipe_agent_handoff(
    agent_a_output,
    pipe_name="semantic-refinery",   # optional; auto-routes if omitted
    from_agent="researcher",
    to_agent="writer",
)

Also available as an MCP tool — ask your AI assistant: "Run pipe_agent_handoff() to distil this agent output before passing it on."

Function signature:

def pipe_agent_handoff(
    output: str,
    pipe_name: str | None = None,   # explicit pipe; auto-routes if omitted
    from_agent: str | None = None,  # producing agent label (telemetry + routing)
    to_agent: str | None = None,    # consuming agent label (telemetry only)
    config_path: str = "pipes.json",
) -> str: ...

Always returns the original output unchanged on any error — the agent chain is never interrupted.


💻 Terminal Usage (mcp-pipe CLI)

Context-Pipe ships a first-class terminal runner — mcp-pipe — so you can use every capability without an IDE or MCP server.

# Run a named pipe on stdin
cat app.log | mcp-pipe run standard-distill

# Run a named pipe on a file directly
mcp-pipe run semantic-refinery --file spec.md

# Run an ad-hoc node array (shell synergy requires --allow-shell)
echo "noisy output" | mcp-pipe run-dynamic '[{"cmd":"semantic-sift-cli","args":["logs"]}]'

# List all configured pipes + curated PATH tools (Shadow MCP discovery)
mcp-pipe list

# Print the Context Balance Sheet (ROI across all sessions)
mcp-pipe stats

# Start the MCP server manually (stdio transport)
mcp-pipe serve

# Install/remove the cpipe shell alias
mcp-pipe aliases install
mcp-pipe aliases remove

The mcp-pipe entry point is registered automatically when you pip install mcp-context-pipe. Use cpipe as a shorthand after running mcp-pipe aliases install.

Shadow MCP Registry

Every MCP server you add to an IDE registers its tools globally — they all appear in the agent's tool list whether the agent needs them or not. At scale this causes MCP tool bloat: hundreds of tools in the prompt, wasted tokens on every inference call, and a higher chance the agent picks the wrong one.

context-pipe takes a different approach. Instead of registering every context-processing tool as a first-class MCP tool, it exposes a single discovery toolpipe_list_shadow_tools — that returns a live capability manifest on demand. The tools stay hidden ("shadow") until the agent asks for them. One MCP tool does the work of many.

What the manifest includes:

  1. pipes.json pipes — every named pipe configured in your project.
  2. Curated PATH tools — probes 7 well-known CLI tools (jq, yq, markitdown, pandoc, rg, fd, bat) and surfaces any found on PATH.

Known limitation: shadow tools are not callable as independent MCP tools — the agent must route them through pipe_run or pipe_run_dynamic. This is by design (it keeps the MCP surface minimal), but it means the agent cannot call jq or markitdown directly without constructing a dynamic pipe node.

Terminal access via mcp-pipe: the same manifest is available without an IDE or MCP server — mcp-pipe list prints every pipe and curated PATH tool to stdout. Pipe any content through a shadow tool directly from the terminal:

# Discover what's available
mcp-pipe list

# Run a shadow tool via a dynamic pipe — no pipes.json entry needed
echo "# My Doc" | mcp-pipe run-dynamic '[{"cmd":"markitdown"},{"cmd":"semantic-sift-cli","args":["doc"]}]'

🔗 Advanced Node Types

Context-Pipe supports more than just simple binaries. You can chain standard OS tools and expert mandates.

1. Bash Nodes (Sandboxed)

Execute arbitrary shell commands as part of your pipe. By design, all commands are executed natively with shell=False to prevent injection vulnerabilities.

{ "cmd": "grep", "args": ["ERROR"] }

2. Script Nodes

Executes a project-specific script (Python/Shell) or a local instruction set. Resolved from .gemini/scripts/ (default).

{ "type": "script", "cmd": "security-auditor" }

3. T-Pipe Nodes (Stream Splitting)

Save a raw copy of the stream to disk before a node distils it — without interrupting the chain. Useful for debugging pipe quality and auditing what was sifted out.

{
  "cmd": "semantic-sift-cli",
  "args": ["logs"],
  "tee": {
    "sink": "file",
    "path": "logs/{tool_name}_{iso_date}.log",
    "mode": "append"
  }
}

path supports {iso_date} (YYYY-MM-DD) and {tool_name} tokens. A tee failure never interrupts the main chain.

4. MCP Nodes

Call any MCP tool as a pipe node. No wrapper scripts — the orchestrator spawns the MCP server, calls the tool, and passes the result downstream via stdout.

{
  "type": "mcp",
  "server": "figma",
  "tool": "get_file",
  "input_key": "file_id"
}

Server definitions live in a servers block in pipes.json or ~/.mcp-pipe.json. See doc/MCP_NODE_SPEC.md for the full spec.


🔗 The Ecosystem (Studio of Two)

Context-Pipe is a foundational member of the Studio of Two infrastructure. It is designed to work in high-fidelity harmony with:

  • Semantic-Sift: The intelligent refinery for agentic context. Sift is the flagship distillation engine for Context-Pipe, providing the mathematical and neural sifting nodes used in our standard templates.
  • std-context-lab: The official integration laboratory and test gauntlet. This repository serves as our isolated battle-testing ground where cross-repository capabilities, MCP server combinations, and terminal hook interactions are simulated and verified.
    • Isolated Scenarios: Runs isolated test cases mimicking real-world AI behaviors to reproduce and verify fixes without polluting core runtimes.
    • Empirical Evidence: Every resolved bug or feature is accompanied by a tracked execution log (EVIDENCE.md), serving as empirical proof of success.
    • Platform Parity Gate: Audits Python/Rust CLI parity and shell behaviors across Windows (PowerShell/CMD) and UNIX terminals before release.

🧩 Tool Synergies & Boundaries

Four tools often appear together in a Studio of Two stack. They are complementary, not overlapping — each owns a distinct layer.

Tool Layer Primary Role Relationship
context-pipe Orchestration Routes content through named pipes; manages node execution, timeouts, T-pipe, telemetry, and A2A handoff. The switchboard. Calls all other tools as nodes when wired together.
semantic-sift Distillation Heuristic + neural compression of text. Removes noise (timestamps, boilerplate, repeated tokens) while preserving signal. Fully standalone CLI and MCP server. The flagship refinery node inside context-pipe pipes.
context-mode In-session indexing BM25 full-text search over content indexed during the current agent session. Fast retrieval without a vector database. Fully standalone MCP server. Optionally wired as an mcp node to index or search within a pipe.
Serena Code intelligence LSP-backed symbol search, refactoring, and code navigation. Understands the AST — not just text. Fully standalone MCP server. Optionally wired as an mcp node to feed precise code symbols into a pipe instead of raw file reads.

When to use which

Use context-pipe when you need to orchestrate: chain tools, apply pipes automatically on tool call, route by trigger, save T-pipe snapshots, account for ROI, or bridge agent handoffs.

Use semantic-sift when you need to compress: a large document, a log file, a search result, or any payload where noise-to-signal ratio is high. Runs standalone via CLI or MCP — and as a node inside context-pipe pipes.

Use context-mode when you need to retrieve: you have already ingested content this session and want fast BM25 search over it. Works standalone as an MCP server in any IDE. Pair it with semantic-sift on both sides — upstream to compress content before indexing (smaller index, faster search), and downstream to distil retrieved chunks before they hit the context window.

Use Serena when you need to navigate code: find a symbol, trace references, inspect types, or perform a refactor. Works standalone as an MCP server. Its structured, precise output is far better than a raw file read as input to any downstream tool — including a sifting pipe.

Complementary setup — reducing token usage

Each tool independently reduces token pressure. Together, the savings compound:

  • Serena returns only the symbol you asked for — not the entire file.
  • semantic-sift compresses content before it enters context-mode (smaller index, faster search) and after retrieval (noise-free chunks into the context window).
  • context-mode returns only the relevant indexed chunks — not the entire ingested corpus.
  • context-pipe ensures this sequence fires automatically and is accounted for — no manual wiring per task.

The result: the agent works with a fraction of the raw token volume, every session, without changing how it thinks or what tools it calls.

Synergy example

[user query]
    → serena/find_symbol           # MCP node: precise code symbol — not a raw file dump
    → context-mode/search          # MCP node: retrieve related session context
    → semantic-sift-cli semantic   # binary node: compress both into a dense summary
    → security-auditor             # script node: project-specific logic

All four tools in one pipe. Each doing exactly one job.


⚙️ Environment Variables

Variable Default Description
PIPE_CONFIG_PATH pipes.json Absolute path to the project's pipes.json config file.
PIPE_NODE_TIMEOUT_MS 30000 Per-node execution timeout in milliseconds.
allow_shell false Enable arbitrary shell command nodes in dynamic pipes (pipe_run_dynamic MCP tool / run_dynamic_pipe() API). Requires the final node to be a semantic-sift terminal command to guarantee context safety.

⚠️ Known Limitations

OpenCode — MCP Tool Output Interception

The "subconscious interceptor" feature (pipe_hook.py) works transparently for Cursor, VS Code, Gemini CLI, Antigravity CLI, and Claude Desktop by injecting hook handlers that fire after every tool call.

OpenCode is the exception. The tool.execute.after hook is declared in the OpenCode plugin Hooks interface but is never triggered by the OpenCode runtime (confirmed via source audit of session/processor.ts, session/llm.ts, tool/registry.ts, agent.ts). The plugin's output mutation code is silently a no-op.

Current workaround: The AGENTS.md SOP mandate (pipe_read_file for all file reads) is the active interception strategy for OpenCode until transparent hook injection is supported upstream.


⚖️ Licensing

context-pipe is licensed under the Apache License 2.0. It is an "Open Source, Closed Contribution" project maintained by the Studio of Two to ensure architectural integrity.


Building High-Fidelity Infrastructure for the Intelligence Age.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_context_pipe-0.4.7.tar.gz (117.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mcp_context_pipe-0.4.7-cp313-cp313-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.13Windows x86-64

mcp_context_pipe-0.4.7-cp313-cp313-win32.whl (1.6 MB view details)

Uploaded CPython 3.13Windows x86

mcp_context_pipe-0.4.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

mcp_context_pipe-0.4.7-cp313-cp313-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

mcp_context_pipe-0.4.7-cp313-cp313-macosx_10_13_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

mcp_context_pipe-0.4.7-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12Windows x86-64

mcp_context_pipe-0.4.7-cp312-cp312-win32.whl (1.6 MB view details)

Uploaded CPython 3.12Windows x86

mcp_context_pipe-0.4.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

mcp_context_pipe-0.4.7-cp312-cp312-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mcp_context_pipe-0.4.7-cp312-cp312-macosx_10_13_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

mcp_context_pipe-0.4.7-cp311-cp311-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11Windows x86-64

mcp_context_pipe-0.4.7-cp311-cp311-win32.whl (1.6 MB view details)

Uploaded CPython 3.11Windows x86

mcp_context_pipe-0.4.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mcp_context_pipe-0.4.7-cp311-cp311-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mcp_context_pipe-0.4.7-cp311-cp311-macosx_10_12_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

mcp_context_pipe-0.4.7-cp310-cp310-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10Windows x86-64

mcp_context_pipe-0.4.7-cp310-cp310-win32.whl (1.6 MB view details)

Uploaded CPython 3.10Windows x86

mcp_context_pipe-0.4.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mcp_context_pipe-0.4.7-cp310-cp310-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mcp_context_pipe-0.4.7-cp310-cp310-macosx_10_12_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file mcp_context_pipe-0.4.7.tar.gz.

File metadata

  • Download URL: mcp_context_pipe-0.4.7.tar.gz
  • Upload date:
  • Size: 117.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mcp_context_pipe-0.4.7.tar.gz
Algorithm Hash digest
SHA256 110a299dae0125e3b73976d0ddc11607e9265ac0d649f06c17e23f2480f01fe2
MD5 802af10f83d8f97ae1abcb30dc729975
BLAKE2b-256 3ef246e092829ba2faaf2f13ca38b333804bbbb10d105b0c0ed27ec023b1ab72

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7.tar.gz:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 09e106a7c937f40777bc8043d45dceb3b8612f252c00b6ff7f08fae6ec6f6feb
MD5 04241038d805b3592ee39e88dad5d4dd
BLAKE2b-256 2ccaf7680d48bb1999dcebda0a0bb9ac0d2e284220a0b103c2e397299095065d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp313-cp313-win_amd64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 0ec90784371d10426d82e654da3c5ed13a982e0e0c4998564b7aaf73d89cf81a
MD5 f2b8e4acff14d85286a8e554d6109159
BLAKE2b-256 84cccebed006b9ed5f51b109397b2f173c3424a75cb12a2e170693406600a864

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp313-cp313-win32.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c344e8bb31b39e708ef99760d303f76cfa80f1576def155d3b32a935d6434d34
MD5 650bd0230829810242a822e2edf77104
BLAKE2b-256 a9d9f965a8fa9663bbe819bd4f4f7294f8c4b6b8b7be8661e44add7bbc25b4f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 01798260811c4922a9d1183933297f2ee347d1ceab301439cf1a8a86209618df
MD5 200bb133457f9d700174513db5ad7ab5
BLAKE2b-256 1adfbe4fd448630fda5086e35067b04d42d8352fa2df6f33495fc5f3c8cdd39a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 16548b65f63debb9d824d5e716dbef5d3c7fafd99632b477b2775cd072378c65
MD5 76b206c62c7ad8a0ffc545f06ecee981
BLAKE2b-256 a1ab3732d9d0f441ad612194e99aa86041d933b28d92a60ff2a691d2813d9180

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d0e0074a097f42441c82853fa9986615c897345079c7ad49de7f2ccd5e28f911
MD5 720d7f6e4de818bf37383fbd734a53d2
BLAKE2b-256 4ab05291379ee1e2186e60d4e6da4e2911089318787001a279cd85a38c69f182

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp312-cp312-win_amd64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 523c9eff91ca18a36b23dda00f51e37aaf562cceae71e7d1ab5f9f6ee9feb24f
MD5 1e80283e2793a0092e1f967b4416ef0d
BLAKE2b-256 2c001566591d5fb5fb26941b4ef06583340002961575dd09c181c5478fb8cefd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp312-cp312-win32.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f6ef463147452d7c923467f14a2e124b033c972d9f698b57750ab3a04bb6979
MD5 e1cc77b0c5beb263962f1d021d5c6ad7
BLAKE2b-256 1139f4cedd8739952e8ef0d3022d5e032dcec9b114a493450c1c57a61a0ecad0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 681b931d8faa61f15f9bc28f7978ce36dcd94f2881a1f1b29854fa57ed94bda1
MD5 dc69bd2e1e81f30ecd2eecb94ceff8f2
BLAKE2b-256 f5da5b4266bd35bc2fdbd48a8a4d16cc8c2ec665ae35b49641c32000573f363a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6f1e6d14ed7e198ede07b528fbcdb36eb122faa2171849e375dc6f857e93b59d
MD5 d83d2e1fb3a5c7d8e9f75eafab984f25
BLAKE2b-256 d9c3da931eec4ab2156e7672701c473a43e3ff1d75c0597107d60ad4da151372

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6cd319d88914a02487ea94b0144239ba554c5ed1ce601b616369b19a88a8052e
MD5 cbbd0788e6fae1adfa4d54a9a10e9c79
BLAKE2b-256 873c6294dee3987c259c9ffcfdf4732d404983c69665e7aa49c0c95e536a29f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp311-cp311-win_amd64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 68fedeb0c8c1b6b22aeea9da2d8a619e189aa27f0e1f3e08827e612be3ecddfb
MD5 50d9dc024a395b450755a88ee7b67137
BLAKE2b-256 a4128ea762d490e6a338c036695c0b0ea4bc69506e3fbcc3105a40448da16b2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp311-cp311-win32.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c36532db0a4eb02ed9dfa619572666a7fe5c3e006a60abf4776391a8432b38d
MD5 10e7c1b722c707c980a888e86c7fafb5
BLAKE2b-256 9ebfba9a104944fa91d2c1c61a9c05950285d062d6466597d7ed46e00dc4135f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ecbd208110f4e6fa9d2dd89fc82f072556baa7b640b2d75cef7abbb397a9998
MD5 4f72a845456390ce533dfab0a954ecf2
BLAKE2b-256 6ada2c6a14d65abf54ac78e9f2208c8c1f59c3b49f4a5173e50cb02867b7dd1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1fe29e41ec962b796d6481b52a610d56fa802ded30830d8e46830011a530e48c
MD5 6ce95d49a527b631b60cf4405c57ded3
BLAKE2b-256 ad9e550755ca674976399f0adaaff8f7da13152912866d88bf29d5623e066574

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 806d79577f9746d7d082a46c71ca2a6e52be6b5906dd14083447fbf14f44e753
MD5 8b38d278a35316d14717c48dc635efb2
BLAKE2b-256 bcae5dcb2eb2d49340e2299584ccfc4749ff8e82a0b023f2cc86d6f99176165a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp310-cp310-win_amd64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp310-cp310-win32.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 d62faeebe7e3c2ce31b31e256de464a5d14ad0499f0fe241619bb77810d2eb31
MD5 6458eee61b33277ee00d991915eeadbd
BLAKE2b-256 67e1590c1a34d6c7f1318ab75b83e23129975e8f542641d3272199487a7a0466

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp310-cp310-win32.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e93d7b7e3e091ecd974dea709c56836090633078c940ae894231642a1d41fe10
MD5 d4580dfef1ffafce52f2a6ae0840a657
BLAKE2b-256 cb0b03674798b113446f8ac247fec47bf15ff9026181a3a0318b4751e1282b6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 601209cdb5a971f61198af14dad4f9782274372947cecb07c5b6f81e4aadd4ec
MD5 29502e8d788babf6b039e2f0bf53c9a7
BLAKE2b-256 63b6bfc6ab38b6ca68bb1680db996511399afd242afc655aac93c54c944aeb71

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_context_pipe-0.4.7-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcp_context_pipe-0.4.7-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 95e2557a345e3a6189e718b5f37d7e067cd246a46f7241c291755835a856ea98
MD5 52ff1e3f0013519842d8a6ab64fcd7e0
BLAKE2b-256 b3a6dcd10938ec32552cf4604b280dc6c196e1b2588ca7d0c2bad5e2a77ed25f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_context_pipe-0.4.7-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: release.yml on luismichio/context-pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page