{"slug": "your-first-mcp-server-in-a-language-not-an-sdk", "title": "🔌 Your First MCP Server — in a Language, Not an SDK", "summary": "Pipe, a new programming language, claims to be the first with built-in Model Context Protocol (MCP) support, allowing developers to expose functions to clients like Claude Desktop and Cursor without an SDK or dependencies. The language's `ai_tool` function registers a tool, while `mcp_server` and `mcp_serve_stdio` start a stdio server, all within a single ~7 MB binary that also acts as a client via `mcp_use_stdio`. The example server, 'Pipe Greeting Server' version 1.0.0, can be run with `pipe examples/blog_mcp_server.pipe` and tested with `initialize`, `tools/list`, and `tools/call`.", "body_md": "[← All posts← Alle Beiträge](../blog.html)\n\n# 🔌 Your First MCP Server — in a Language, Not an SDK\n\n**Expose a plain function to Claude, Cursor, or any MCP client — in four lines, with zero dependencies.**\n\n> **Part of the *Pipe in 30 Lines* series:** [RAG without a vector DB](tutorial-local-rag.html) · [Self-healing code](tutorial-self-healing.html) · [Parallel LLM calls](tutorial-parallel.html)\n\nBuilding an MCP server usually means picking an SDK, wiring up JSON-RPC plumbing, and shipping a runtime with dependencies. Pipe is the first language with **built-in MCP** — `ai_tool`\n\nregisters a function, `mcp_server`\n\n+ `mcp_serve_stdio`\n\nstart the server.\n\n```\nfn greet name\n    \"Hello, \" ++ name ++ \"! Pipe speaks MCP natively.\"\n\nai_tool \"greet\" \"Greet a person by name\" {name: \"Person's name\"} greet\n\nmcp_server \"Pipe Greeting Server\" \"1.0.0\"\nmcp_serve_stdio\n```\n\nPoint Claude Desktop (or Cursor, or any MCP client) at it:\n\n```\n{\n  \"mcpServers\": {\n    \"pipe-greet\": {\n      \"command\": \"/path/to/pipe\",\n      \"args\": [\"examples/blog_mcp_server.pipe\"]\n    }\n  }\n}\n```\n\nWhat happens here:\n\nturns any Pipe function into a schema'd tool — name, description, and an argument map are all it needs.`ai_tool`\n\nstart the server and serve the tool over stdio.`mcp_server`\n\n+`mcp_serve_stdio`\n\n- The same binary that *serves* MCP can also *consume* it:\n`mcp_use_stdio`\n\nconnects to any MCP server off npm/uvx, so your LLM gets GitHub, filesystem, or database tools in the same pipeline.\n\nThere's no SDK, no `package.json`\n\n, no build step. A single ~7 MB binary is both server and client — the tool you expose to Claude is the same language you write your pipeline in. That's the whole idea behind the [MCP Cell](mcp-cell.html): when MCP is a language primitive, the sandbox can wrap the server, the client, and the tools.\n\nRun it yourself: `pipe examples/blog_mcp_server.pipe`\n\n(it starts a stdio server — hit it with `initialize`\n\n, `tools/list`\n\n, then `tools/call`\n\nwith `{\"name\":\"greet\",\"arguments\":{\"name\":\"Harry\"}}`\n\n).\n\n# 🔌 Dein erster MCP-Server — in einer Sprache, nicht in einem SDK\n\n**Eine normale Funktion für Claude, Cursor oder jeden MCP-Client bereitstellen — in vier Zeilen, mit null Abhängigkeiten.**\n\n> **Teil der Serie *Pipe in 30 Lines*:** [RAG ohne Vektor-DB](tutorial-local-rag.html) · [Selbstheilender Code](tutorial-self-healing.html) · [Parallele LLM-Calls](tutorial-parallel.html)\n\nEinen MCP-Server zu bauen heißt sonst: SDK auswählen, JSON-RPC-Verkabelung, und eine Runtime mit Dependencies ausliefern. Pipe ist die erste Sprache mit **eingebautem MCP** — `ai_tool`\n\nregistriert eine Funktion, `mcp_server`\n\n+ `mcp_serve_stdio`\n\nstarten den Server.\n\n```\nfn greet name\n    \"Hello, \" ++ name ++ \"! Pipe speaks MCP natively.\"\n\nai_tool \"greet\" \"Greet a person by name\" {name: \"Person's name\"} greet\n\nmcp_server \"Pipe Greeting Server\" \"1.0.0\"\nmcp_serve_stdio\n```\n\nClaude Desktop (oder Cursor, oder jeder MCP-Client) zeigt darauf:\n\n```\n{\n  \"mcpServers\": {\n    \"pipe-greet\": {\n      \"command\": \"/path/to/pipe\",\n      \"args\": [\"examples/blog_mcp_server.pipe\"]\n    }\n  }\n}\n```\n\nWas hier passiert:\n\nmacht aus jeder Pipe-Funktion ein Tool mit Schema — Name, Beschreibung und Argument-Map reichen.`ai_tool`\n\nstarten den Server und servieren das Tool über stdio.`mcp_server`\n\n+`mcp_serve_stdio`\n\n- Dieselbe Binary, die MCP *serviert*, kann es auch *konsumieren*:\n`mcp_use_stdio`\n\nverbindet sich mit jedem MCP-Server von npm/uvx — dein LLM bekommt GitHub-, Dateisystem- oder Datenbank-Tools in derselben Pipeline.\n\nKein SDK, kein `package.json`\n\n, kein Build-Schritt. Eine einzelne ~7-MB-Binary ist Server *und* Client — das Tool, das du Claude gibst, ist dieselbe Sprache, in der du deine Pipeline schreibst. Genau das ist die Idee hinter der [MCP-Zelle](mcp-cell.html): Wenn MCP ein Sprach-Primitiv ist, kann die Sandbox Server, Client und Tools gemeinsam umschließen.\n\nSelbst ausprobieren: `pipe examples/blog_mcp_server.pipe`\n\n(startet einen stdio-Server — teste mit `initialize`\n\n, `tools/list`\n\n, dann `tools/call`\n\nmit `{\"name\":\"greet\",\"arguments\":{\"name\":\"Harry\"}}`\n\n).", "url": "https://wpnews.pro/news/your-first-mcp-server-in-a-language-not-an-sdk", "canonical_source": "https://pipe-lang.com/blog/tutorial-first-mcp-server.html", "published_at": "2026-08-14 07:41:46.370889+00:00", "updated_at": "2026-08-14 07:41:48.297171+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-infrastructure"], "entities": ["Pipe", "Claude Desktop", "Cursor", "MCP"], "alternates": {"html": "https://wpnews.pro/news/your-first-mcp-server-in-a-language-not-an-sdk", "markdown": "https://wpnews.pro/news/your-first-mcp-server-in-a-language-not-an-sdk.md", "text": "https://wpnews.pro/news/your-first-mcp-server-in-a-language-not-an-sdk.txt", "jsonld": "https://wpnews.pro/news/your-first-mcp-server-in-a-language-not-an-sdk.jsonld"}}