Skip to content

deps: upgrade fastmcp optional extra to 3.x#135

Merged
mplatzer merged 1 commit into
mainfrom
deps/fastmcp-3
Apr 30, 2026
Merged

deps: upgrade fastmcp optional extra to 3.x#135
mplatzer merged 1 commit into
mainfrom
deps/fastmcp-3

Conversation

@mplatzer

Copy link
Copy Markdown
Contributor

Summary

  • Bump the optional mcp extra from FastMCP 2.x to fastmcp>=3,<4 and regenerate uv.lock (resolves to 3.2.4).
  • Existing mostlyai/mock/mcp_server.py usage (FastMCP(name=...), @mcp.tool, mcp.run(transport="stdio"), Context.report_progress) matches the FastMCP 2 → 3 upgrade guide; no MCP server code changes required.

Additional fix

  • batch_size=None: sample() / _sample_common pass batch_size=None through to _create_table_rows_generator, which overrides the parameter default (20) and caused TypeError before batch sizing. Normalize None to 20 after choosing JSON vs CSV output so the documented default applies.

Verification

  • uv run pytest tests/
  • uv sync --extra mcp and import mostlyai.mock.mcp_server

Made with Cursor

Bump the `mcp` extra to fastmcp 3.x and regenerate uv.lock.

Normalize explicit batch_size=None in _create_table_rows_generator so the
documented default applies when sample()/async helpers pass None through.

Made-with: Cursor
@mplatzer mplatzer merged commit e36575c into main Apr 30, 2026
4 checks passed
@mplatzer mplatzer deleted the deps/fastmcp-3 branch April 30, 2026 07:58
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