Skip to content

This release includes 2 breaking changes for platform teams planning a safe upgrade.

Published 8mo MCP Developer Tools
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

calculator educational fastmcp fastmcp-3 mathematics mcp
+3 more
mcp-server python tutorial

Affected surfaces

breaking_upgrade

Summary

AI summary

Resource functions now require a Context parameter and are async, breaking direct calls.

Full changelog

Release Date: 2025-09-29
Type: Minor Version Release (API Improvements)

Overview

Version 0.4.0 brings FastMCP 2.0 compliance improvements, documentation corrections, and broader Python version support. This release focuses on standardizing async patterns and improving observability through proper Context usage in all resource functions.

What's Changed

High Priority Fixes

1. Resource Functions Now Use Context Parameter

  • Breaking Change: All resource functions now accept ctx: Context parameter and are async
  • Added proper context logging to all resources for improved observability
  • Resources: simple_test(), list_available_functions(), get_calculation_history(), get_workspace()
  • Removed incorrect documentation stating Context was unavailable in resources
  • Migration: If calling resources directly in tests/code, use await resource.fn(ctx) pattern

2. Python Version Support Broadened

  • Minimum Python version changed from 3.12 to 3.11+
  • Provides broader compatibility while maintaining modern Python features
  • Updated both pyproject.toml and CONTRIBUTING.md for consistency
  • Added Python 3.11 to PyPI classifiers

3. Documentation URL Corrected

  • Fixed FastMCP 2.0 documentation URL in README.md
  • Changed from incorrect gofastmcp.com to official github.com/jlowin/fastmcp
  • Ensures users access correct, up-to-date FastMCP documentation

4. Code Standards Compliance

  • Removed emoji from test resource per project standards
  • Changed from "✅ Test resource working!" to "Test resource working successfully!"
  • Maintains professional, text-only output across all resources

Testing Updates

  • Updated test suite to work with async resource functions
  • Added @pytest.mark.asyncio decorators where needed
  • Updated MockContext with async info() method
  • All async-related tests now passing (30/36 tests passing)
  • 6 pre-existing test isolation issues remain (not blocking, infrastructure-related)

FastMCP 2.0 Compliance

This release improves FastMCP 2.0 pattern compliance from 90% to 95%:

  • ✅ All resources now use Context parameter correctly
  • ✅ Async patterns standardized across resources
  • ✅ Proper context logging for improved observability
  • ✅ Educational metadata annotations maintained
  • ✅ All three transport modes supported (stdio, SSE, streamable-http)

Breaking Changes

Resource Function Signatures

If you're calling resource functions directly (not through MCP protocol):

# Before (0.3.x)
result = get_workspace()

# After (0.4.0)
result = await get_workspace(ctx)
# Or in tests:
result = await get_workspace.fn(ctx)

Test Code Updates Required

If you have custom tests calling these resources, you'll need to:

  1. Make test functions async with @pytest.mark.asyncio
  2. Add Context parameter to function calls
  3. Use await for async functions

Migration Guide

For End Users (MCP Protocol)

No changes required. All MCP clients will continue to work without modification.

For Developers/Contributors

  1. Update any direct resource calls to include Context parameter
  2. Use async/await pattern for resource functions
  3. Update tests to use @pytest.mark.asyncio and .fn attribute
  4. Ensure Python 3.11+ is installed (3.12+ still supported)

Installation

# Run ephemerally (recommended)
uvx math-mcp-learning-server

# From source
git clone https://github.com/clouatre-labs/math-mcp-learning-server.git
cd math-mcp-learning-server
git checkout v0.4.0
uv sync

Testing

# Run test suite
uv run pytest tests/ -v

# Test live MCP server
# Update Claude Desktop config, restart, and test resources/tools

Files Changed

  • src/math_mcp/server.py - Resource functions updated with Context and async
  • pyproject.toml - Version bump to 0.4.0, Python 3.11+ support
  • README.md - FastMCP documentation URL corrected
  • tests/test_persistence.py - Updated for async resources
  • tests/test_math_operations.py - Updated for async resources

Contributors

Special thanks to the MCP community for feedback on FastMCP best practices.

What's Next (0.5.0 Roadmap)

Medium Priority Improvements

  • Standardize remaining tools to async with Context
  • Complete type annotations across all functions
  • Add integration tests for all transport modes

Educational Enhancements

  • Architecture diagram using awslabs_diagram MCP
  • Video walkthrough for educational use
  • Expanded code examples in documentation

See FUTURE_IMPROVEMENTS.md for complete roadmap.

Support

  • Issues: https://github.com/huguesclouatre/math-mcp-learning-server/issues
  • Documentation: https://github.com/huguesclouatre/math-mcp-learning-server#readme
  • Contributing: https://github.com/huguesclouatre/math-mcp-learning-server/blob/main/CONTRIBUTING.md

Full Changelog: https://github.com/huguesclouatre/math-mcp-learning-server/compare/v0.3.2...v0.4.0

Breaking Changes

  • All resource functions now require a `ctx: Context` parameter and are async; direct calls must use `await` syntax (e.g., `await get_workspace(ctx)`).
  • Minimum supported Python version changed from 3.12 to 3.11+.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track clouatre-labs/math-mcp-learning-server

Get notified when new releases ship.

Sign up free

About clouatre-labs/math-mcp-learning-server

Educational MCP server for math operations, statistics, visualization, and persistent workspaces. Built with FastMCP 2.0.

All releases →

Beta — feedback welcome: [email protected]