Skip to content

Commit 66fc58c

Browse files
ochafikclaude
andcommitted
feat: Add Kotlin SDK for MCP Apps
Kotlin SDK for hosting MCP Apps in Android applications: SDK (kotlin/): - AppBridge: Host-side protocol handler - Transport abstraction (McpAppsTransport interface) - Generated types from schema.json - Full MCP Apps protocol support Example App (examples/basic-host-kotlin/): - Jetpack Compose app demonstrating SDK usage - Bottom toolbar UI (server/tool pickers) - WebViewTransport for Android WebView - Tool forwarding to MCP servers - Server name displayed in tool call cards - Toast notifications for messages/logs Type Generator: - scripts/generate-kotlin-types.ts - Generates Kotlin data classes from JSON Schema CI: - Kotlin job with JDK 21 on ubuntu-latest - Builds and tests SDK 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8af725b commit 66fc58c

File tree

1,484 files changed

+424
-30292
lines changed

Some content is hidden

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

1,484 files changed

+424
-30292
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,37 @@ jobs:
3636
- run: npm test
3737

3838
- run: npm run prettier
39+
40+
swift:
41+
runs-on: macos-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Build Swift SDK
46+
working-directory: swift
47+
run: swift build
48+
49+
- name: Test Swift SDK
50+
working-directory: swift
51+
run: swift test
52+
53+
kotlin:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Set up JDK 21
59+
uses: actions/setup-java@v4
60+
with:
61+
java-version: "21"
62+
distribution: "temurin"
63+
64+
- name: Build Kotlin SDK
65+
working-directory: kotlin
66+
run: |
67+
chmod +x gradlew
68+
./gradlew build
69+
70+
- name: Test Kotlin SDK
71+
working-directory: kotlin
72+
run: ./gradlew test

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@ examples/basic-server-react/**/*.ts
44
examples/basic-server-react/**/*.tsx
55
examples/basic-server-vanillajs/**/*.ts
66
examples/basic-server-vanillajs/**/*.tsx
7+
8+
# Swift package manager build artifacts
9+
sdk/swift/.build/
10+
examples/basic-host-swift/.build/
11+
examples/basic-host-swift/build/
12+
examples/basic-host-kotlin/.gradle/
13+
examples/basic-host-kotlin/build/
14+
15+
# Swift build artifacts
16+
swift/.build/
File renamed without changes.
-17 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)