mcp_server_dart 1.1.0
mcp_server_dart: ^1.1.0 copied to clipboard
A developer-friendly MCP (Model Context Protocol) framework for Dart with annotations and code generation.
1.1.0 #
- ๐ Auto-registration: Automatic handler registration using reflection - no need to manually call
registerGeneratedHandlers() - ๐ง Enhanced code generation: Improved MCP generator with better parameter extraction and JSON schema generation
- ๐ Smarter annotations: Code generator now uses annotation names instead of method names for tool/resource/prompt registration
- ๐ฅ Health check: Added
pingmethod support for health monitoring - ๐ Protocol upgrade: Updated to MCP protocol version 2025-06-18
- ๐ฏ Better validation: Improved input schema generation from method parameters with proper type mapping
- ๐ Enhanced documentation: Generated code includes better descriptions from annotations
- ๐ ๏ธ New examples: Added advanced calculator example with comprehensive tool demonstrations
- ๐ Improved usability: Added
stdio()method as alias forstart()for better clarity - โ๏ธ Configuration updates: Updated MCP config with localhost to 127.0.0.1 for better compatibility
- ๐งน Code cleanup: Removed excessive comments from generated code for cleaner output
Breaking Changes #
- Protocol version updated from
2024-11-05to2025-06-18 - Generated handlers now use annotation names instead of method names by default
- Origin validation now defaults to
falseinstead oftruefor easier development
1.0.1 #
- ๐ง Fixed origin validation: Resolved production deployment issues with CORS origin checking
- ๐๏ธ Modular architecture: Split monolithic server file into focused modules for better maintainability
- โ๏ธ Configurable origin validation: Added
allowLocalhostandvalidateOriginsparameters for flexible security - ๐งน Code organization: Separated concerns into
middleware.dart,http_handlers.dart,session_manager.dart, andserver_utils.dart - ๐ฆ Package name: Changed from
dart_mcptomcp_server_dartfor better pub.dev availability - ๐ Enhanced security: Better HTTPS origin support and customizable allowed origins
Breaking Changes #
- Package name changed from
dart_mcptomcp_server_dart - Origin validation now allows HTTPS origins by default (can be disabled with
validateOrigins: false)
1.0.0 #
- ๐ Initial release of MCP Dart Framework
- ๐ท๏ธ Annotation-based development:
@MCPTool,@MCPResource,@MCPPromptannotations - ๐ง Code generation: Automatic boilerplate generation using
build_runner - ๐ก Multiple transports: Support for stdio, HTTP, and WebSocket connections
- ๐ Type-safe: Full Dart type safety with automatic parameter extraction
- ๐ JSON Schema: Automatic input schema generation from method signatures
- ๐ Complete example: Google Maps MCP server demonstrating all features
- ๐งช Testing support: Built-in support for testing MCP servers
- ๐ Comprehensive docs: Detailed README with examples and API reference
Features #
- MCPServer base class with full MCP protocol implementation
- Automatic parameter extraction from method signatures
- JSON Schema generation for tool input validation
- WebSocket and stdio transport support
- Resource and prompt management alongside tools
- Error handling and logging built-in
- Type-safe context access for tool parameters
Examples #
- Simple MCP server example
- Google Maps MCP server with multiple tools, resources, and prompts
- Comprehensive test suite demonstrating framework usage