Skip to main content
release?v=1.5

Release 1.5.0

We’ve introduced a complete MCP Server SDK, enabling you to build production-ready MCP servers with routing, advanced logging, inspector integration, and multiple transport protocols.

Major Changes

Complete MCP Server SDK

Build powerful MCP servers with a comprehensive SDK that rivals FastMCP while providing unique capabilities for production deployments. Key Components:

MCPServer - Production-Ready Server Class

Built on top of FastMCP with significant enhancements for production use:
Features:
  • Multiple transport protocols: stdio, streamable-http, SSE
  • Integrated development tools and inspector
  • Advanced logging with customizable formats
  • Production-ready with signal handling
  • FastMCP compatibility layer

MCPRouter - Modular Server Organization

Organize your MCP server into reusable modules, similar to FastAPI’s APIRouter:
Features:
  • Clean separation of concerns
  • Reusable modules across projects
  • Optional prefixing for namespacing
  • Conditional router enabling/disabling
  • Support for tools, resources, and prompts

Enhanced Context with Advanced Capabilities

Extended context object with powerful server-side features:
Context Features:
  • sample(): Client-side LLM sampling with model preferences
  • elicit(): Structured user input with Pydantic or dataclass schemas
  • send_tool_list_changed(): Dynamic tool registration notifications
  • send_resource_list_changed(): Resource update notifications
  • send_prompt_list_changed(): Prompt update notifications
  • get_http_request(): Access underlying HTTP request (streamable-http only)

Advanced Logging System

Production-grade logging with beautiful formatting and debugging tools: Features:
  • Customizable log formats with color-coded output
  • JSON-RPC request/response logging
  • Session ID tracking across requests
  • Request/response size monitoring
  • Configurable debug levels (0=production, 1=debug, 2=verbose)
  • Middleware-based architecture for extensibility
Debug Levels:

Built-in Development Tools

Inspector Integration:
  • Auto-populated inspector at /inspector
  • Real-time tool testing
  • Request/response inspection
  • Session management
Documentation UI:
  • Auto-generated docs at /docs
  • Interactive API explorer
  • Tool/resource/prompt documentation
OpenMCP Configuration:
  • Standard OpenMCP config at /openmcp.json
  • Easy integration with MCP clients
  • Auto-discovery support

Multiple Transport Protocols

Transport Comparison:
  • stdio: Best for local CLI tools and desktop apps
  • streamable-http: Recommended for web services and cloud deployments
  • sse: Legacy support (deprecated in favor of streamable-http)

FastMCP Migration Path

Seamless migration from FastMCP with compatibility exports:
See FastMCP compatibility guide for migration details.

Enhancements

Middleware Parameter Mutation

Middleware can now modify request parameters, with changes properly propagated:
Changes:
  • Middleware parameter modifications are now preserved
  • context.params can be mutated and changes propagate
  • Improved middleware documentation with examples
See PR #522 for details.

Enhanced Sampling & Elicitation

Server-side support for advanced MCP protocols: Sampling:
Elicitation:

Tool Enable/Disable Support

Dynamic tool management during runtime:

Code Quality

Type Checking with Ty

Introduced ty as the official type checker for better type safety:
Benefits:
  • Strict type checking for improved code quality
  • Pre-commit integration with prek
  • Configured to ignore certain patterns for flexibility

Pre-commit Hooks with Prek

Standardized pre-commit workflow with prek:
Hooks:
  • Type checking with ty
  • Code formatting with ruff
  • Import sorting
  • Trailing whitespace removal

Refactored Test Suite

Complete test reorganization for better maintainability: Structure:
Improvements:
  • Tests now use MCPServer instead of external servers
  • Removed dependency on FastMCP test servers
  • Better test isolation
  • Clearer test organization

Ruff Configuration

Moved Ruff configuration from separate file to pyproject.toml:
Benefits:
  • Single configuration file
  • Consistent with Python ecosystem standards
  • Easier project setup

Documentation

New Server Documentation

Comprehensive documentation for the new server SDK:

Updated Examples

New example servers showcasing features:
  • context_example.py - Context features demo
  • fastmcp_example.py - FastMCP compatibility
  • fastmcp2_example.py - Advanced FastMCP patterns
  • fmcp_use_server_example.py - Full-featured server

API Reference

Auto-generated API documentation for all new modules:
  • mcp_use.server.server - MCPServer class
  • mcp_use.server.router - MCPRouter class
  • mcp_use.server.context - Enhanced Context
  • mcp_use.server.logging - Logging components
  • mcp_use.server.runner - Server runner
  • mcp_use.server.types - Type definitions
  • mcp_use.server.utils - Utility functions

Breaking Changes

None - all changes are backward compatible. Existing client code continues to work without modifications.

Migration Guide

Starting a New Server

Migrating from FastMCP

Replace imports and enjoy enhanced features:

Organizing with Routers

Split large servers into modules:

Enabling Advanced Features

Dependencies

Updated Requirements

New Development Tools

Contributors

Thank you to all contributors who made this release possible:
Contributors
@pietrozullo@vkrasnoselskikh@renvins@tonxxd

Statistics

  • Total Commits: 30+ (Python-specific)
  • Files Changed: 106
  • Lines Added: 5,818+
  • Lines Removed: 4,402+
  • New Modules: 15+
  • New Examples: 4
  • New Documentation Pages: 10+

For full changelog and commit history, see the commit log.