mcp_server_dart 1.0.1
mcp_server_dart: ^1.0.1 copied to clipboard
A developer-friendly MCP (Model Context Protocol) framework for Dart with annotations and code generation.
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
allowLocalhost
andvalidateOrigins
parameters for flexible security - π§Ή Code organization: Separated concerns into
middleware.dart
,http_handlers.dart
,session_manager.dart
, andserver_utils.dart
- π¦ Package name: Changed from
dart_mcp
tomcp_server_dart
for better pub.flutter-io.cn availability - π Enhanced security: Better HTTPS origin support and customizable allowed origins
Breaking Changes #
- Package name changed from
dart_mcp
tomcp_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
,@MCPPrompt
annotations - π§ 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