
zfinix/mcp_server_dart
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Dart의 개발자 친화적 인 MCP (모델 Context Protocol) 프레임 워크는 주석 및 코드 생성.
개요
와 함께. MCP 서버를 @MCPTool, @MCPResource, 또는 @MCPPrompt로 쉽게 배치 할 수 있습니다. json serializable 또는 동결 된 작동 방식과 유사합니다. - : Declare MCP 도구, 리소스 및 간단한 주석으로 신속한 - : extension-based register를 사용하여 자동 보일러 플레이트 생성 - : 상속 보일러 플레이트없이 깨끗한 방법 선언 - : stdio, HTTP 및 Server-Sent Events (SSE)와 Streamable HTTP에 대한 지원 - : 자동 매개 변수 추출으로 전체 다트 유형의 안전 - : 방법 서명에서 자동 입력 스키마 생성 - : JSON-RPC 명령 유효성 검사와 포괄적 인 테스트 스위트 - 현재 MCP 도구 및 내장 : MCP 도구, MCP 도구 및 내장 : MCP 도구, MCP 도구 및 내장 ...
개요(AI 번역)
A ** 개발자 친화적 인 MCP (모델 Context Protocol) 프레임 워크 ** ** 및 ** 코드 생성 **. MCP 서버를 쉽게 @MCPTool, @MCPResource, 또는 @MCPPrompt]]와 같은 json_serializable 또는 freezed]] 작동 방식로 구축하십시오.
✨ 특징
-** An️ Annotation-based**: MCP 도구, 리소스 및 간단한 주석으로 프롬프트
- ** 過去 Code 생성**:
build_runner]를 사용하여 자동 보일러판 생성 - ✨
@override필수: 상속 보일러판없이 깨끗한 방법 선언 - ** Multiple 배수 수송 : stdio, HTTP 및 Server-Sent Events (SSE)와 Streamable HTTP 지원 - Array Type-safe**: 자동 파라미터 추출을 통한 Full Dart type 안전
- ** JSON 신종**: 메소드 서명에서 자동 입력 스키마 생성
- ** Fully 완전 테스트**: JSON-RPC 명령어 유효성 검사
- ** : 현재 MCP 2025-11-25-aligned 프로토콜 구현 - Modern 현대 기능: MCP 로깅, 완료, 작업 증강 도구 호출 및 풍부한 메타 데이터 초기 지원
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.

A developer-friendly MCP (Model Context Protocol) framework for Dart with annotations and code generation. Build MCP servers as easily as annotating methods with @MCPTool, @MCPResource, or @MCPPrompt - similar to how json_serializable or freezed works.
✨ Features
- 🏷️ Annotation-based: Declare MCP tools, resources, and prompts with simple annotations
- 🔧 Code generation: Automatic boilerplate generation using
build_runnerwith extension-based registration - ✨ No
@overriderequired: Clean method declarations without inheritance boilerplate - 📡 Multiple transports: Support for stdio, HTTP, and Streamable HTTP with Server-Sent Events (SSE)
- 🔍 Type-safe: Full Dart type safety with automatic parameter extraction
- 📚 JSON Schema: Automatic input schema generation from method signatures
- 🧪 Fully tested: Comprehensive test suite with JSON-RPC command validation
- ⚡ Production ready: Current MCP 2025-11-25-aligned protocol implementation with Relic HTTP server
- 🧠 Modern capabilities: Built-in support for MCP logging, completions, task-augmented tool calls, and richer initialize metadata
- 🌐 Modern HTTP: Built on Relic framework with middleware support, CORS, logging, and health checks
- 🔧 Monitoring: Built-in health check endpoints and connection monitoring
- 📊 SSE Support: Server-Sent Events for real-time streaming on the modern MCP streamable HTTP transport
🚀 Quick Start
1. Add Dependencies
dependencies:
mcp_server_dart: ^1.1.2
relic: ^0.5.0 # Modern HTTP framework
logging: ^1.3.0 # For server logging
dev_dependencies:
build_runner: ^2.4.13
2. Create Your MCP Server
import 'package:mcp_server_dart/mcp_server_dart.dart';
part 'my_server.mcp.dart'; // Generated file
class MyMCPServer extends MCPServer {
MyMCPServer() : super(name: 'my-server', version: '1.0.0') {
// Register all generated handlers using the extension
registerGeneratedHandlers();
}
@MCPTool('greet', description: 'Greet someone by name')
Future greet(String name) async {
return 'Hello, $name! 👋';
}
설치
npx @modelcontextprotocol/inspector --cli http://localhost:8080/mcp --transport streamable-http --method tools/list설정
{
"mcpServers": {
"my-server": {
"command": "/path/to/mcp-server"
}
}
}