Pipe β MCP-native runtime for AI infrastructure

The first language with built-in MCP β server and client. 198 builtins, single ~7 MB binary. Zero dependencies.
Quick Install
curl -fsSL https://pipe-lang.com/install.sh | bash # Linux & macOS
Windows (PowerShell): irm https://pipe-lang.com/install.ps1 | iex
The 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=v0.9.3. See the full install docs.
The Problem
Running AI in production is harder than it should be:
- Security β LLMs with file access, network, and
exec are a liability. You need fine-grained sandboxing at the language level, not afterthought middleware.
- Performance β Sequential API calls turn a 1-second pipeline into a 10-second bottleneck. Parallelism shouldn't require
asyncio.gather() boilerplate.
- Vendor Lock-in β Switching from OpenAI to DeepSeek means rewriting your Python SDK code. Provider changes should be one line.
- 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.
Pipe fixes this at the language level.
What is Pipe?
Pipe 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.
Python + LangChain (~80 lines):
import openai
client = openai.OpenAI()
def summarize(text):
r = client.chat.completions.create(model="gpt-4o", messages=[{"role":"user","content":text}])
return r.choices[0].message.content
def translate(text, lang):
r = client.chat.completions.create(model="gpt-4o",
messages=[{"role":"system","content":f"Translate to {lang}"},{"role":"user","content":text}])
return r.choices[0].message.content
text = open("news.txt").read()
print(translate(summarize(text), "de"))
Pipe (5 lines):
read_file "news.txt"
> summarize -- LLM call
> translate "de" -- LLM call
> print
Model Context Protocol
Pipe has built-in MCP β both as a server and client. No SDKs, no npm packages, no Python. Pure Go stdlib.
MCP Server β Expose your tools
fn get_weather city
match city
| "Berlin" -> "22Β°C, sunny"
| "London" -> "15Β°C, rainy"
| _ -> city ++ ": no data"
ai_tool "get_weather" "Get weather for a city" {city: "City name"} get_weather
mcp_server "Weather Agent" "1.0.0"
mcp_serve_stdio
Configure in Claude Desktop (claude_desktop_config.json):
{ "mcpServers": { "pipe": { "command": "/tmp/pipe", "args": ["agent.pipe"] } } }
MCP Client β Use external tools
ai_provider "deepseek"
ai_set_key "deepseek" (env "DEEPSEEK_API_KEY")
-- Connect to GitHub + Filesystem MCP servers
mcp_use_stdio "npx" "-y" "@modelcontextprotocol/server-github" {GITHUB_TOKEN: (env "GITHUB_TOKEN")}
mcp_use_stdio "npx" "-y" "@modelcontextprotocol/server-filesystem" "/tmp"
-- AI discovers and uses all tools automatically
result: ai_with_tools "You are a DevOps assistant." "Search pipe's open issues and list files in /tmp." 10
print result
Any stdio MCP server works immediately: Filesystem, GitHub, Git, Postgres, SQLite, Slack, Brave Search, Memory, Sequential Thinking β anything on npm/uvx.
Use Cases
Log Analysis β Incident Report
is_critical: fn line
contains line "critical"
read_file "/var/log/app/errors.log"
> split "\n"
> filter is_critical
> summarize
> translate "de"
> save "incident_report.txt"
RAG Pipeline
ai_provider "deepseek"
docs: read_lines "knowledge_base.txt"
vectors: embed_batch docs
question: "How does the bytecode VM work?"
q_vec: embed question
top: nearest q_vec vectors 3
context: ""
for idx in top
context: context ++ (at docs idx) ++ "\n---\n"
ask ("Context:\n" ++ context ++ "\nQuestion: " ++ question)
> print
AI Agent with Tool Calling
fn get_weather city
match city
| "Berlin" -> "22Β°C, sunny"
| "London" -> "15Β°C, rainy"
| _ -> city ++ ": no data"
ai_tool "get_weather" "Get current weather for a city" {city: "Name of the city"} get_weather
ai_with_tools "You are a weather assistant." "What's the weather in Berlin and London?"
> print
Discord CI/CD Notifications
import "discord.pipe" as d
ai_provider "deepseek"
-- AI code review per commit, sent as Discord embed
review: ai_chat "Review this code change" diff 800
d.d_webhook_embed (env "DISCORD_WEBHOOK") {
title: "π§ CI: Push to master",
color: 3447003,
fields: [
{name: "Changed Files", value: stat},
{name: "AI Review", value: review}
]
}
Comparison: Pipe vs Python + LangChain
| Python + LangChain | Pipe |
|---|
| RAG pipeline | ~80 LOC | ~8 LOC |
| Sandbox LLM access | Custom middleware | One sandbox_profile block |
| Switch AI provider | Rewrite SDK calls | ai_provider "deepseek" |
| Deploy to server | Docker + venv + pip | scp pipe binary |
| Parallel LLM calls | asyncio.gather() boilerplate | >> operator, ai_batch |
| MCP Server + Client | Library-dependent | 7 builtins, zero deps, 100+ servers |
| Binary size | ~500 MB (with deps) | ~7 MB |
Features
- MCP-native β 6 builtins for MCP Server + Client. Pure Go stdlib. Connect to any stdio MCP server
- Ship AI pipelines 10Γ faster β 18 AI + 6 MCP builtins: no imports, no SDKs, no API wrappers
- Lock down AI agents in one line β Declarative sandbox profiles: restrict
exec, write_file, http_get with a single block
- Deploy in seconds β One statically-linked ~7 MB binary. No venv, no pip, no Docker. Linux, macOS, Windows, Raspberry Pi, or your browser via WebAssembly
- 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
- No vendor lock-in β OpenAI, Anthropic (Claude), DeepSeek, Ollama. Switch with one line. Same code works everywhere
- Pipeline-native syntax β
> sequential, >> parallel. Data flows top to bottom β readable, composable, debuggable
- Social platforms built in β Discord webhooks and Telegram bots as Pipe modules. AI code reviews, notifications, chat β zero API costs for sending
- Bytecode VM β Compile to bytecode, execute ~7Γ faster with automatic caching
- Module ecosystem β 23 curated modules, registry with version pinning (
@1.0.0). pipe -get installs, import by name
- Built-in testing β
test blocks with assert_eq, assert_error. Run with pipe -test. Zero setup
- GitHub Action β Run Pipe directly in CI/CD. No installation needed
- VSCode Extension β Syntax highlighting, IntelliSense, LSP-powered diagnostics and completions
- Self-extracting binary β Ship your pipeline as a standalone executable (
pipe -build)
Quick Start
git clone https://github.com/MachuraHarry/pipe && cd pipe && make build
export DEEPSEEK_API_KEY="sk-..."
./bin/pipe -vm -q -c 'ai_provider "deepseek"; ask "What makes Pipe different?" > print'
Try it in your browser
No install needed β Pipe runs fully in your browser via WebAssembly:

