Skip to content

Upgrade to fast-agent 0.10.46 and drop forked MCP dependencies - #47

Merged
chughtapan merged 5 commits into
mainfrom
update-fast-agent
Oct 20, 2026
Merged

chughtapan merged 5 commits into
mainfrom
update-fast-agent

Conversation

@chughtapan

@chughtapan chughtapan commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Moves wags onto stock fast-agent-mcp 0.10.46, which hard-pins mcp 2.3.0 and fastmcp 4.0.11, so wags can run current models (for example --model opus, which resolves to claude-opus-5-5, plus gpt-5.6 and gemini-3.5-flash). This removes the chughtapan forks of fast-agent, python-sdk, and fastmcp.

Breaking: RootsMiddleware removed

The forks existed mainly to allow non-file:// root URIs such as https://github.com/{owner}/{repo}. Upstream still requires file:// roots, and roots are deprecated in the 2026-07-28 spec (SEP-2577). RootsMiddleware, requires_root, their tests, docs, and the roots: config blocks are deleted.

Protocol changes (2026-07-28)

fast-agent now negotiates the 2026-07-28 protocol by default, in which servers cannot send requests to clients.

  • ElicitationMiddleware returns an InputRequiredResult (SEP-2322) and reads the answer from the client's retry. Handshake-era clients still use ctx.elicit(). A decline or cancel now raises ToolError, because fastmcp 4 hides other middleware exceptions behind -32603 Internal server error.
  • GroupsMiddleware sends tools/list_changed with ctx.send_notification, so the notification travels on the request stream. The previous session.send_tool_list_changed() was silently dropped for 2026-07-28 clients. This PR adds a test that fails on the old code.

Ports

  • create_proxy now uses fastmcp.server.create_proxy. The roots-notification proxy subclass is removed.
  • wags run is rewritten on the public FastAgent API, because run_async_agent no longer exists.
  • mcp 2 renames: input_schema, is_error, max_tokens, and ClientRequestContext. This fixes a silent getattr(result, "isError", False) in the MCP-Universe benchmark that would have treated every tool error as a success.
  • MessageSerializer.strip_server_prefix now calls fast-agent's get_resource_name. fast-agent names tools server__tool, but the old code split on the first -, so BFCL scored every call under its namespaced name (e.g. gorillafilesystem__cd) and failed every task.
  • The AppWorld benchmark server moves to the mcp 2 low-level Server(on_list_tools=..., on_call_tool=...) API, and tool errors now set is_error=True. The BFCL server moves from FastMCP to MCPServer.

Docs

Examples now use current model names (gpt-6.1-sol, claude-opus-5-5, claude-sonnet-5-5), and the documented default model is corrected to gpt-4o-mini. A note explains that pytest's -p flag collides with fast-agent's --prompt-file, so plugin flags go in PYTEST_ADDOPTS.

Dependencies

  • AppWorld: pinned to chughtapan/appworld@wags-dev, which is f31e671 plus a 2-line fix for pydantic 2.14. Without it, import appworld fails under fast-agent's pydantic==2.14.0 pin. Upstream fix: Forward pydantic>=2.14's origin argument in match_type patch StonyBrookNLP/appworld#235.
  • Eval overrides: uv overrides now set the eval packages' conflicting exact pins to fast-agent's versions: mcp, openai, anthropic, google-genai, pydantic, pyyaml, tiktoken, filelock, anyio, click, and google-auth.

Test plan

  • pre-commit (ruff, ruff-format) and mypy src/ tests/
  • pytest tests/unit/ (91 passed) and pytest tests/integration/ (33 passed)
  • Elicitation integration tests run on both the 2026-07-28 and handshake protocols
  • Fast-agent 0.10.46 to wags proxy over stdio using the passthrough model:
    • group gating, then enable_tools, then tool refresh
    • proxied tool call
    • elicitation InputRequiredResult round-trip
  • wags run interactive session connects and lists server tools
  • BFCL server: lists tools and runs calls over stdio
  • AppWorld server wiring checked over stdio with stubbed data loading
  • AppWorld from the fork: LFS bundles install, appworld install succeeds, and the benchmark collects 90 tasks
  • MCP-Universe imports load, and its benchmark plus BFCL's collect
  • Live BFCL run with gpt-6.1-sol: multi_turn_base_0 and _1 pass. _2 fails because the model's calls don't match the ground truth; tool names serialize correctly.
  • Live groups e2e run with gpt-6.1-sol. 1 of 6 passes; the others fail on the model's behavior within a single turn. With gpt-5, main fails all 6 the same way, so this is not a regression.
  • Live Claude Opus 5.5 run (no Anthropic key available)
  • Full AppWorld task run (the local data/ is missing base DBs)

🤖 Generated with Claude Code

chughtapan and others added 5 commits October 19, 2026 17:24
Run on stock fast-agent-mcp 0.10.46 (mcp 2.3.0, fastmcp 4.0.11) so wags
can use current models, replacing the chughtapan forks of fast-agent,
python-sdk, and fastmcp.

- Remove RootsMiddleware; upstream still restricts roots to file:// URIs
- Port the proxy to fastmcp.server.create_proxy
- Support the 2026-07-28 protocol in ElicitationMiddleware via
  InputRequiredResult, keeping server-initiated elicitation for
  handshake-era clients
- Send GroupsMiddleware's tools/list_changed on the request stream so
  2026-07-28 clients receive it
- Rewrite `wags run` on the FastAgent API
- Port the AppWorld and BFCL benchmark servers to mcp 2 and adopt the
  snake_case field names
- Pin AppWorld to chughtapan/appworld@wags-dev for pydantic 2.14
  compatibility (StonyBrookNLP/appworld#235)
- Defer eval packages' conflicting pins to fast-agent's versions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI installs the latest ruff, and ruff 0.17 enforces PLR0917 (too many
positional arguments) on the same API-mirroring handler and pytest
signatures that are already exempt from PLR0913.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fast-agent namespaces MCP tools as server__tool, but the helper split on
the first '-', so BFCL scored calls like gorillafilesystem__cd and
failed every task, and hyphenated server names were cut mid-name.
Use fast-agent's get_resource_name instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use current fast-agent model names in examples, correct the documented
default model, and note that pytest plugin flags must go through
PYTEST_ADDOPTS because fast-agent parses the pytest command line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ElicitationMiddleware had to override on_call_tool because the hook
could only return a context, not an InputRequiredToolResult. Widen the
hook's return type so a ToolResult short-circuits the call, and move
elicitation back onto it. Also drop an unused TypeVar and logger, and a
redundant NotificationOptions argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chughtapan
chughtapan merged commit ebbbb0f into main Oct 20, 2026
3 checks passed
@chughtapan
chughtapan deleted the update-fast-agent branch October 20, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant