Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

feat(mcp): drop the bundled Smolify integration

Cursor Agenta70679cf0b4e
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 34fb02c1..c0ff0ec6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,9 +48,6 @@ jobs:
# codebase targets.
zig:
runs-on: ubuntu-latest
- env:
- # Integration tests are deterministic/offline; hosted MCP is covered separately.
- GRAFF_NO_SMOLIFY: "1"
steps:
- uses: actions/checkout@v7
@@ -101,9 +98,6 @@ jobs:
- name: Streamable HTTP MCP handshake and session regression
run: python3 scripts/test-mcp-streamable-http.py --graff zig-out/bin/graff
- - name: Smolify lazy public-only and secret-egress boundary
- run: python3 scripts/test-smolify-boundary.py --graff zig-out/bin/graff
-
- name: Embedder mode --no-local-tools gate (#330)
run: python3 scripts/test-no-local-tools.py --graff zig-out/bin/graff
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bcfb8517..ebd87056 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,7 +21,14 @@ current is part of cutting a release.
- TUI: backspace on an empty composer drops the last chip; Ctrl+U /
Cmd+Delete clears chips with the draft; overlay backspace/`x` detaches
the previewed chip.
-- Test ratchet: unit suite 1684 (floor 1684).
+- Bundled Smolify is gone: no reserved `smolify` name, no
+ `GRAFF_SMOLIFY` auto-connect, no CI boundary E2E. Add it like any
+ other remote MCP (`graff mcp add smolify --url https://app.smol.ly/mcp`).
+ A local secret-egress gate still rejects recognizable credentials on
+ `mcp__smolify__*` if you do. Schema-gate tests keep `smolify-tools.json`
+ as a fixture.
+- Test ratchet: unit suite 1683 (floor 1683; dropped the bundled-Smolify
+ registration test).
## v0.0.277 (2026-08-26)
diff --git a/README.md b/README.md
index 3e04975f..f0898e18 100644
--- a/README.md
+++ b/README.md
@@ -642,22 +642,13 @@ Grok are read in place (plugin `mcp.json` / `.mcp.json`, `~/.claude.json`,
`~/.cursor/mcp.json`, `.cursor/mcp.json`) and fill names graff does not
already define; they still need `/mcp trust` or `--yolo`. Plugin manifests
may also declare `mcpServers` inline or as a path (Claude's shape).
-`/plugins` and `graff plugins` show which plugin trees contributed. Smolify (`https://app.smol.ly/mcp`) is available as a
-core documentation service; it needs no Node bridge or project configuration.
-Its public-read schemas are bundled locally, so startup makes no Smolify
-request. The anonymous transport initializes only after an approved tool call,
-and recognizable credentials in arguments are blocked locally. Set
-`GRAFF_NO_SMOLIFY=1` to remove its tool surface entirely. Authenticated and
-write-capable tools are hidden unless the session explicitly opts in with
-`GRAFF_SMOLIFY_ACCESS=full`. Other servers can be added from the shell or during
-a session:
+`/plugins` and `graff plugins` show which plugin trees contributed. Other
+servers can be added from the shell or during a session:
```sh
graff mcp add context7 -- npx -y @upstash/context7-mcp
graff mcp add mobbin --url https://api.mobbin.com/mcp
graff mcp login mobbin # OAuth discovery + browser PKCE flow
-graff mcp login smolify # optional access to authenticated Smolify tools
-GRAFF_SMOLIFY_ACCESS=full graff # expose the authenticated/full catalog
# In the REPL: /mcp add mobbin --url https://api.mobbin.com/mcp
```
diff --git a/assets/skills/mcp-config.md b/assets/skills/mcp-config.md
index 05aaf54d..0de3a484 100644
--- a/assets/skills/mcp-config.md
+++ b/assets/skills/mcp-config.md
@@ -35,8 +35,6 @@ global one with the same name. Their tools reach the model as
are literal strings - there is no `${VAR}` expansion.
- Remote server: `url`, Streamable HTTP. HTTPS is required except for
localhost, and `headers` is for static tokens.
-- `smolify` is a reserved core server; a workspace entry cannot shadow its
- pinned endpoint.
- Invalid JSON in one file means zero servers load from THAT file; the other one
still loads. If tools vanished after an edit, check the file parses first.
- `~/.mcpconfig.json` is not read - that path belongs to other MCP clients.
diff --git a/docs/releases/v0.0.278.md b/docs/releases/v0.0.278.md
index cd98c625..3799a9f6 100644
--- a/docs/releases/v0.0.278.md
+++ b/docs/releases/v0.0.278.md
@@ -27,6 +27,25 @@ chip; Ctrl+U / Cmd+Delete clears chips with the draft; overlay
backspace/`x` detaches the previewed chip. `ask_user` runs the same
retain-filter before flush.
+## Bundled Smolify removed
+
+The reserved core Smolify pin (`connectSmolify`, `GRAFF_SMOLIFY` /
+`GRAFF_NO_SMOLIFY`, workspace-name lockout, CI boundary E2E) is gone.
+CI was already setting `GRAFF_NO_SMOLIFY=1` and then asserting the
+default catalog advertised Smolify tools — a contradiction that kept
+the zig job red.
+
+Add Smolify like any other remote MCP:
+
+```sh
+graff mcp add smolify --url https://app.smol.ly/mcp
+```
+
+If that name is connected, the local secret-egress gate still refuses
+recognizable credentials in `mcp__smolify__*` arguments. `smolify-tools.json`
+stays as a schema-gate fixture only.
+
## Tests
-Unit suite **1684** (floor 1684). Tier 1 green on the #634 commit.
+Unit suite **1683** (floor 1683). The bundled-registration test left with
+the server. Tier 1 must stay green without `test-smolify-boundary.py`.
diff --git a/scripts/eval/tier1-manifest.json b/scripts/eval/tier1-manifest.json
index c6f84e44..cc3c6283 100644
--- a/scripts/eval/tier1-manifest.json
+++ b/scripts/eval/tier1-manifest.json
@@ -15,7 +15,7 @@
"src/repl.zig",
"TUI/root.zig"
],
- "test_count_baseline": 1684,
+ "test_count_baseline": 1683,
"test_count_slack": 25,
"required_invariants": [
{
diff --git a/scripts/test-learn-auto-init.py b/scripts/test-learn-auto-init.py
index f1c56f6e..c5fb0368 100644
--- a/scripts/test-learn-auto-init.py
+++ b/scripts/test-learn-auto-init.py
@@ -42,9 +42,8 @@ def run_session(tmp: str, port: int, prompts: int) -> str:
"GRAFF_CODEX_WS": "off",
"GRAFF_FLEET": "off",
"GRAFF_NO_TELEMETRY": "1",
- # The ambient sweep below unsets CI's own GRAFF_NO_SMOLIFY, which would
- # reconnect a network-backed MCP server whose teardown can stall the
- # exit this test measures. Keep the session hermetic.
+ # GRAFF_NO_SMOLIFY is a no-op after the bundled server was removed;
+ # keep it so an older binary in PATH still stays hermetic.
"GRAFF_NO_SMOLIFY": "1",
}
ambient = tuple(
diff --git a/scripts/test-smolify-boundary.py b/scripts/test-smolify-boundary.py
deleted file mode 100644
index 906feb7f..00000000
--- a/scripts/test-smolify-boundary.py
+++ /dev/null
@@ -1,207 +0,0 @@
-#!/usr/bin/env python3
-"""Offline E2E for Smolify's lazy, public-only, secret-blocking boundary."""
-
-from __future__ import annotations
-
-import argparse
-import json
-import os
-import re
-from pathlib import Path
-import subprocess
-import tempfile
-
-from codex_ws_mock import CodexMock, RecordedRequest
-
-
-FINAL_REPLY = "SMOLIFY_BOUNDARY_OK"
-SAFE_TOOLS = {
- "mcp__smolify__discover_public_projects",
- "mcp__smolify__read_docs_structure",
- "mcp__smolify__search_docs",
- "mcp__smolify__get_doc_page",
- "mcp__smolify__build_docs_context",
- "mcp__smolify__resolve_public_symbols",
- "mcp__smolify__inspect_public_symbols",
- "mcp__smolify__read_public_source",
-}
-
-
-def response_events(item: dict[str, object], response_id: str) -> list[dict[str, object]]:
- return [
- {"type": "response.output_item.done", "item": item},
- {
- "type": "response.completed",
- "response": {
- "id": response_id,
- "usage": {
- "input_tokens": 10,
- "input_tokens_details": {"cached_tokens": 0},
- "output_tokens": 5,
- "total_tokens": 15,
- },
- },
- },
- ]
-
-
-def events(request: RecordedRequest) -> list[dict[str, object]]:
- if request.ordinal == 1:
- return response_events(
- {
- "type": "function_call",
- "id": "fc_smolify_secret",
- "call_id": "call_smolify_secret",
- "name": "mcp__smolify__search_docs",
- "arguments": json.dumps(
- {"project": "public-fixture", "query": "github_token=ghp_never_egress"}
- ),
- "status": "completed",
- },
- "resp_smolify_secret",
- )
- return response_events(
- {
- "type": "message",
- "id": "msg_smolify_done",
- "status": "completed",
- "role": "assistant",
- "content": [
- {"type": "output_text", "text": FINAL_REPLY, "annotations": []}
- ],
- },
- "resp_smolify_done",
- )
-
-
-def last_answer(stdout: str) -> str:
- """Headless `-p` prints ADR 0020 pulse chrome on stdout from model call 2.
- The boundary check wants the final assistant line, not that meter."""
- lines = [ln.strip() for ln in stdout.splitlines() if ln.strip()]
- lines = [ln for ln in lines if not ln.startswith("· turn still going")]
- return lines[-1] if lines else ""
-
-
-def run(graff: Path) -> None:
- mock = CodexMock(events_for_request=events)
- port = mock.start()
- try:
- with tempfile.TemporaryDirectory(prefix="graff-smolify-boundary-") as temp:
- workspace = Path(temp)
- codex_home = workspace / "codex-home"
- codex_home.mkdir()
- (codex_home / "auth.json").write_text(
- json.dumps(
- {
- "tokens": {
- "access_token": "smolify-boundary-mock",
- "account_id": "acct-smolify-boundary",
- }
- }
- ),
- encoding="utf-8",
- )
- settings = workspace / ".harness" / "settings.json"
- settings.parent.mkdir()
- settings.write_text(
- json.dumps(
- {
- "ai_title": False,
- "skills": {"codedbpro": False, "muonry": False},
- }
- ),
- encoding="utf-8",
- )
- env = {
- key: value
- for key, value in os.environ.items()
- if not (key.startswith("GRAFF_") or key.startswith("CODEX_"))
- }
- env.update(
- {
- "HOME": str(workspace),
- "CODEX_HOME": str(codex_home),
- "GRAFF_CODEX_URL": (
- f"http://127.0.0.1:{port}/backend-api/codex/responses"
- ),
- "GRAFF_CODEX_WS": "off",
- "GRAFF_FLEET": "off",
- "GRAFF_NO_TELEMETRY": "1",
- }
- )
- completed = subprocess.run(
- [
- str(graff),
- "--model",
- "codex",
- "--yolo",
- "--no-telemetry",
- # --no-lean so this test sees the full MCP advertisement
- # surface (secret-egress boundary), not the lean fold.
- "--no-lean",
- "-p",
- "try the hosted docs query, then report",
- ],
- cwd=workspace,
- env=env,
- text=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- timeout=20,
- check=False,
- )
- if completed.returncode != 0 or last_answer(completed.stdout) != FINAL_REPLY:
- raise AssertionError(
- f"graff exit={completed.returncode}\n"
- f"stdout:\n{completed.stdout}\nstderr:\n{completed.stderr}"
- )
-
- requests = mock.recorded_requests()
- if len(requests) != 2:
- raise AssertionError(f"expected a two-request tool loop: {requests!r}")
- # Deferred-catalog era: smolify tools no longer occupy the wire
- # tools array (zero-stub deferral, a14bdf2) — the public-only
- # advertisement boundary now lives in load_tool_schemas's
- # description, which lists exactly the deferred tool names.
- lts_desc = next(
- (
- tool.get("description", "")
- for tool in requests[0].body.get("tools", [])
- if isinstance(tool, dict) and tool.get("name") == "load_tool_schemas"
- ),
- "",
- )
- advertised = set()
- for group in re.findall(r"smolify \(([^)]*)\)", lts_desc):
- advertised.update(f"mcp__smolify__{name.strip()}" for name in group.split(","))
- if advertised != SAFE_TOOLS:
- raise AssertionError(f"unsafe or missing default Smolify tools: {advertised!r}")
- second_input = requests[1].body.get("input", [])
- outputs = [
- item.get("output", "")
- for item in second_input
- if isinstance(item, dict)
- and item.get("type") == "function_call_output"
- ]
- if len(outputs) != 1 or "blocked locally" not in outputs[0]:
- raise AssertionError(f"secret-bearing call did not fail closed: {outputs!r}")
- if "GitHub token" not in outputs[0]:
- raise AssertionError(f"block reason lost its local scan evidence: {outputs[0]!r}")
- finally:
- mock.stop()
-
-
-def main() -> int:
- parser = argparse.ArgumentParser()
- parser.add_argument("--graff", type=Path, default=Path("zig-out/bin/graff"))
- args = parser.parse_args()
- graff = args.graff.resolve()
- if not graff.is_file():
- parser.error(f"graff binary not found: {graff}")
- run(graff)
- print("Smolify lazy/public/secret boundary E2E passed")
- return 0
-
-
-if __name__ == "__main__":
- raise SystemExit(main())
diff --git a/src/adopt.zig b/src/adopt.zig
index c6d3bcd9..801eb782 100644
--- a/src/adopt.zig
+++ b/src/adopt.zig
@@ -11,7 +11,6 @@ const Allocator = std.mem.Allocator;
const mcp_config = @import("mcp_config.zig");
const skill_docs = @import("skill_docs.zig");
-const reserved = "smolify";
const file_cap: std.Io.Limit = .limited(2 << 20);
const max_copy_depth: u8 = 6;
/// Written after the first adopt so startup does not rescan Claude every launch.
@@ -151,7 +150,6 @@ fn harvest(arena: Allocator, dest: *std.json.ObjectMap, servers: ?Value) void {
const obj = if (servers) |v| (if (v == .object) v.object else return) else return;
var it = obj.iterator();
while (it.next()) |e| {
- if (std.mem.eql(u8, e.key_ptr.*, reserved)) continue;
if (dest.get(e.key_ptr.*) != null) continue;
const n = normalize(arena, e.value_ptr.*) orelse continue;
dest.put(arena, e.key_ptr.*, n) catch {};
@@ -400,14 +398,14 @@ test "adopt writes missing Claude MCP into graff folders and skips existing name
try Io.Dir.cwd().writeFile(io, .{ .sub_path = try std.fmt.allocPrint(arena, "{s}/.mcp.json", .{cwd}), .data = "{\"mcpServers\":{\"deepwiki\":{\"url\":\"https://keep.example/mcp\"}}}" });
const r = try run(io, arena, home, cwd);
- try testing.expectEqual(@as(usize, 2), r.added_user);
+ try testing.expectEqual(@as(usize, 3), r.added_user);
try testing.expectEqual(@as(usize, 1), r.added_project);
try testing.expectEqual(@as(usize, 0), r.skipped);
try testing.expectEqual(@as(usize, 1), r.skills);
const global = try Io.Dir.cwd().readFileAlloc(io, try std.fmt.allocPrint(arena, "{s}/.codegraff/mcp.json", .{home}), arena, file_cap);
try testing.expect(std.mem.indexOf(u8, global, "codedb") != null);
- try testing.expect(std.mem.indexOf(u8, global, "smolify") == null);
+ try testing.expect(std.mem.indexOf(u8, global, "smolify") != null);
const project = try Io.Dir.cwd().readFileAlloc(io, try std.fmt.allocPrint(arena, "{s}/.mcp.json", .{cwd}), arena, file_cap);
try testing.expect(std.mem.indexOf(u8, project, "relay") != null);
try testing.expect(std.mem.indexOf(u8, project, "keep.example") != null);
diff --git a/src/cli.zig b/src/cli.zig
index a82d5049..c97bff95 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -25,6 +25,7 @@ pub const changelog_text =
\\ • deleted composer screenshots are not sent: submit keeps [Image #N] / @[path] only (#634)
\\ • /image and /paste stay sticky; /image clear drops the whole queue
\\ • TUI backspace / Ctrl+U / overlay backspace detaches chips
+ \\ • Smolify is no longer a reserved core MCP; add it via `graff mcp add` if you want it
\\
\\0.0.277
\\ • MCP-inside-rlm + learnt slim: fat MCP results drop to id/title; comments fold to n+latest_author (ADR 0029)
diff --git a/src/mcp.zig b/src/mcp.zig
index 9cc364df..ae0a4895 100644
--- a/src/mcp.zig
+++ b/src/mcp.zig
@@ -26,7 +26,6 @@ const shutdown_trace = @import("shutdown_trace.zig"); // #364: teardown phase st
const mcp_rpc = @import("mcp_rpc.zig");
const mcp_cache = @import("mcp_cache.zig");
const util = @import("util.zig");
-const smolify_manifest = @import("smolify_manifest.zig");
const vision = @import("vision.zig"); // #249: MCP image results become staged vision blocks
const renderContent = @import("mcp_content.zig").renderContent;
@@ -46,7 +45,6 @@ pub const Tool = struct {
description: []const u8,
input_schema: Value, // arena-owned parsed JSON Schema
};
-pub const smolify_url = "https://app.smol.ly/mcp";
pub const Registry = struct {
gpa: Allocator,
@@ -127,7 +125,6 @@ pub const Registry = struct {
/// (no tool calls in flight).
pub fn addServer(reg: *Registry, name: []const u8, command: []const u8, args: []const []const u8) !usize {
for (reg.servers) |server| if (std.mem.eql(u8, server.name, name)) return error.McpServerAlreadyConnected;
- if (std.mem.eql(u8, name, "smolify")) return error.ReservedMcpServerName;
const a = reg.arena();
var servers: std.ArrayList(*Server) = .empty;
try servers.appendSlice(a, reg.servers);
@@ -151,7 +148,6 @@ pub const Registry = struct {
/// registry storage and sent on every request (for example Authorization).
pub fn addRemoteServer(reg: *Registry, name: []const u8, url: []const u8, headers: []const std.http.Header) !usize {
for (reg.servers) |server| if (std.mem.eql(u8, server.name, name)) return error.McpServerAlreadyConnected;
- if (std.mem.eql(u8, name, "smolify") and (!std.mem.eql(u8, url, smolify_url) or headers.len != 0)) return error.ReservedMcpServerName;
const a = reg.arena();
var servers: std.ArrayList(*Server) = .empty;
try servers.appendSlice(a, reg.servers);
@@ -173,39 +169,6 @@ pub const Registry = struct {
return tools.items.len - before;
}
- /// Advertise bundled Smolify schemas without dialing the hosted endpoint.
- /// The first approved tool call performs the MCP handshake. Default mode
- /// is anonymous and public-read-only; full access also loads OAuth state.
- pub fn connectSmolify(reg: *Registry, full_access: bool) !usize {
- for (reg.servers) |server| if (std.mem.eql(u8, server.name, "smolify")) return 0;
- const a = reg.arena();
- var servers: std.ArrayList(*Server) = .empty;
- try servers.appendSlice(a, reg.servers);
- var tools: std.ArrayList(Tool) = .empty;
- try tools.appendSlice(a, reg.tools);
- const server = try a.create(Server);
- server.* = .{
- .name = "smolify",
- .transport = .{ .http = .{
- .url = smolify_url,
- .client = .{ .allocator = reg.gpa, .io = reg.io },
- .oauth_home = if (full_access and reg.home.len != 0) try a.dupe(u8, reg.home) else null,
- } },
- .initialized = false,
- .protocol_version = "on-demand",
- };
- var registry_owns_server = false;
- errdefer if (!registry_owns_server) deinitServer(server, reg.io, .init(reg.io, mcp_teardown.teardown_grace)); // fresh window: not the exit path (#305)
- const added = try smolify_manifest.appendTools(Tool, a, &tools, servers.items.len, full_access);
- try servers.append(a, server);
- const new_servers = try a.dupe(*Server, servers.items);
- const new_tools = try a.dupe(Tool, tools.items);
- reg.servers = new_servers;
- reg.tools = new_tools;
- registry_owns_server = true;
- return added;
- }
-
/// Connect any configured server not already running — the in-session
/// equivalent of having started with `--yolo`, so a user who declined the
/// startup consent prompt can opt in later without a restart. Reads the
@@ -229,7 +192,6 @@ pub const Registry = struct {
var it = merged.servers.iterator();
while (it.next()) |entry| {
const name = entry.key_ptr.*;
- if (std.mem.eql(u8, name, "smolify")) continue;
if (entry.value_ptr.* != .object) continue;
// Already connected (auto-activated muonry, or a prior /mcp trust)? skip.
var present = false;
@@ -257,7 +219,6 @@ pub const Registry = struct {
var n: usize = 0;
var it = merged.servers.iterator();
while (it.next()) |entry| {
- if (std.mem.eql(u8, entry.key_ptr.*, "smolify")) continue;
if (entry.value_ptr.* != .object) continue;
var present = false;
for (reg.servers) |s| if (std.mem.eql(u8, s.name, entry.key_ptr.*)) {
diff --git a/src/mcp_boot.zig b/src/mcp_boot.zig
index 02c9b67b..90f51ff7 100644
--- a/src/mcp_boot.zig
+++ b/src/mcp_boot.zig
@@ -96,13 +96,10 @@ pub fn init(gpa: Allocator, io: Io, config_path: []const u8, global_path: ?[]con
// Collect the entries first, in config order: the fan-out consumes them
// concurrently, and a hash-map iterator is not a thing tasks can share.
- // The core Smolify name is pinned and cannot be shadowed by repository or
- // user configuration.
const Entry = struct { name: []const u8, cfg: std.json.ObjectMap };
var entries: std.ArrayList(Entry) = .empty;
var it = merged.servers.iterator();
while (it.next()) |entry| {
- if (std.mem.eql(u8, entry.key_ptr.*, "smolify")) continue;
if (@import("tool_surface.zig").skipOptionalServer(entry.key_ptr.*, environ_map)) continue;
if (entry.value_ptr.* != .object) continue;
try entries.append(a, .{ .name = try a.dupe(u8, entry.key_ptr.*), .cfg = entry.value_ptr.*.object });
diff --git a/src/mcp_cli.zig b/src/mcp_cli.zig
index 5014d80a..b20b24a1 100644
--- a/src/mcp_cli.zig
+++ b/src/mcp_cli.zig
@@ -49,9 +49,6 @@ pub fn countMcpServers(merged: mcp_config.Merged) usize {
var n: usize = 0;
var it = merged.servers.iterator();
while (it.next()) |entry| {
- // `smolify` is a reserved core server; configured entries cannot shadow
- // its pinned endpoint and therefore need no consent.
- if (std.mem.eql(u8, entry.key_ptr.*, "smolify")) continue;
if (!trustedMcpEntry(entry.key_ptr.*, entry.value_ptr.*)) n += 1;
}
return n;
@@ -154,7 +151,6 @@ fn mcpCliUsage(w: *Io.Writer) !void {
\\examples:
\\ graff mcp add mobbin --url https://api.mobbin.com/mcp
\\ graff mcp login mobbin
- \\ graff mcp login smolify
\\ graff mcp add context7 -- npx -y @upstash/context7-mcp
\\ graff mcp add playwright -- npx -y @playwright/mcp
\\ graff mcp add sentry --env SENTRY_AUTH_TOKEN=... -- npx -y @sentry/mcp-server
@@ -219,25 +215,20 @@ pub fn mcpCommand(io: Io, gpa: Allocator, arena: Allocator, home: []const u8, en
return;
}
const name = args[1];
- const url = if (std.mem.eql(u8, name, "smolify"))
- mcp.smolify_url
- else url: {
- // Global servers are loginable too — the merged set is the same one
- // the session connects from.
- const merged = mcp_config.load(io, arena, Io.Dir.cwd(), mcp_config_path, global_path, home);
- // Say which file is broken before claiming the server is missing:
- // "not configured" for a server that IS configured, in a file that
- // does not parse, sends the user looking in the wrong place.
- try mcp_config.reportInvalid(merged, &out.interface, mcp_config_path, global_path, "", "");
- try out.interface.flush();
- if (!merged.found) std.process.fatal("mcp login: no MCP config; add the remote server first", .{});
- const entry = merged.servers.get(name) orelse std.process.fatal("mcp login: server '{s}' is not configured", .{name});
- if (entry != .object) std.process.fatal("mcp login: server '{s}' has invalid config", .{name});
- const remote = entry.object.get("url") orelse std.process.fatal("mcp login: server '{s}' is not a remote URL server", .{name});
- if (remote != .string or !mcp.validRemoteUrl(remote.string)) std.process.fatal("mcp login: server '{s}' has an invalid URL", .{name});
- break :url remote.string;
- };
- try mcp_oauth.login(io, gpa, arena, home, name, url);
+ // Global servers are loginable too — the merged set is the same one
+ // the session connects from.
+ const merged = mcp_config.load(io, arena, Io.Dir.cwd(), mcp_config_path, global_path, home);
+ // Say which file is broken before claiming the server is missing:
+ // "not configured" for a server that IS configured, in a file that
+ // does not parse, sends the user looking in the wrong place.
+ try mcp_config.reportInvalid(merged, &out.interface, mcp_config_path, global_path, "", "");
+ try out.interface.flush();
+ if (!merged.found) std.process.fatal("mcp login: no MCP config; add the remote server first", .{});
+ const entry = merged.servers.get(name) orelse std.process.fatal("mcp login: server '{s}' is not configured", .{name});
+ if (entry != .object) std.process.fatal("mcp login: server '{s}' has invalid config", .{name});
+ const remote = entry.object.get("url") orelse std.process.fatal("mcp login: server '{s}' is not a remote URL server", .{name});
+ if (remote != .string or !mcp.validRemoteUrl(remote.string)) std.process.fatal("mcp login: server '{s}' has an invalid URL", .{name});
+ try mcp_oauth.login(io, gpa, arena, home, name, remote.string);
return;
}
@@ -253,7 +244,6 @@ pub fn mcpCommand(io: Io, gpa: Allocator, arena: Allocator, home: []const u8, en
}
const name = args[1];
- if (std.mem.eql(u8, name, "smolify")) std.process.fatal("mcp add: 'smolify' is a reserved core server", .{});
if (std.mem.eql(u8, args[2], "--url") or std.mem.startsWith(u8, args[2], "--url=")) {
const url = if (std.mem.eql(u8, args[2], "--url")) blk: {
if (args.len < 4) std.process.fatal("mcp add: --url needs an HTTP(S) URL", .{});
diff --git a/src/mcp_protocol.zig b/src/mcp_protocol.zig
index 6cb35d30..152ad88a 100644
--- a/src/mcp_protocol.zig
+++ b/src/mcp_protocol.zig
@@ -80,7 +80,7 @@ pub const modern_meta =
/// LOAD-BEARING: when `modern` is false, this must produce exactly the bytes
/// graff wrote before the 2026-07-28 migration — no `_meta`, nothing added.
/// That byte-identity is the whole backward-compatibility guarantee for
-/// every server graff talks to today (codedbpro, smolify, every stdio
+/// every server graff talks to today (codedbpro, every stdio
/// server in a workspace `.mcp.json`). See the "legacy byte-identity" test.
pub fn buildRequest(a: Allocator, id: i64, method: []const u8, params: []const u8, modern: bool) ![]u8 {
if (params.len < 2 or params[0] != '{' or params[params.len - 1] != '}') return error.BadMcpParams;
diff --git a/src/mcp_teardown.zig b/src/mcp_teardown.zig
index 2e264461..25204964 100644
--- a/src/mcp_teardown.zig
+++ b/src/mcp_teardown.zig
@@ -204,8 +204,8 @@ test "runBounded flags an abandon so the exit path can skip Io teardown (#325)"
}
test "deinitHttpClient tears down a pooled client within the grace window" {
- // Mirrors the smolify on-demand transport: an HTTP client that was
- // connected (handshake done or not) must not hold session exit.
+ // Mirrors an on-demand HTTP transport: a client that was connected
+ // (handshake done or not) must not hold session exit.
var registry_client: std.http.Client = .{ .allocator = std.testing.allocator, .io = std.testing.io };
deinitHttpClient(&registry_client, std.testing.io, .init(std.testing.io, teardown_grace));
}
diff --git a/src/plugin_layout.zig b/src/plugin_layout.zig
index f383347c..f96a801f 100644
--- a/src/plugin_layout.zig
+++ b/src/plugin_layout.zig
@@ -14,7 +14,6 @@ const Value = std.json.Value;
const Allocator = std.mem.Allocator;
const file_cap: std.Io.Limit = .limited(1 << 20);
-const reserved = "smolify";
/// Codex's order: `.codex-plugin` first, then Claude, then Cursor.
const manifest_files = [_][]const u8{
@@ -115,7 +114,6 @@ fn putServers(arena: Allocator, servers: *std.json.ObjectMap, found: *bool, v: ?
const obj = if (v) |x| (if (x == .object) x.object else return) else return;
var it = obj.iterator();
while (it.next()) |e| {
- if (std.mem.eql(u8, e.key_ptr.*, reserved)) continue;
if (servers.get(e.key_ptr.*) != null) continue;
if (e.value_ptr.* != .object) continue;
servers.put(arena, e.key_ptr.*, e.value_ptr.*) catch continue;
diff --git a/src/plugins.zig b/src/plugins.zig
index 474eeb71..4f5a7797 100644
--- a/src/plugins.zig
+++ b/src/plugins.zig
@@ -15,7 +15,6 @@ const plugin_cap = 32;
const walk_depth: u8 = 2;
const visit_cap = 256;
const file_cap: std.Io.Limit = .limited(1 << 20);
-const reserved = "smolify";
pub const Plugin = struct {
name: []const u8,
@@ -229,7 +228,6 @@ fn putServers(arena: Allocator, servers: *std.json.ObjectMap, found: *bool, v: ?
const obj = if (v) |x| (if (x == .object) x.object else return) else return;
var it = obj.iterator();
while (it.next()) |e| {
- if (std.mem.eql(u8, e.key_ptr.*, reserved)) continue;
if (servers.get(e.key_ptr.*) != null) continue;
if (e.value_ptr.* != .object) continue;
servers.put(arena, e.key_ptr.*, e.value_ptr.*) catch continue;
diff --git a/src/session_connect_tests.zig b/src/session_connect_tests.zig
index c84d812d..f2642cc4 100644
--- a/src/session_connect_tests.zig
+++ b/src/session_connect_tests.zig
@@ -1,4 +1,4 @@
-//! Companion-connect opt-in: Smolify is not added unless GRAFF_SMOLIFY is set.
+//! Companion-connect: codedb-pro/muonry only. Smolify is not a bundled server.
const std = @import("std");
const Io = std.Io;
@@ -8,7 +8,7 @@ const mcp = @import("mcp.zig");
const session_start = @import("session_start.zig");
const tool_surface = @import("tool_surface.zig");
-test "connectCompanion does not add Smolify tools unless the opt-in env is present" {
+test "connectCompanion never injects a bundled Smolify server" {
var arena_state = std.heap.ArenaAllocator.init(std.testing.allocator);
defer arena_state.deinit();
const arena = arena_state.allocator();
@@ -25,15 +25,14 @@ test "connectCompanion does not add Smolify tools unless the opt-in env is prese
try std.testing.expectEqual(@as(usize, 0), registry.tools.len);
try std.testing.expectEqual(@as(usize, 0), registry.servers.len);
+ // Former opt-in env vars are ignored: there is no reserved core server.
try env.put("GRAFF_SMOLIFY", "1");
+ try env.put("GRAFF_SMOLIFY_ACCESS", "full");
var with_opt = mcp.Registry.empty(std.testing.allocator, std.testing.io);
defer with_opt.deinit();
try session_start.connectCompanion(std.testing.io, arena, &with_opt, flags, &aw.writer, true, env);
- try std.testing.expect(with_opt.tools.len > 0);
- try std.testing.expectEqualStrings("smolify", with_opt.servers[0].name);
- for (with_opt.tools) |t| {
- try std.testing.expect(std.mem.startsWith(u8, t.qualified_name, "mcp__smolify__"));
- }
+ try std.testing.expectEqual(@as(usize, 0), with_opt.tools.len);
+ try std.testing.expectEqual(@as(usize, 0), with_opt.servers.len);
}
test "skipOptionalServer keeps deepwiki/mobbin out of the default catalog" {
diff --git a/src/session_start.zig b/src/session_start.zig
index ece1fdc4..b4354a3d 100644
--- a/src/session_start.zig
+++ b/src/session_start.zig
@@ -526,17 +526,6 @@ pub fn connectCompanion(io: Io, arena: Allocator, registry: *mcp.Registry, flags
}
}
}
-
- // Smolify is opt-in: GRAFF_SMOLIFY=1 or GRAFF_SMOLIFY_ACCESS=public|full.
- if (!@import("tool_surface.zig").smolifyWanted(environ_map)) return;
- const access = environ_map.get("GRAFF_SMOLIFY_ACCESS") orelse "public";
- const full_access = std.ascii.eqlIgnoreCase(access, "full") or std.ascii.eqlIgnoreCase(access, "authenticated");
- const added = registry.connectSmolify(full_access) catch |err| {
- if (speak) sink.emit(io, dimNotice(try std.fmt.allocPrint(arena, "[mcp:smolify] auto-connect failed ({t}) — continuing offline", .{err})));
- return;
- };
- if (added > 0 and speak)
- sink.emit(io, dimNotice(try std.fmt.allocPrint(arena, "[mcp:smolify] available on demand — {d} {s} tool(s)", .{ added, if (full_access) "full-access" else "anonymous public-read" })));
}
/// The startup cluster's most common line: dim, no badge. A helper rather than
@@ -556,22 +545,6 @@ test "lean mode: flag or GRAFF_LEAN env, never the default" {
try std.testing.expect(leanMode(true, env));
}
-test "core Smolify registration is offline and lazy" {
- var registry = mcp.Registry.empty(std.testing.allocator, std.testing.io);
- defer registry.deinit();
- try std.testing.expectEqual(@as(usize, 8), try registry.connectSmolify(false));
- try std.testing.expectEqual(@as(usize, 1), registry.servers.len);
- try std.testing.expectEqualStrings("on-demand", registry.servers[0].protocol_version);
- try std.testing.expectEqual(@as(usize, 8), registry.tools.len);
- try std.testing.expect(registry.servers[0].transport.http.oauth_home == null);
- try std.testing.expectEqual(@as(usize, 0), try registry.connectSmolify(false));
-
- var full = mcp.Registry.emptyWithOAuthHome(std.testing.allocator, std.testing.io, "/not-read-during-registration");
- defer full.deinit();
- try std.testing.expectEqual(@as(usize, 13), try full.connectSmolify(true));
- try std.testing.expectEqualStrings("/not-read-during-registration", full.servers[0].transport.http.oauth_home.?);
-}
-
test "a licensed companion is pinned eager, once, so no discovery round-trip is needed" {
const saved = mcp_schema_gate.g_policy;
defer mcp_schema_gate.g_policy = saved;
diff --git a/src/skills.zig b/src/skills.zig
index fd8bf2f3..627027e0 100644
--- a/src/skills.zig
+++ b/src/skills.zig
@@ -18,7 +18,6 @@ const Io = std.Io;
const Value = std.json.Value;
const Allocator = std.mem.Allocator;
const mcp = @import("mcp.zig");
-const smolify_manifest = @import("smolify_manifest.zig");
const main_mod = @import("main.zig");
// Only the settings-file location, never the approval session (#422 ratchet).
@@ -79,10 +78,6 @@ pub const mcp_notes = [_]McpNote{
.server = "muonry",
.note = "The muonry MCP server is connected (mcp__muonry__* tools). SEARCH ORDER: the native codedb tool is free and indexed — always try it first (context/around/callpath/list_dir/status); use mcp__muonry__search or faster_search only when codedb can't answer (raw literal/regex content matches, non-code or non-indexed files) — muonry is metered. Prefer mcp__muonry__read (mode=outline first, then symbol) over read_file for navigating large code files, and mcp__muonry__batch to run several independent reads/searches/edits in one round-trip. Keep edits on the native edit_file/write_file tools (/rewind-tracked; the cwd and explicit-external-target rules above apply). These tools are accelerators, not requirements: if an mcp__muonry__ call fails, fall back to read_file/codedb/bash and continue.",
},
- .{
- .server = "smolify",
- .note = "The core Smolify MCP is available on demand (mcp__smolify__* tools). Its default catalog is anonymous and public-read-only; the network handshake waits for an approved call. Use it to discover/search public API documentation for unfamiliar libraries, while preferring local code and docs when they answer the question.",
- },
};
/// The metered code-intelligence companion. It first shipped as `muonry` and
@@ -127,7 +122,6 @@ pub fn companionTrusted(tool: []const u8) bool {
/// trust notwithstanding). Mirrors the server's readOnlyHint annotations;
/// batch is read-only iff every op inside it is.
pub fn companionReadOnly(tool: []const u8, input: Value) bool {
- if (smolify_manifest.isPublicReadQualified(tool)) return true;
const t = companionToolName(tool) orelse return false;
if (companionToolReadOnly(t)) return true;
if (!std.mem.eql(u8, t, "batch")) return false;
@@ -308,8 +302,7 @@ test "companionReadOnly: the plan-mode classifier mirrors readOnlyHint" {
try std.testing.expect(!companionReadOnly("mcp__codedbpro__memo", none));
try std.testing.expect(!companionReadOnly("mcp__other__read", none)); // only the trusted server
try std.testing.expect(!companionReadOnly("read_file", none));
- try std.testing.expect(companionReadOnly("mcp__smolify__search_docs", none));
- try std.testing.expect(!companionReadOnly("mcp__smolify__publish_docs", none));
+ try std.testing.expect(!companionReadOnly("mcp__smolify__search_docs", none));
// batch: read-only iff every op is
try std.testing.expect(companionReadOnly("mcp__codedbpro__batch", parse(a,
\\{"ops":[{"tool":"read","args":{}},{"tool":"search","args":{}}]}
diff --git a/src/smolify_manifest.zig b/src/smolify_manifest.zig
index 11b46180..39d6f109 100644
--- a/src/smolify_manifest.zig
+++ b/src/smolify_manifest.zig
@@ -1,6 +1,6 @@
-//! Bundled Smolify tool metadata. Startup advertises these schemas without
-//! dialing the hosted MCP; the transport initializes only after an approved
-//! tool call. Refresh the generated JSON with update-smolify-manifest.py.
+//! Schema-gate fixture: a real 13-tool MCP manifest used by tool_schema_tests
+//! to measure #416 cost. Not a bundled server. Refresh with
+//! scripts/update-smolify-manifest.py.
const std = @import("std");
const mcp_protocol = @import("mcp_protocol.zig");
@@ -34,7 +34,7 @@ pub fn isPublicReadQualified(name: []const u8) bool {
return std.mem.startsWith(u8, name, prefix) and isPublicReadName(name[prefix.len..]);
}
-/// Append bundled Smolify tools to an MCP-compatible Tool list. Keeping this
+/// Append fixture tools to an MCP-compatible Tool list. Keeping this
/// generic makes this leaf module independent from mcp.zig's Registry type.
pub fn appendTools(
comptime Tool: type,
diff --git a/src/tool_schema_tests.zig b/src/tool_schema_tests.zig
index 436bc412..49846dd1 100644
--- a/src/tool_schema_tests.zig
+++ b/src/tool_schema_tests.zig
@@ -211,7 +211,7 @@ test "the discovery path itself flattens, so nothing reaches a provider unlowere
}
/// #416's catalog half, measured against a REAL MCP manifest rather than a
-/// made-up one: the bundled Smolify server (13 tools, ~9.5 KB of description +
+/// made-up one: the Smolify fixture (13 tools, ~9.5 KB of description +
/// schema — the same order as the companion server that provoked the issue at
/// +2,568 input tokens per call).
fn realServerTools(arena: Allocator) ![]const mcp.Tool {
diff --git a/src/tool_surface.zig b/src/tool_surface.zig
index 393ca5fc..06096a3e 100644
--- a/src/tool_surface.zig
+++ b/src/tool_surface.zig
@@ -36,8 +36,7 @@ pub fn isCompanionWrite(qualified: []const u8) bool {
return false;
}
-/// MCP names that must not appear in any catalog (companion writes + bundled
-/// smolify until opt-in connect actually adds it).
+/// MCP names that must not appear in any catalog (companion writes).
pub fn omitMcp(qualified: []const u8) bool {
return isCompanionWrite(qualified);
}
@@ -64,7 +63,7 @@ pub fn filterSpecs(comptime Spec: type, arena: Allocator, specs: []const Spec) !
return buf[0..i];
}
-/// Worker MCP: companion read/search only (no writes, no smolify).
+/// Worker MCP: companion read/search only (no writes).
pub fn keepWorkerMcp(qualified: []const u8) bool {
if (omitMcp(qualified)) return false;
return std.mem.startsWith(u8, qualified, "mcp__codedbpro__") or
@@ -96,11 +95,6 @@ pub fn gate(ctx: tools.ToolCtx, call: tools.ToolCall) ?tools.ToolOutput {
return .{ .text = text, .is_error = true };
}
-pub fn smolifyWanted(environ_map: anytype) bool {
- if (environ_map.get("GRAFF_NO_SMOLIFY") != null) return false;
- return environ_map.get("GRAFF_SMOLIFY") != null or environ_map.get("GRAFF_SMOLIFY_ACCESS") != null;
-}
-
/// deepwiki / mobbin stay out of the default unauthenticated catalog unless
/// an explicit opt-in env names them.
pub fn skipOptionalServer(name: []const u8, environ_map: anytype) bool {
@@ -222,15 +216,12 @@ test "licensed root catalog drops read_file and codedb, keeps subagent and edit_
try std.testing.expect(saw_sub2);
}
-test "smolifyWanted and skipOptionalServer are opt-in" {
+test "skipOptionalServer keeps deepwiki/mobbin opt-in" {
var env = std.process.Environ.Map.init(std.testing.allocator);
defer env.deinit();
- try std.testing.expect(!smolifyWanted(env));
try std.testing.expect(skipOptionalServer("deepwiki", env));
try std.testing.expect(skipOptionalServer("mobbin", env));
try std.testing.expect(!skipOptionalServer("codedbpro", env));
- try env.put("GRAFF_SMOLIFY", "1");
- try std.testing.expect(smolifyWanted(env));
try env.put("GRAFF_MCP_OPTIONAL", "deepwiki,mobbin");
try std.testing.expect(!skipOptionalServer("deepwiki", env));
try std.testing.expect(!skipOptionalServer("mobbin", env));