Skip to content

Commit 35213e0

Browse files
feat: 2025-11-25 phase 1, includes Version, Icon, Progress (#181)
* chore: fixed unit tests * feat: added icon and progess base structs * feat: added progress notification and meta to callTool * feat: added tests * feat: simplified RequestMeta encoding/decoding * tests: added unit test to track progress * chore: rebased v0.11.x * feat: implemented cancellation * feat: added overloaded callTool method * fix: encoding Response _meta fix * chore: added old version to the versions list * feat: 2025-11-25 phase 2; added Logging and Completions (#196) * feat: added Logging and Completions * feat: updated EmbeddedResource for the latest spec * chore: changed encoding of meta in Prompts to encodeIfPresent * feat: compliance tests + http server transport (#197) * feat: http server transport * feat: added http server transport * feat: removed unused files * feat: added conformance tests * feat: improved conformace testing * chore: removed redundant files
1 parent 4b5726f commit 35213e0

43 files changed

Lines changed: 7175 additions & 839 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,58 @@ jobs:
4343
- name: Run tests
4444
run: swift test -v
4545

46+
conformance:
47+
timeout-minutes: 10
48+
runs-on: macos-latest
49+
name: MCP Conformance Tests
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Setup Swift
55+
uses: swift-actions/setup-swift@v2
56+
with:
57+
swift-version: 6.1.0
58+
59+
- name: Setup Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: '20'
63+
64+
- name: Build Swift executables
65+
run: |
66+
swift build --product mcp-everything-client
67+
swift build --product mcp-everything-server
68+
69+
- name: Run client conformance tests
70+
uses: modelcontextprotocol/conformance@v0.1.11
71+
with:
72+
mode: client
73+
command: '.build/debug/mcp-everything-client'
74+
suite: 'core'
75+
expected-failures: './conformance-baseline.yml'
76+
77+
- name: Start server for testing
78+
run: |
79+
.build/debug/mcp-everything-server &
80+
echo "SERVER_PID=$!" >> $GITHUB_ENV
81+
sleep 3
82+
83+
- name: Run server conformance tests
84+
uses: modelcontextprotocol/conformance@v0.1.11
85+
with:
86+
mode: server
87+
url: 'http://localhost:3001/mcp'
88+
suite: 'core'
89+
expected-failures: './conformance-baseline.yml'
90+
91+
- name: Cleanup server
92+
if: always()
93+
run: |
94+
if [ -n "$SERVER_PID" ]; then
95+
kill $SERVER_PID 2>/dev/null || true
96+
fi
97+
4698
static-linux-sdk-build:
4799
name: Linux Static SDK Build (${{ matrix.swift-version }} - ${{ matrix.os }})
48100
strategy:

Package.resolved

Lines changed: 37 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ import PackageDescription
77
var dependencies: [Package.Dependency] = [
88
.package(url: "https://github.com/apple/swift-system.git", from: "1.0.0"),
99
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.0"),
10+
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0"),
1011
.package(url: "https://github.com/mattt/eventsource.git", from: "1.1.0"),
12+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"),
1113
]
1214

1315
// Target dependencies needed on all platforms
1416
var targetDependencies: [Target.Dependency] = [
1517
.product(name: "SystemPackage", package: "swift-system"),
1618
.product(name: "Logging", package: "swift-log"),
19+
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
1720
.product(
1821
name: "EventSource", package: "eventsource",
1922
condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS, .macCatalyst])),
23+
.product(name: "NIOCore", package: "swift-nio"),
24+
.product(name: "NIOPosix", package: "swift-nio"),
25+
.product(name: "NIOHTTP1", package: "swift-nio"),
2026
]
2127

2228
let package = Package(
@@ -33,7 +39,13 @@ let package = Package(
3339
// Products define the executables and libraries a package produces, making them visible to other packages.
3440
.library(
3541
name: "MCP",
36-
targets: ["MCP"])
42+
targets: ["MCP"]),
43+
.executable(
44+
name: "mcp-everything-server",
45+
targets: ["MCPConformanceServer"]),
46+
.executable(
47+
name: "mcp-everything-client",
48+
targets: ["MCPConformanceClient"])
3749
],
3850
dependencies: dependencies,
3951
targets: [
@@ -49,5 +61,13 @@ let package = Package(
4961
.testTarget(
5062
name: "MCPTests",
5163
dependencies: ["MCP"] + targetDependencies),
64+
.executableTarget(
65+
name: "MCPConformanceServer",
66+
dependencies: ["MCP"] + targetDependencies,
67+
path: "Sources/MCPConformance/Server"),
68+
.executableTarget(
69+
name: "MCPConformanceClient",
70+
dependencies: ["MCP"] + targetDependencies,
71+
path: "Sources/MCPConformance/Client")
5272
]
5373
)

0 commit comments

Comments
 (0)