forked from modelcontextprotocol/swift-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
79 lines (77 loc) · 2.85 KB
/
Package.swift
File metadata and controls
79 lines (77 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// swift-tools-version:6.2
// 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("15.4"),
.macCatalyst("18.4"),
.iOS("18.4"),
.watchOS("11.4"),
.tvOS("18.4"),
.visionOS("2.4"),
],
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/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("NonisolatedNonsendingByDefault")
]
),
.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"
)
]
)