// swift-tools-version:6.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "mcp-swift-sdk", platforms: [ .macOS("13.0"), .macCatalyst("16.0"), .iOS("16.0"), .watchOS("9.0"), .tvOS("16.0"), .visionOS("1.0"), ], products: [ // Products define the executables and libraries a package produces, making them visible to other packages. .library( name: "MCP", targets: ["MCP"]), .executable( name: "mcp-everything-server", targets: ["MCPConformanceServer"]), .executable( name: "mcp-everything-client", targets: ["MCPConformanceClient"]) ], dependencies: [ .package(url: "https://github.com/swiftlang/swift-docc-plugin", branch: "main"), .package(url: "https://github.com/apple/swift-system.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-log.git", from: "1.5.0"), .package(url: "https://github.com/mattt/eventsource.git", from: "1.1.0"), .package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"), ], targets: [ .target( name: "MCP", dependencies: [ .product(name: "SystemPackage", package: "swift-system"), .product(name: "Logging", package: "swift-log"), .product( name: "EventSource", package: "eventsource", condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS, .macCatalyst])), ], swiftSettings: [ .enableUpcomingFeature("StrictConcurrency") ] ), .testTarget( name: "MCPTests", dependencies: [ "MCP", .product(name: "SystemPackage", package: "swift-system"), .product(name: "Logging", package: "swift-log"), .product( name: "EventSource", package: "eventsource", condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS, .macCatalyst])), ] ), .executableTarget( name: "MCPConformanceServer", dependencies: [ "MCP", .product(name: "Logging", package: "swift-log"), .product(name: "NIOCore", package: "swift-nio"), .product(name: "NIOPosix", package: "swift-nio"), .product(name: "NIOHTTP1", package: "swift-nio"), ], path: "Sources/MCPConformance/Server" ), .executableTarget( name: "MCPConformanceClient", dependencies: [ "MCP", .product(name: "Logging", package: "swift-log"), ], path: "Sources/MCPConformance/Client" ) ] )