I made a local-first MCP tutorial repo with node-llama-cpp and a custom agent loop

Reddit r/LocalLLaMA Tools

Summary

A tutorial repo that teaches the Model Context Protocol (MCP) by building it step by step in Node.js, with a local-first setup using node-llama-cpp, GGUF models, and a custom agent loop.

I just published a repo called MCP from Scratch that teaches the Model Context Protocol by building it step by step in plain Node.js. Most of the repo is about understanding MCP itself, but the later modules may be relevant here: I added a local-first setup using `node-llama-cpp`, GGUF models, MCP sampling, and a custom plan -> act -> observe agent loop. So the repo goes from: * raw JSON-RPC and stdio transport * to a working MCP server with tools/resources/prompts * to local model integration * to an agent loop that uses MCP tools with a local GGUF model There’s also an optional LangChain example, but the main path is intentionally minimal and tries to make the underlying mechanics obvious. Key points: * plain Node.js, minimal abstractions * designed as a learning repo, not a production SDK * uses shared local GGUF models for the later modules * built for people who want to understand what MCP tooling is actually doing under the hood Repo: [https://github.com/pguso/mcp-from-scratch](https://github.com/pguso/mcp-from-scratch) Would especially love feedback from people here on the local inference side: * model choice * whether the agent loop examples feel useful or too toy-ish
Original Article

Similar Articles

Running local LLM's as agents in Claude Code

Reddit r/LocalLLaMA

This article presents a custom MCP setup that enables offloading coding tasks from Anthropic's Claude models to local Qwen3.8-27B models within the same session, using tools like llama.cpp.

Build a local AI coding agent from scratch

Reddit r/ArtificialInteligence

A step-by-step guide to building a minimal AI coding agent that runs entirely locally using llama.cpp, GGUF models, and a custom harness, demonstrating how to set up tools and call a model to execute real tasks like creating a landing page.

@swyx: explain this

X AI KOLs Following

This article explains the Model Context Protocol (MCP) for building pluggable AI agent architectures, detailing lessons from building an MCP server at Sentry, including OAuth 2.1 integration, designing agent-friendly tool interfaces, and current ecosystem limitations.