Open the Pipe Playground β
-- Paste this into the playground and hit Run
levels: ["error","warn","info"]
read_file "server.log"
> classify levels
> summarize
> print
GitHub Action
Run Pipe directly in CI/CD β no installation needed:
- uses: MachuraHarry/pipe/.github/actions/pipe-action@master
with:
script: |
print "Hello from CI/CD!"
log: exec "git log --oneline -20"
print (get log "output")
β GitHub Action Documentation
VSCode Extension
Syntax highlighting and full IntelliSense for .pipe files, powered by a Language Server Protocol client (vscode/) and the pipe-lsp server (cmd/pipe-lsp):
- Completion, hover docs, signature help, go-to-definition, references, rename
- Diagnostics (parse errors, undefined/unused variables) and semantic highlighting
- Format document, auto-completion of brackets, auto-indent and code folding
make vsix # builds the server and packages vscode/pipe-syntax-0.1.0.vsix
Or run the extension in development with F5 from the vscode/ folder. See VSCode Extension Documentation.
Module Ecosystem
Pipe has a curated module library β 23 reusable modules with version pinning:
| Infrastructure | Data & CLI | AI & Agents | DevTools | Social |
|---|
pipe-http | sqlite | rag-pipe π | pipe-test | discord π |
pipe-cli | jpipe | log-analyzer | pipe-validate π | x π (in dev) |
pipe-orm π | pipe-tpl | sentiment | | telegram-bot |
pipe-web π | pipe-date | code-review | | |
| | translate-batch | | |
| | changelog-gen | | |
| | email-classifier | | |
| | incident-report | | |
| | parallel-runner | | |
| | date-formatter | | |
pipe -search # Browse modules
pipe -search sql # Filter by keyword
pipe -get sqlite # Install latest
pipe -get sqlite@0.8.0 # Install specific version
import "sqlite" -- database engine
import "pipe-http" -- HTTP client
import "discord.pipe" as d -- Discord webhooks + bot
import "x.pipe" as x -- X (Twitter) API v2
idx: index_create h "knowledge"
index_add idx "Pipe is an AI-native language."
index_search idx "language" 3 > each print
β Ecosystem Documentation | β Contribute a Module
Execution Modes
| Mode | Command | Speed |
|---|
| Tree-Walker | ./bin/pipe script.pipe | Baseline |
| Bytecode VM | ./bin/pipe -vm -q script.pipe | ~7Γ faster |
24 AI + MCP Builtins (18 AI + 6 MCP)
Understanding
summarize, translate, classify, extract, ask, generate, generate_json
Speed & Control
ai_stream, ai_batch, ai_parallel, ai_rate_limit, ai_chat, ai_chat_json
Search & Retrieval
web_search, wiki_search, embed, embed_batch, cosine_sim, dot_product, nearest
Agents & Tools
agent, agent_ask, agent_clear, ai_tool, ai_with_tools
MCP β Model Context Protocol
mcp_server, mcp_serve_stdio, mcp_serve_sse, mcp_tools, mcp_use_stdio, mcp_use_sse
Configuration
ai_provider, ai_model, ai_timeout, ai_host, ai_cache, ai_set_key
Self-Healing
try_ai, try_ai_log
Advanced Features
Self-Healing Code (try_ai)
ai_provider "deepseek"
result: try_ai
"42" * 3 -- E002 Type Error β AI wraps with to_num β 126
catch e
0 -- only reached if AI fix fails
print result -- 126
Parallel Pipeline (>>)
a: "Frage A"
>> ask
b: "Frage B"
>> ask
c: "Frage C"
>> ask
print a ++ b ++ c -- Future auto-resolution
Sandbox Profiles
sandbox_profile "safe" {fs: "read-only", network: false, exec: false, ai: true}
sandbox_profile "agent" {fs: "temp-only", network: true, exec: false, ai: true}
set_sandbox "safe"
read_file "/etc/config" -- β
reading allowed
write_file "/etc/config" -- β E_SANDBOX blocked
Architecture
Source (.pipe) β Lexer β Parser β AST β [ Tree-Walker | Compiler + VM ]
β
Builtins (198 total: 18 ai_*, 6 mcp_*, 174 stdlib)
β
MCP Server β MCP Clients (stdio + HTTP)
- 67 token types, 35 AST node types, 42 opcodes
- ~29,000 LoC Go, 416 tests, 72 example programs
- Zero dependencies β pure Go stdlib
Documentation
β Full documentation (English)
β VollstΓ€ndige Dokumentation (Deutsch)
Project Structure
pipe/
βββ cmd/
β βββ pipe/main.go # Entry point
β βββ pipe-lsp/ # Language Server Protocol server (IntelliSense)
βββ pkg/
β βββ ai/ # AI provider integrations
β β βββ ai.go
β β βββ ai_test.go
β β βββ embeddings.go
β β βββ providers.go
β β βββ tools.go
β βββ analysis/ # IntelliSense library (builtins, diagnostics, completionβ¦)
β βββ ast/ # AST node definitions
β β βββ ast.go
β βββ build/ # Self-extracting binary builder
β β βββ build.go
β βββ cache/ # Bytecode cache
β β βββ cache.go
β β βββ cache_test.go
β βββ compiler/ # Compiler to bytecode
β β βββ compiler.go
β β βββ compiler_test.go
β β βββ opcode.go
β βββ eval/ # Tree-walk interpreter
β β βββ builtins.go
β β βββ eval.go
β β βββ eval_test.go
β βββ formatter/ # Code formatter
β β βββ formatter.go
β β βββ formatter_test.go
β βββ lexer/ # Lexer and tokens
β β βββ lexer.go
β β βββ lexer_test.go
β β βββ token.go
β βββ mcp/ # MCP server + client (zero-dependency)
β β βββ types.go
β β βββ server.go
β β βββ client.go
β β βββ stdio.go
β β βββ schema.go
β βββ object/ # Runtime objects
β β βββ ai_builtins_test.go
β β βββ environment.go
β β βββ object.go
β βββ parser/ # Parser
β β βββ parser.go
β β βββ parser_test.go
β βββ stdlib/ # Standard library helpers
β βββ vm/ # Bytecode VM
β βββ vm.go
β βββ vm_test.go
βββ examples/ # ~60 example programs
β βββ mcp_server.pipe # MCP server with weather/docs/shell tools
β βββ mcp_filesystem.pipe # MCP client using filesystem server
β βββ mcp_github.pipe # MCP client using GitHub server
β βββ mcp_combined.pipe # MCP hub: own tools + external servers
β βββ ai_tool_demo.pipe
β βββ selfhost/ # Self-hosting lexer/parser
β βββ ...
βββ test/integration/ # Integration tests
βββ vscode/ # VSCode extension (syntax highlighting + LSP client)
β βββ src/ # LSP client bootstrap (TypeScript)
β βββ syntaxes/pipe.tmLanguage.json
β βββ package.json
βββ docs/ # Documentation (DE + EN)
β βββ en/ # English docs (25 chapters)
β βββ de/ # German docs (25 chapters)
βββ website/ # Project website
βββ Makefile
βββ go.mod
βββ LICENSE
Contributing
See CONTRIBUTING.md.
License
MIT β see LICENSE.