What this thread does
Do first: start a tools-aware local GGUF with llama-server -m model.gguf --jinja --mcp-servers-config mcp.json and expose only the intended project directory.
Short answer
As of November 2026, pin llama.cpp b12283 for this recipe. Its stdio MCP integration starts tool subprocesses itself; an external agent is not required for the Web UI route. Use the Qwen2.5-7B-Instruct GGUF example and its native tools-aware template rather than an arbitrary completion model.
Choose / don't choose
- Server-side stdio: choose local project inspection/editing with the Web UI; MCP tools can be enabled without built-in shell tools.
- Remote HTTP: choose the Web UI's HTTP integration or an external client.
--webui-mcp-proxyenables the MCP CORS proxy (disabled by default); don't put a URL-only entry in the stdio config (transport).
Not for: hosting a remote MCP endpoint; see remote-mcp-server-cloudflare-workers.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
--jinja | Enable tool-aware template handling | b12283 | function calling |
--chat-template-file | Override only with the model's matching tools template; inspect chat_template / chat_template_tool_use in /props | b12283 | templates |
--mcp-servers-config | mcp.json; stdio only, default none | b12283 | server |
mcpServers entry: command, args, cwd | Executable, argument array and child working directory; missing command skips entry | b12283 | server |
timeout_ms | Per-call default 30000 ms | b12283 | server |
| Filesystem allowed directories | Only the absolute project directory; --read-only withholds write tools during inspection | Current filesystem server | access controls |
Example mcp.json (replace the illustrative directory):
{"mcpServers": {"project": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/absolute/project"],
"timeout_ms": 30000
}}}
The filesystem server supplies inspection/editing tools. The child inherits server privileges; directory policy and OS confinement must match intended access.
Order of operations
1. Initialize model/template and MCP config. Startup discovers tools once, stops each subprocess, and respawns it when called. Confirm <server>_<tool> names in GET /tools and the UI (lifecycle). 2. Present discovered JSON schemas to inference. Accept only an advertised name with schema-valid JSON arguments; never execute prose resembling a tool request. 3. Execute the accepted call, retain its identity and actual result, append both to history, then generate again. Implement this loop in a custom client; the model endpoint alone is not that loop. 4. Require a directory listing, small edit, read-back and outside-directory refusal before increasing scope. After a timed-out write, inspect the file before retrying.
Known failures and fixes
| Error (short quote) | Cause | Fix | Source |
|---|---|---|---|
Chat format: Generic | Template has no recognized native handler; this is a fallback log, not an exception | Compare artifact and /props; use the model's documented template override | format guide |
MCP tool returned an error | MCP result has isError; parsing succeeded but execution failed | Inspect server content and inputSchema; correct name, types and allowed path | bridge |
Access denied | Path is outside filesystem policy | Use the allowed project path; don't widen access to hide a model error | filesystem |
Missing
- No model-independent success rate or sufficient context budget. Pin the filesystem package separately for repeatable tool code.
Checked
2026-11-12; llama.cpp b12283; pinned release/server/template pages, filesystem references and bridge source read. farhi's August report describes local MCP configuration; ngxson's integration change establishes the subprocess path. No inference or filesystem tool calls executed.
Started from a post by @ggml-org, packaged by the editor. Original post