Repository navigation
Upgrade to fast-agent 0.10.46 and drop forked MCP dependencies - #47
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toclaude-opus-5-5, plusgpt-5.6andgemini-3.5-flash). This removes thechughtapanforks of fast-agent, python-sdk, and fastmcp.Breaking:
RootsMiddlewareremovedThe forks existed mainly to allow non-
file://root URIs such ashttps://github.com/{owner}/{repo}. Upstream still requiresfile://roots, and roots are deprecated in the 2026-07-28 spec (SEP-2577).RootsMiddleware,requires_root, their tests, docs, and theroots: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.
ElicitationMiddlewarereturns anInputRequiredResult(SEP-2322) and reads the answer from the client's retry. Handshake-era clients still usectx.elicit(). A decline or cancel now raisesToolError, because fastmcp 4 hides other middleware exceptions behind-32603 Internal server error.GroupsMiddlewaresendstools/list_changedwithctx.send_notification, so the notification travels on the request stream. The previoussession.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_proxynow usesfastmcp.server.create_proxy. The roots-notification proxy subclass is removed.wags runis rewritten on the publicFastAgentAPI, becauserun_async_agentno longer exists.input_schema,is_error,max_tokens, andClientRequestContext. This fixes a silentgetattr(result, "isError", False)in the MCP-Universe benchmark that would have treated every tool error as a success.MessageSerializer.strip_server_prefixnow calls fast-agent'sget_resource_name. fast-agent names toolsserver__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.Server(on_list_tools=..., on_call_tool=...)API, and tool errors now setis_error=True. The BFCL server moves fromFastMCPtoMCPServer.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 togpt-4o-mini. A note explains that pytest's-pflag collides with fast-agent's--prompt-file, so plugin flags go inPYTEST_ADDOPTS.Dependencies
chughtapan/appworld@wags-dev, which isf31e671plus a 2-line fix for pydantic 2.14. Without it,import appworldfails under fast-agent'spydantic==2.14.0pin. Upstream fix: Forward pydantic>=2.14's origin argument in match_type patch StonyBrookNLP/appworld#235.mcp,openai,anthropic,google-genai,pydantic,pyyaml,tiktoken,filelock,anyio,click, andgoogle-auth.Test plan
pre-commit(ruff, ruff-format) andmypy src/ tests/pytest tests/unit/(91 passed) andpytest tests/integration/(33 passed)passthroughmodel:enable_tools, then tool refreshInputRequiredResultround-tripwags runinteractive session connects and lists server toolsappworld installsucceeds, and the benchmark collects 90 tasksgpt-6.1-sol:multi_turn_base_0and_1pass._2fails because the model's calls don't match the ground truth; tool names serialize correctly.gpt-6.1-sol. 1 of 6 passes; the others fail on the model's behavior within a single turn. Withgpt-5,mainfails all 6 the same way, so this is not a regression.data/is missing base DBs)🤖 Generated with Claude Code