PeopleInSpace: One Codebase, Every Screen (and Even an MCP Server)
If you've been following Kotlin Multiplatform (KMP) for a while, you've probably seen the dozens of "hello world" samples that compile for Android and iOS. Nice, but not exactly jaw-dropping.
Now look at PeopleInSpace. It's a KMP project that runs on Android, iOS, Wear OS, Desktop (via Compose for Desktop), Web (via Compose for Web), and — this is the wildcard — as an MCP server. Yes, a model context protocol server that you can plug into AI tools.
Let's break down what this actually means for you, a developer who wants to see KMP pushed to its limits.
What It Does
PeopleInSpace is a simple app that fetches data from the Open Notify API — specifically, it shows you who's currently in space, how many people are up there, and their spacecraft details.
But the real magic isn't the data; it's how that data is served. The app shares business logic, networking, data models, and even UI components across every target with minimal platform-specific code. The same ViewModel and Ktor client that fetches astronauts on Android runs identically on a Samsung Galaxy Watch, an iOS Simulator, a Linux desktop, and even a headless server with no UI at all.
Why It’s Cool
A few things stand out:
-
Wear OS support — This isn't just "Android but smaller". The project includes a dedicated wearable UI that respects screen size constraints and uses Material You theming. You can actually see how to handle different form factors properly.
-
Desktop and Web — Using Compose Multiplatform, the same UI components render on macOS, Windows, Linux, and in a browser. It's not just a proof of concept; the layouts are responsive and functional.
-
MCP server — This is the head-scratcher that makes it unique. The project includes a module that runs as a Model Context Protocol server, meaning you can connect this app's data directly to AI assistants or chat interfaces. If you're building AI tooling, this is a ready-made component to hook into.
-
Real-world patterns — The codebase uses modern KMP patterns: Kotlinx.serialization for JSON parsing, Ktor for HTTP, Coroutines and Flow for reactivity, and Koin for DI. It's not a toy; it's a blueprint.
-
CI/CD included — GitHub Actions workflows build and test everything automatically. You can see exactly how to set up multi-target builds.
How to Try It
The fastest way to see it running is to clone the repo and open it in Android Studio or IntelliJ IDEA:
git clone https://github.com/joreilly/PeopleInSpace.git
Then choose your target:
- Android: Open
androidAppfolder - iOS: Open
iosAppin Xcode with the KMP plugin - Desktop: Run the
desktopAppmodule - Web: Run the
webAppmodule - MCP server: Run the
mcpServermodule
There's a live web demo at the repo's GitHub Pages link, and you can find the Wear OS build instructions in the README.
Final Thoughts
Honestly, this is the kind of project that makes you stop and think: "Wait, I could actually ship the same codebase to a watch, a web app, and an AI agent?" Yes. And that's the point.
If you're evaluating KMP for a real project, this is one of the most comprehensive and well-structured examples you'll find. It shows you the tradeoffs (e.g., Compose for Web still has rough edges), but more importantly, it shows you what's possible today.
Clone it, break it, and learn from it. That's what open source examples are for.
Found this interesting? Follow @githubprojects on Twitter for more real-world open source discoveries.