Skip to content

feat(mcp): migrate FlowServer to standalone fastmcp 3.x (#243)#246

Merged
dgenio merged 2 commits into
mainfrom
claude/github-issue-triage-GGNsn
Jun 3, 2026
Merged

feat(mcp): migrate FlowServer to standalone fastmcp 3.x (#243)#246
dgenio merged 2 commits into
mainfrom
claude/github-issue-triage-GGNsn

Conversation

@dgenio
Copy link
Copy Markdown
Owner

@dgenio dgenio commented Jun 3, 2026

Migrate chainweaver.mcp.FlowServer from the SDK-bundled
mcp.server.fastmcp.FastMCP to the standalone fastmcp package. The [mcp]
extra now installs fastmcp>=3.4 alongside mcp>=1.0 — the inbound
MCPToolAdapter still imports mcp.ClientSession and fastmcp re-uses
mcp.types.ToolAnnotations, so adapter.py is untouched.

FlowServer's public API is preserved (constructor, serve()/serve_async(),
.fastmcp, .registered_tool_names). Internals updated for the 3.x API:
tools are built via Tool.from_function(...) then add_tool(tool), and
serve()/serve_async() delegate to FastMCP.run/run_async(transport=...,
show_banner=False) so stdio framing stays clean. Refresh docs +
CHANGELOG and add a migration-guard test.

https://claude.ai/code/session_01WgHy1iQwVhRtNDU4DPLPFy

Migrate chainweaver.mcp.FlowServer from the SDK-bundled
mcp.server.fastmcp.FastMCP to the standalone fastmcp package. The [mcp]
extra now installs fastmcp>=3.4 alongside mcp>=1.0 — the inbound
MCPToolAdapter still imports mcp.ClientSession and fastmcp re-uses
mcp.types.ToolAnnotations, so adapter.py is untouched.

FlowServer's public API is preserved (constructor, serve()/serve_async(),
.fastmcp, .registered_tool_names). Internals updated for the 3.x API:
tools are built via Tool.from_function(...) then add_tool(tool), and
serve()/serve_async() delegate to FastMCP.run/run_async(transport=...,
show_banner=False) so stdio framing stays clean. Refresh docs +
CHANGELOG and add a migration-guard test.

https://claude.ai/code/session_01WgHy1iQwVhRtNDU4DPLPFy
Copilot AI review requested due to automatic review settings June 3, 2026 08:02
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'ChainWeaver microbenchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.25.

Benchmark suite Current: 96c836a Previous: d266f6f Ratio
compiled_overhead_ms_n10_llm200_tool10 0.6568399999196117 ms 0.3857400000697453 ms 1.70
compiled_overhead_ms_n5_llm500_tool50 0.3962240000419115 ms 0.3162339999107644 ms 1.25

This comment was automatically generated by workflow using github-action-benchmark.

CC: @dgenio

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates chainweaver.mcp.FlowServer from the MCP SDK-bundled mcp.server.fastmcp.FastMCP to the standalone fastmcp 3.x package while preserving FlowServer’s public API (__init__, serve()/serve_async(), .fastmcp, .registered_tool_names) and keeping stdio output clean for MCP framing.

Changes:

  • Switch FlowServer implementation to fastmcp.FastMCP and register tools via fastmcp.tools.Tool.from_function(...)+add_tool(...).
  • Update the [mcp] and [dev] extras to install fastmcp>=3.4 alongside mcp>=1.0.
  • Refresh docs + changelog and add a test that guards the migration to standalone fastmcp.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
chainweaver/mcp/server.py Migrates FlowServer to standalone fastmcp 3.x tool registration and run APIs (with banner suppressed for stdio framing).
pyproject.toml Adds fastmcp>=3.4 to the mcp and dev optional dependency sets.
tests/test_mcp_server.py Adds a migration-guard test asserting FlowServer is backed by fastmcp.FastMCP.
docs/mcp-server.md Updates outbound MCP server docs to reflect the move to standalone fastmcp while retaining mcp for inbound adapter needs.
docs/distribution.md Updates the verified integration matrix entry for the outbound MCP server to fastmcp 3.4.0 (+ mcp for inbound adapter).
CHANGELOG.md Documents the migration and the [mcp] extra behavior change.

@dgenio dgenio merged commit 838428d into main Jun 3, 2026
20 checks passed
@dgenio dgenio deleted the claude/github-issue-triage-GGNsn branch June 3, 2026 20:38
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.

3 participants