{
  "markdown": "# <img src=\"website/logo.svg\" width=\"32\" height=\"32\" align=\"left\" style=\"margin-right:8px\"> Pipe — The MCP-native runtime, production-ready\n\n[![CI](https://github.com/MachuraHarry/pipe/actions/workflows/ci.yml/badge.svg)](https://github.com/MachuraHarry/pipe/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-purple.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-v1.1.1-blue.svg)](https://github.com/MachuraHarry/pipe/releases)\n[![SPR](https://img.shields.io/badge/SPR-Semantic%20Pipeline%20Runtime-7c5cfc.svg)](#)\n[![MCP](https://img.shields.io/badge/MCP-Server%20%2B%20Client-3ce096.svg)](#model-context-protocol)\n[![GitHub MCP Registry](https://img.shields.io/badge/GitHub_MCP_Registry-Listed-4a90d9.svg)](https://github.com/mcp/MachuraHarry/pipe)\n[![MCP Registry](https://img.shields.io/badge/MCP_Registry-Listed-4a90d9.svg)](https://registry.modelcontextprotocol.io/?q=MachuraHarry)\n\n> **The first language with built-in MCP — server and client. 246 builtins, single ~8 MB binary. Zero dependencies.**\n> **Officially listed in the [official MCP Registry](https://registry.modelcontextprotocol.io/?q=MachuraHarry)** (v1.1.1, active). One-click install from [GitHub MCP Registry](https://github.com/mcp/MachuraHarry/pipe) for Copilot & VS Code.\n\n## What's New in v1.0\n\nPipe v1.0.0 is the **production-ready release**, consolidating the entire v0.9.x series:\n\n- **Guard clauses** — `| pattern if cond -> body` in match expressions\n- **Concurrency primitives** — channels (`send`/`recv`/`try_recv`), mutex (`lock`/`unlock`), counting semaphore (`acquire`/`release`)\n- **Bytecode-VM improvements** — constant folding, alias import namespaces, bytecode cache\n- **MQTT 5.0 module** — pure Pipe MQTT client with input validation, CONNACK properties, DISCONNECT handling\n- **docs-pipe** — RAG module for documentation-native search with heading-aware chunking\n- **Test framework** — setup/teardown hooks, `assert_near`/`assert_contains`, VM test blocks\n- **Hardened sandbox** — audit rounds 1-6, deterministic env masking, central egress gate\n- **246 builtins** — 36 AI + 13 MCP + 192 standard, up from 226 in v0.9.3\n- **23 modules** — MQTT, SQLite, pipe-http, pipe-web, pipe-orm, pipe-cli, and more\n\n## Quick Install\n\n```sh\ncurl -fsSL https://pipe-lang.com/install.sh | bash   # Linux & macOS\n```\n\nWindows (PowerShell): `irm https://pipe-lang.com/install.ps1 | iex`\n\nThe installer downloads the latest release, verifies its SHA256 checksum and installs `pipe` into `~/.local/bin` (or `/usr/local/bin` when run as root). Pin a version with `PIPE_VERSION=v1.0.0`. See the [full install docs](docs/en/01-getting-started.md).\n\nInstalled copies update themselves against the latest GitHub release: `pipe --update` (or `pipe --update-check` to only look, `pipe --version` to show what you are on). The updater verifies the release checksum and replaces the binary in place.\n\n## Privacy & DSGVO\n\nPipe is **DSGVO-konform / GDPR-compliant by design**:\n\n- **Zero telemetry & analytics** — the binary never phones home, nothing leaves your machine\n- **Self-hosted single binary** — runs entirely on your infrastructure\n- **No cloud** — no vendor server processes your data\n- **Open source (MIT)** — fully auditable\n- **Local AI** — with Ollama, not a single byte leaves your network; cloud providers are used only if you configure one\n\n## The Problem\n\nRunning AI in production is harder than it should be:\n\n- **Security** — LLMs with file access, network, and `exec` are a liability. You need fine-grained sandboxing at the language level, not afterthought middleware.\n- **Performance** — Sequential API calls turn a 1-second pipeline into a 10-second bottleneck. Parallelism shouldn't require `asyncio.gather()` boilerplate.\n- **Vendor Lock-in** — Switching from OpenAI to DeepSeek means rewriting your Python SDK code. Provider changes should be one line.\n- **Tool Integration** — Connecting LLMs to external tools (GitHub, databases, filesystems) is a maze of SDKs and API wrappers. MCP should be a language primitive, not a library.\n\n**Pipe fixes this at the language level.**\n\n## What is Pipe?\n\nPipe is a **Semantic Pipeline Runtime (SPR)** — a pipeline-native language where `summarize`, `translate`, and `classify` sit on the same syntax level as `+`, `sort`, and `len`. Data flows top to bottom through composable transformations. One binary. Zero dependencies.\n\n**Python + LangChain (~80 lines):**\n\n```python\nimport openai\nclient = openai.OpenAI()\ndef summarize(text):\n    r = client.chat.completions.create(model=\"gpt-4o\", messages=[{\"role\":\"user\",\"content\":text}])\n    return r.choices[0].message.content\ndef translate(text, lang):\n    r = client.chat.completions.create(model=\"gpt-4o\",\n        messages=[{\"role\":\"system\",\"content\":f\"Translate to {lang}\"},{\"role\":\"user\",\"content\":text}])\n    return r.choices[0].message.content\ntext = open(\"news.txt\").read()\nprint(translate(summarize(text), \"de\"))\n```\n\n**Pipe (5 lines):**\n\n```pipe\nread_file \"news.txt\"\n    > summarize       -- LLM call\n    > translate \"de\"  -- LLM call\n    > print\n```\n\n## Model Context Protocol\n\nPipe has **built-in MCP** — both as a server and client. No SDKs, no npm packages, no Python. Pure Go stdlib.\n\n### MCP Server — Expose your tools\n\n```pipe\nfn get_weather city\n    match city\n        | \"Berlin\" -> \"22°C, sunny\"\n        | \"London\" -> \"15°C, rainy\"\n        | _ -> city ++ \": no data\"\n\nai_tool \"get_weather\" \"Get weather for a city\" {city: \"City name\"} get_weather\nmcp_server \"Weather Agent\" \"1.0.0\"\nmcp_serve_stdio\n```\n\nConfigure in Claude Desktop (`claude_desktop_config.json`):\n\n```json\n{ \"mcpServers\": { \"pipe\": { \"command\": \"/tmp/pipe\", \"args\": [\"agent.pipe\"] } } }\n```\n\n### MCP Client — Use external tools\n\n```pipe\nai_provider \"deepseek\"\nai_set_key \"deepseek\" (env \"DEEPSEEK_API_KEY\")\n\n-- Connect to GitHub + Filesystem MCP servers\nmcp_use_stdio \"npx\" \"-y\" \"@modelcontextprotocol/server-github\" {GITHUB_TOKEN: (env \"GITHUB_TOKEN\")}\nmcp_use_stdio \"npx\" \"-y\" \"@modelcontextprotocol/server-filesystem\" \"/tmp\"\n\n-- AI discovers and uses all tools automatically\nresult: ai_with_tools \"You are a DevOps assistant.\" \"Search pipe's open issues and list files in /tmp.\" 10\nprint result\n```\n\n**Any stdio MCP server** works immediately: Filesystem, GitHub, Git, Postgres, SQLite, Slack, Brave Search, Memory, Sequential Thinking — anything on npm/uvx.\n\n## Use Cases\n\n### Log Analysis → Incident Report\n\n```pipe\nis_critical: fn line\n    contains line \"critical\"\n\nread_file \"/var/log/app/errors.log\"\n    > split \"\\n\"\n    > filter is_critical\n    > summarize\n    > translate \"de\"\n    > save \"incident_report.txt\"\n```\n\n### RAG Pipeline\n\n```pipe\nai_provider \"deepseek\"\n\ndocs: read_lines \"knowledge_base.txt\"\nvectors: embed_batch docs\n\nquestion: \"How does the bytecode VM work?\"\nq_vec: embed question\ntop: nearest q_vec vectors 3\n\ncontext: \"\"\nfor idx in top\n    context: context ++ (at docs idx) ++ \"\\n---\\n\"\n\nask (\"Context:\\n\" ++ context ++ \"\\nQuestion: \" ++ question)\n    > print\n```\n\n### AI Agent with Tool Calling\n\n```pipe\nfn get_weather city\n    match city\n        | \"Berlin\" -> \"22°C, sunny\"\n        | \"London\" -> \"15°C, rainy\"\n        | _ -> city ++ \": no data\"\n\nai_tool \"get_weather\" \"Get current weather for a city\" {city: \"Name of the city\"} get_weather\n\nai_with_tools \"You are a weather assistant.\" \"What's the weather in Berlin and London?\"\n    > print\n```\n\n### Concurrency — 3 LLM Calls in 1.5s, Not 4s\n\n```pipe\nai_provider \"deepseek\"\n\na: \"Explain monads\" >> ask\nb: \"What is CP/M?\" >> ask\nc: \"Explain RFC 791\" >> ask\n\nprint a ++ b ++ c   -- Future auto-resolution\n```\n\n### Discord CI/CD Notifications\n\n```pipe\nimport \"discord.pipe\" as d\nai_provider \"deepseek\"\n\n-- AI code review per commit, sent as Discord embed\nreview: ai_chat \"Review this code change\" diff 800\n\nd.d_webhook_embed (env \"DISCORD_WEBHOOK\") {\n    title: \"CI: Push to master\",\n    color: 3447003,\n    fields: [\n        {name: \"Changed Files\", value: stat},\n        {name: \"AI Review\", value: review}\n    ]\n}\n```\n\n## Comparison: Pipe vs Python + LangChain\n\n|                          | Python + LangChain            | Pipe                           |\n|--------------------------|-------------------------------|--------------------------------|\n| **RAG pipeline**         | ~80 LOC                       | ~8 LOC                         |\n| **Sandbox LLM access**   | Custom middleware              | One `sandbox_profile` block    |\n| **Switch AI provider**   | Rewrite SDK calls              | `ai_provider \"deepseek\"`       |\n| **Deploy to server**     | Docker + venv + pip            | `scp pipe binary`              |\n| **Parallel LLM calls**   | `asyncio.gather()` boilerplate | `>>` operator, `ai_batch`      |\n| **MCP Server + Client**  | Library-dependent              | 13 builtins, zero deps, 100+ servers |\n| **Binary size**          | ~500 MB (with deps)            | ~8 MB                          |\n\n## Features\n\n- **MCP-native** — 13 builtins for MCP Server + Client. Pure Go stdlib. Connect to any stdio MCP server\n- **Ship AI pipelines 10x faster** — 36 AI + 13 MCP builtins: no imports, no SDKs, no API wrappers\n- **Lock down AI agents in one line** — Declarative sandbox profiles: restrict `exec`, `write_file`, `http_get` with a single block\n- **Deploy in seconds** — One statically-linked ~8 MB binary. No venv, no pip, no Docker. Linux, macOS, Windows, Raspberry Pi, or your browser via WebAssembly\n- **3 LLM calls in 1.5s, not 4s** — `>>` starts any pipeline stage in the background. Futures auto-resolve. `ai_batch` handles hundreds of texts concurrently with built-in rate limiting\n- **No vendor lock-in** — OpenAI, Anthropic (Claude), DeepSeek, Ollama. Switch with one line. Same code works everywhere\n- **Concurrency primitives** — channels (`send`/`recv`), mutex (`lock`/`unlock`), counting semaphore (`acquire`/`release`)\n- **Pipeline-native syntax** — `>` sequential, `>>` parallel. Data flows top to bottom — readable, composable, debuggable\n- **Social platforms built in** — Discord webhooks and Telegram bots as Pipe modules. AI code reviews, notifications, chat — zero API costs for sending\n- **Bytecode VM** — Compile to bytecode, run on a stack VM with automatic caching. Measured 0.6x-55x vs tree-walker depending on workload (recursion-heavy code up to ~55x)\n- **Module ecosystem** — 23 curated modules, registry with version pinning (`@1.0.0`). `pipe -get` installs, import by name\n- **Built-in testing** — `test` blocks with `assert_eq`, `assert_error`. Run with `pipe -test`. Zero setup\n- **GitHub Action** — Run Pipe directly in CI/CD. No installation needed\n- **VSCode Extension** — Syntax highlighting, IntelliSense, LSP-powered diagnostics and completions\n- **Self-extracting binary** — Ship your pipeline as a standalone executable (`pipe -build`)\n\n## Quick Start\n\n```bash\ngit clone https://github.com/MachuraHarry/pipe && cd pipe && make build\nexport DEEPSEEK_API_KEY=\"sk-...\"\n./bin/pipe -vm -q -c 'ai_provider \"deepseek\"; ask \"What makes Pipe different?\" > print'\n```\n\n## Try it in your browser\n\nNo install needed — Pipe runs fully in your browser via WebAssembly:\n\n<p align=\"center\">\n  <a href=\"https://pipe-lang.com/playground.html\">\n    <img src=\"website/logo.svg\" width=\"64\" height=\"64\" alt=\"Pipe\"><br>\n    <b>Open the Pipe Playground</b>\n  </a>\n</p>\n\n```pipe\n-- Paste this into the playground and hit Run\nlevels: [\"error\",\"warn\",\"info\"]\nread_file \"server.log\"\n    > classify levels\n    > summarize\n    > print\n```\n\n## GitHub Action\n\nRun Pipe directly in CI/CD — no installation needed:\n\n```yaml\n- uses: MachuraHarry/pipe/.github/actions/pipe-action@master\n  with:\n    script: |\n      print \"Hello from CI/CD!\"\n      log: exec \"git log --oneline -20\"\n      print (get log \"output\")\n```\n\n[→ GitHub Action Documentation](docs/en/20-github-action.md)\n\n## VSCode Extension\n\nSyntax highlighting and full IntelliSense for `.pipe` files, powered by a Language Server Protocol client (`vscode/`) and the `pipe-lsp` server (`cmd/pipe-lsp`):\n\n- Completion, hover docs, signature help, go-to-definition, references, rename\n- Diagnostics (parse errors, undefined/unused variables) and semantic highlighting\n- Format document, auto-completion of brackets, auto-indent and code folding\n\n```sh\nmake vsix     # builds the server and packages vscode/pipe-syntax-1.0.0.vsix\n```\n\nOr run the extension in development with F5 from the `vscode/` folder. See [VSCode Extension Documentation](docs/en/15-vscode-extension.md).\n\n## Module Ecosystem\n\nPipe has a [curated module library](https://github.com/MachuraHarry/pipe-modules) — **23 reusable modules** with version pinning:\n\n| Infrastructure | Data & CLI | AI & Agents | DevTools | Social |\n|---|---|---|---|---|\n| `pipe-http` | `sqlite` | `rag-pipe` | `pipe-test` | `telegram-bot` |\n| `pipe-cli` | `jpipe` | `log-analyzer` | `pipe-validate` | `mqtt` |\n| `pipe-orm` | `pipe-tpl` | `sentiment` | | |\n| `pipe-web` | `pipe-date` | `code-review` | | |\n| | | `translate-batch` | | |\n| | | `changelog-gen` | | |\n| | | `email-classifier` | | |\n| | | `incident-report` | | |\n| | | `parallel-runner` | | |\n| | | `date-formatter` | | |\n| | | `docs-pipe` | | |\n\n```bash\npipe -search                 # Browse modules\npipe -search sql             # Filter by keyword\npipe -get sqlite             # Install latest\npipe -get sqlite@0.8.0       # Install specific version\n```\n\n```pipe\nimport \"sqlite\"                            -- database engine\nimport \"pipe-http\"                         -- HTTP client\nimport \"mqtt\"                              -- MQTT 5.0 client\nimport \"discord.pipe\" as d                 -- Discord webhooks + bot\n\nidx: index_create h \"knowledge\"\nindex_add idx \"Pipe is an AI-native language.\"\nindex_search idx \"language\" 3 > each print\n```\n\n[→ Ecosystem Documentation](docs/en/21-ecosystem.md) | [→ Contribute a Module](https://github.com/MachuraHarry/pipe-modules/blob/master/CONTRIBUTING.md)\n\n## Execution Modes\n\n| Mode | Command | Speed |\n|------|---------|-------|\n| Tree-Walker | `./bin/pipe script.pipe` | Baseline |\n| Bytecode VM | `./bin/pipe -vm -q script.pipe` | 0.6x-55x (recursion-heavy up to ~55x) |\n\n## 49 AI + MCP Builtins (36 AI + 13 MCP)\n\n### Understanding\n`summarize`, `translate`, `classify`, `extract`, `ask`, `generate`, `generate_json`\n\n### Speed & Control\n`ai_stream`, `ai_batch`, `ai_parallel`, `ai_rate_limit`, `ai_chat`, `ai_chat_json`\n\n### Search & Retrieval\n`web_search`, `wiki_search`, `embed`, `embed_batch`, `cosine_sim`, `dot_product`, `nearest`\n\n### Agents & Tools\n`agent`, `agent_ask`, `agent_clear`, `ai_tool`, `ai_with_tools`\n\n### Config & Cost\n`ai_provider`, `ai_model`, `ai_host`, `ai_set_key`, `ai_timeout`, `ai_cache`, `ai_cost`, `ai_tokens`, `ai_cache_hits`, `ai_cache_misses`\n\n### MCP — Model Context Protocol\n`mcp_server`, `mcp_serve_stdio`, `mcp_serve_sse`, `mcp_tools`, `mcp_resource`, `mcp_resource_template`, `mcp_prompt`, `mcp_resources`, `mcp_read_resource`, `mcp_prompts`, `mcp_prompt_get`, `mcp_use_stdio`, `mcp_use_sse`\n\n### Self-Healing\n`try_ai`, `try_ai_log`\n\n## Advanced Features\n\n### Self-Healing Code (`try_ai`)\n```pipe\nai_provider \"deepseek\"\n\nresult: try_ai\n    \"42\" * 3           -- E002 Type Error -> AI wraps with to_num -> 126\ncatch e\n    0                   -- only reached if AI fix fails\n\nprint result           -- 126\n```\n\n### Parallel Pipeline (`>>`)\n```pipe\na: \"Frage A\"\n    >> ask\nb: \"Frage B\"\n    >> ask\nc: \"Frage C\"\n    >> ask\n\nprint a ++ b ++ c   -- Future auto-resolution\n```\n\n### Guard Clauses in Match\n```pipe\nfn classify severity\n    match severity\n        | s if s > 9 -> \"critical\"\n        | s if s > 5 -> \"warning\"\n        | _ -> \"info\"\n```\n\n### Concurrency: Channels\n```pipe\nch: chan 3\ngo { send ch \"hello\" }\ngo { send ch \"world\" }\nprint (recv ch) ++ \" \" ++ (recv ch)\n```\n\n### Sandbox Profiles\n```pipe\nsandbox_profile \"safe\" {fs: \"read-only\", network: false, exec: false, ai: true}\nsandbox_profile \"agent\" {fs: \"temp-only\", network: true, exec: false, ai: true}\n\nset_sandbox \"safe\"\nread_file \"/etc/config\"     -- reading allowed\nwrite_file \"/etc/config\"    -- E_SANDBOX blocked\n```\n\n## Architecture\n\n```\nSource (.pipe) -> Lexer -> Parser -> AST -> [ Tree-Walker | Compiler + VM ]\n                                              |\n                                    Builtins (246 total: 36 AI + 13 MCP + 192 standard)\n                                              |\n                                MCP Server <-> MCP Clients (stdio + HTTP)\n```\n\n- 67 token types, 36 AST node types, 43 opcodes\n- ~37,000 LoC Go, 643 tests, 87 example programs\n- Zero dependencies — pure Go stdlib\n\n## Documentation\n\n[→ Full documentation (English)](/docs/en/index.md)\n[→ Vollständige Dokumentation (Deutsch)](/docs/de/index.md)\n\n## Project Structure\n\n```\npipe/\n├── cmd/\n│   ├── pipe/main.go           # Entry point\n│   └── pipe-lsp/              # Language Server Protocol server (IntelliSense)\n├── pkg/\n│   ├── ai/                    # AI provider integrations\n│   ├── analysis/              # IntelliSense library (builtins, diagnostics, completion...)\n│   ├── ast/                   # AST node definitions\n│   ├── build/                 # Self-extracting binary builder\n│   ├── cache/                 # Bytecode cache\n│   ├── compiler/              # Compiler to bytecode\n│   ├── eval/                  # Tree-walk interpreter\n│   ├── formatter/             # Code formatter\n│   ├── gen/                   # Code generation helpers\n│   ├── lexer/                 # Lexer and tokens\n│   ├── mcp/                   # MCP server + client (zero-dependency)\n│   ├── object/                # Runtime objects\n│   ├── parser/                # Parser\n│   ├── stdlib/                # Standard library helpers\n│   └── vm/                    # Bytecode VM\n├── examples/                  # 87 example programs\n├── test/integration/          # Integration tests\n├── vscode/                    # VSCode extension (syntax highlighting + LSP client)\n├── docs/                      # Documentation (DE + EN)\n├── website/                   # Project website\n├── modules/                   # Language modules (mqtt, discord, x, etc.)\n├── Makefile\n├── go.mod\n└── LICENSE\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 18202,
  "sha": "23e5fefc27c7d285692e4c90dcde533e53faad076eb8af0853e807d92bef4ae0",
  "repo_slug": "machuraharry/pipe",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_machuraharry_pipe_docs_39a44a8c/readme"
}