Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest]
swift-version:
- 6.0.3
- 6.1.0

runs-on: ${{ matrix.os }}
Expand All @@ -43,6 +42,58 @@ jobs:
- name: Run tests
run: swift test -v

conformance:
timeout-minutes: 10
runs-on: macos-latest
name: MCP Conformance Tests

steps:
- uses: actions/checkout@v4

- name: Setup Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: 6.1.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Build Swift executables
run: |
swift build --product mcp-everything-client
swift build --product mcp-everything-server

- name: Run client conformance tests
uses: modelcontextprotocol/conformance@v0.1.11
with:
mode: client
command: '.build/debug/mcp-everything-client'
suite: 'core'
expected-failures: './conformance-baseline.yml'

- name: Start server for testing
run: |
.build/debug/mcp-everything-server &
echo "SERVER_PID=$!" >> $GITHUB_ENV
sleep 3

- name: Run server conformance tests
uses: modelcontextprotocol/conformance@v0.1.11
with:
mode: server
url: 'http://localhost:3001/mcp'
suite: 'core'
expected-failures: './conformance-baseline.yml'

- name: Cleanup server
if: always()
run: |
if [ -n "$SERVER_PID" ]; then
kill $SERVER_PID 2>/dev/null || true
fi

static-linux-sdk-build:
name: Linux Static SDK Build (${{ matrix.swift-version }} - ${{ matrix.os }})
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
},
"[github-actions-workflow]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[swift]": {
"editor.insertSpaces": true,
"editor.tabSize": 4
}
}
40 changes: 38 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ import PackageDescription
var dependencies: [Package.Dependency] = [
.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/apple/swift-async-algorithms.git", from: "1.0.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"),
]

// Target dependencies needed on all platforms
var targetDependencies: [Target.Dependency] = [
.product(name: "SystemPackage", package: "swift-system"),
.product(name: "Logging", package: "swift-log"),
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
.product(
name: "EventSource", package: "eventsource",
condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS, .macCatalyst])),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
]

let package = Package(
Expand All @@ -33,7 +39,13 @@ let package = Package(
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "MCP",
targets: ["MCP"])
targets: ["MCP"]),
.executable(
name: "mcp-everything-server",
targets: ["MCPConformanceServer"]),
.executable(
name: "mcp-everything-client",
targets: ["MCPConformanceClient"])
],
dependencies: dependencies,
targets: [
Expand All @@ -49,5 +61,13 @@ let package = Package(
.testTarget(
name: "MCPTests",
dependencies: ["MCP"] + targetDependencies),
.executableTarget(
name: "MCPConformanceServer",
dependencies: ["MCP"] + targetDependencies,
path: "Sources/MCPConformance/Server"),
.executableTarget(
name: "MCPConformanceClient",
dependencies: ["MCP"] + targetDependencies,
path: "Sources/MCPConformance/Client")
]
)
Loading