Commit 66fc58c
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- .github/workflows
- examples/basic-host-kotlin
- .gradle
- 9.2.1
- checksums
- executionHistory
- fileChanges
- fileHashes
- buildOutputCleanup
- vcs-1
- build
- intermediates
- annotation_processor_list/debug
- apk_ide_redirect_file/debug
- app_metadata/debug
- compatible_screen_manifest/debug
- compile_and_runtime_not_namespaced_r_class_jar/debug
- desugar_graph/debug/out
- currentProject
- dirs_bucket_0
- dirs_bucket_1
- dirs_bucket_2
- dirs_bucket_3
- dirs_bucket_4
- dirs_bucket_5
- dirs_bucket_6
- jar_03c6ba88d227e2186dd7417d923d89c5689579a8406a8835cd4ec96fac3530fa_bucket_0
- jar_03c6ba88d227e2186dd7417d923d89c5689579a8406a8835cd4ec96fac3530fa_bucket_1
- jar_03c6ba88d227e2186dd7417d923d89c5689579a8406a8835cd4ec96fac3530fa_bucket_2
- jar_03c6ba88d227e2186dd7417d923d89c5689579a8406a8835cd4ec96fac3530fa_bucket_3
- jar_03c6ba88d227e2186dd7417d923d89c5689579a8406a8835cd4ec96fac3530fa_bucket_4
- jar_03c6ba88d227e2186dd7417d923d89c5689579a8406a8835cd4ec96fac3530fa_bucket_5
- jar_03c6ba88d227e2186dd7417d923d89c5689579a8406a8835cd4ec96fac3530fa_bucket_6
- otherProjects
- jar_c079a6e8a5f26ded2f699e428122784614e0d1032c3170942d8b77c7cd33407a_bucket_0
- jar_c079a6e8a5f26ded2f699e428122784614e0d1032c3170942d8b77c7cd33407a_bucket_1
- jar_c079a6e8a5f26ded2f699e428122784614e0d1032c3170942d8b77c7cd33407a_bucket_2
- jar_c079a6e8a5f26ded2f699e428122784614e0d1032c3170942d8b77c7cd33407a_bucket_3
- jar_c079a6e8a5f26ded2f699e428122784614e0d1032c3170942d8b77c7cd33407a_bucket_4
- jar_c079a6e8a5f26ded2f699e428122784614e0d1032c3170942d8b77c7cd33407a_bucket_5
- jar_c079a6e8a5f26ded2f699e428122784614e0d1032c3170942d8b77c7cd33407a_bucket_6
- dex_archive_input_jar_hashes/debug
- dex_number_of_buckets_file/debug
- dex/debug
- mergeExtDexDebug
- mergeLibDexDebug
- 13
- 14
- 4
- 5
- mergeProjectDexDebug
- 0
- 11
- incremental
- debug-mergeJavaRes
- zip-cache
- debug
- mergeDebugResources
- merged.dir
- values-af
- values-am
- values-ar
- values-as
- values-az
- values-b+sr+Latn
- values-be
- values-bg
- values-bn
- values-bs
- values-ca
- values-cs
- values-da
- values-de
- values-el
- values-en-rAU
- values-en-rCA
- values-en-rGB
- values-en-rIN
- values-en-rXC
- values-es-rUS
- values-es
- values-et
- values-eu
- values-fa
- values-fi
- values-fr-rCA
- values-fr
- values-gl
- values-gu
- values-hi
- values-hr
- values-hu
- values-hy
- values-in
- values-is
- values-it
- values-iw
- values-ja
- values-ka
- values-kk
- values-km
- values-kn
- values-ko
- values-ky
- values-lo
- values-lt
- values-lv
- values-mk
- values-ml
- values-mn
- values-mr
- values-ms
- values-my
- values-nb
- values-ne
- values-nl
- values-or
- values-pa
- values-pl
- values-pt-rBR
- values-pt-rPT
- values-pt
- values-ro
- values-ru
- values-si
- values-sk
- values-sl
- values-sq
- values-sr
- values-sv
- values-sw
- values-ta
- values-te
- values-th
- values-tl
- values-tr
- values-uk
- values-ur
- values-uz
- values-v16
- values-v21
- values-vi
- values-zh-rCN
- values-zh-rHK
- values-zh-rTW
- values-zu
- values
- packageDebugResources
- merged.dir/values
- mergeDebugAssets
- mergeDebugJniLibFolders
- mergeDebugShaders
- java_res/debug/out/META-INF
- local_only_symbol_list/debug
- manifest_merge_blame_file/debug
- merged_java_res/debug
- merged_manifests/debug
- merged_manifest/debug
- merged_res_blame_folder/debug/out/multi-v2
- merged_res/debug
- packaged_manifests/debug
- packaged_res/debug/values
- processed_res/debug/out
- project_dex_archive/debug/out
- com/example/mcpappshost
- runtime_symbol_list/debug
- signing_config_versions/debug
- source_set_path_map/debug
- stable_resource_ids_file/debug
- sub_project_dex_archive/debug/out
- symbol_list_with_package_name/debug
- kotlin/compileDebugKotlin
- cacheable
- caches-jvm
- inputs
- jvm/kotlin
- lookups
- classpath-snapshot
- local-state
- outputs
- apk/debug
- logs
- reports/problems
- gradle/wrapper
- scripts
- src/main
- kotlin/com/example/mcpappshost
- res/values
- kotlin
- .gradle
- 9.2.1
- checksums
- executionHistory
- fileChanges
- fileHashes
- buildOutputCleanup
- vcs-1
- build
- .transforms
- 169bf1bf728fe5ef2a94b076d0ed73b4
- transformed/empty
- 1f70db23a24c20dcde258bf1b94d442f
- transformed/empty
- bc2c98782b66cc1e8cfc95c8c09c1e2d
- transformed/main
- main_dex/io/modelcontextprotocol/apps
- generated
- protocol
- transport
- e5df55d32847b78d7f5df70b66a734b7
- transformed/main
- main_dex/io/modelcontextprotocol/apps
- generated
- protocol
- transport
- classes/kotlin
- main
- META-INF
- io/modelcontextprotocol/apps
- generated
- protocol
- transport
- test
- META-INF
- io/modelcontextprotocol/apps
- kotlin
- compileKotlin
- cacheable
- caches-jvm
- inputs
- jvm/kotlin
- lookups
- classpath-snapshot
- local-state
- compileTestKotlin
- cacheable
- caches-jvm
- inputs
- jvm/kotlin
- lookups
- classpath-snapshot
- local-state
- libs
- reports
- problems
- tests/test
- classes
- css
- js
- packages
- test-results/test
- binary
- examples/basic-host-swift
- Sources/BasicHostApp
- scripts
- gradle/wrapper
- kotlin
- src
- main/kotlin/io/modelcontextprotocol/apps
- generated
- protocol
- transport
- test/kotlin/io/modelcontextprotocol/apps
- swift
- Sources/McpApps
- Generated
- Transport
- Tests/McpAppsTests
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| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
File renamed without changes.
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