
Shuttle
io.github.grarchtPublished by GitHub account grarchtv4.0.0Updated Oct 24, 2026
Android framework and solution that prevents TransactionTooLargeException crashes by design.
Overview
Local MCP server that gives an assistant Shuttle Android framework expertise: scaffolding integration boilerplate, spotting TransactionTooLargeException risk, и
- What you can do
- Scaffold a complete Shuttle integration with ready-to-paste Kotlin boilerplate for Hilt, Koin or manual wiring, based on the published Shuttle spec and README material.
- When to use it
- Useful when working in an Android project that adopts the Shuttle framework and you want an assistant to generate integration code or review pasted Kotlin/Java snippets for TransactionTooLargeException risk without cloning the repository.
- Requirements
- Runs as a local process from an OCI image (ghcr.io/grarcht/shuttle-mcp:4.0.0) over stdio; a container runtime is needed. No authentication, environment variables or headers are declared. Desktop only.
Installation
In SourceWeft
- Open Shuttle in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Prevent TransactionTooLargeException crashes. For good.
A modern Android framework for safely transporting large Serializable objects between components, without the crashes.
[License: MIT] [Maven Central] [API Docs] [Min SDK] [Kotlin]
Get To It Quick
- API Documentation
- Why Shuttle?
- How It Works
- Requirements
- Quick Start
- Usage
- Architecture
- Demo Apps
- Heads Up: Know the Tradeoffs
- AI
- Contributing
- License
🚨 Why Shuttle?
🗞️ Featured in Android Weekly #594 and Android Weekly #455, validated by the Android community twice.
You've seen this before. Maybe last week:
It didn't show up in dev. It didn't show up in QA. It showed up at 2am, in production, for real users. Your Play Store rating took the hit before anyone on the team even knew.
So you triaged it. Filed the ticket. Wrote the fix. Reviewed the PR. Ran QA again. Cut the hotfix. And then you added it to the code review checklist, hoping the next engineer would catch it before it happened again.
They won't. Not reliably. You can't review your way out of a structural problem.
Shuttle provides a modern, guarded way to pass large Serializable objects with Intent objects or save them in Bundle objects to avoid app crashes. The crash class is structurally prevented, not governed against.
Why keep spending more time and money on governance through code reviews? Why not embrace the problem by providing a solution for it?
Shuttle reduces the high level of governance needed to catch TransactionTooLargeException inducing code by:
- storing the
Serializableand passing an identifier for theSerializable - using a small-sized
Bundlefor binder transactions - avoiding app crashes from
TransactionTooLargeExceptions - enabling retrieval of the stored
Serializableat the destination
Shuttle also excels by:
- providing a solution with maven artifacts
- providing Solution Building Blocks (SBBs) for building on
- saving time by avoiding DB and table setup, especially when creating many tables for the content of different types of objects
When envisioning, designing, and creating the architecture, quality attributes and best practices were kept in mind. These attributes include usability, readability, recognizability, reusability, maintainability, and more.
⚙️ How It Works
[Saving Android Apps From Crashes | The Shuttle Framework and Solution]
The Shuttle framework takes its name from cargo transportation in the freight industry. Moving and storage companies experience scenarios where large moving trucks cannot transport cargo the entire way to the destination (warehouses, houses, et cetera). These scenarios might occur from road restrictions, trucks being overweight from large cargo, and more. As a result, companies use small Shuttle vans to transport smaller cargo groups on multiple trips to deliver the entire shipment.
After the delivery is complete, employees remove the cargo remnants from the shuttle vans and trucks. This clean-up task is one of the last steps for the job.
The Shuttle framework takes its roots in these scenarios:
- creating a smaller cargo bundle object to use in successfully delivering the data to the destination
- shuttling the corresponding large cargo to a warehouse and storing it for pickup
- linking the smaller cargo with the larger cargo by an identifier
- providing a single source of truth (Shuttle interface) to use for transporting cargo
- providing convenience functions to remove cargo (automatically or on-demand)
Shuttle applies this same logic to Android's binder transaction limit:
Requirements
🚀 Quick Start
1. Add Dependencies
settings.gradle.kts — apply the Shuttle Gradle plugin so the @ShuttleCargo annotation processor is wired into your build:
@ShuttleCargo annotates the cargo class you want to transport between screens. At build time, the annotation processor generates the serialization code Shuttle needs to store and retrieve cargo, without any manual Serializable boilerplate.
The Shuttle Cargo Gradle plugin configures KSP and registers the Shuttle compiler plugin automatically. Without it, @ShuttleCargo-annotated classes will not generate the required serialization glue code.
build.gradle.kts:
Version Catalog (libs.versions.toml):
2. Initialize Shuttle
Wire CargoShuttle once as a singleton. With Hilt:
The ShuttleDataAccessObject comes from ShuttleRoomDataDb.getInstance(ShuttleRoomDbConfig(context)).shuttleDataAccessObject. Inject Shuttle wherever you need to transport data.
3. Ship Your First Cargo
That's it. No custom DB setup. No table management. No crash.
📦 Usage
The recommended entry point is the Shuttle interface with CargoShuttle as the implementation. It's a single source of truth for all cargo transport operations.
Transport with Intents
Source component:
ℹ️
cleanShuttleOnReturnTois important. It ensures cargo is purged from the Warehouse when it's no longer needed.
Transport with the Navigation Component
Source fragment:
Pick Up Cargo at the Destination
In a Fragment/Activity:
In a ViewModel:
Cargo States (LCE Pattern)
Shuttle returns sealed class results that promote the Loading-Content-Error (LCE) pattern, giving consumers full control over UI state, analytics, and error handling.
Using @ShuttleCargo
Annotate any data class you want to transport through Shuttle. The annotation processor generates the serialization code at build time so you never write it by hand:
That's the entire declaration. No Serializable implementation, no custom read/write methods. Then transport it the same way as any other object:
Cleaning Up
Cargo is automatically removed when using cleanShuttleOnReturnTo. For manual control:
🏗️ Architecture
Shuttle is a layered Solution Building Block (SBB) framework. Each layer has a well-defined responsibility and no layer forces technology choices on consumers.
Module Overview
Context Diagram
Module Dependency Diagram
Why this layering matters: The persistence abstraction means you can swap Room for any other storage implementation without touching the framework or your application code. Bring your own persistence layer by implementing the integration interfaces.
Shuttle avoids bundling large reactive libraries. Asynchronous communication runs on Kotlin Coroutines and Channels only, which keeps the transitive dependency footprint lean.
🎬 Demo Apps
The demo apps show both the crash scenario and the Shuttle solution side-by-side, using image data transport. Image data is one of the most common real-world contributors to TransactionTooLargeException.
Two architecture patterns are covered:
MVVM: Activities/Fragments as View, ViewModel as state owner and liaison, Kotlin Channels for async notification.
Flow 1: Navigate with Shuttle ✅
Tap "Navigate using Shuttle" -> image loads successfully via warehouse pickup.
Flow 2: Navigate Normally ❌
Tap "Navigate Normally" -> app crashes with TransactionTooLargeException.
ℹ️ For image loading in production, use Glide or Coil. The demo uses raw image data intentionally to trigger the crash condition.
⚠️ Heads Up: Know the Tradeoffs
Other Parcelable objects in the same Intent can still crash your app. Shuttle protects the Serializable payload. It doesn't protect unrelated Parcelable data you're also passing.
Serializable is slower than Parcelable. Parcelable is optimized for IPC and faster to load, but it's unsafe for disk storage. Google recommends serialization for persistence, which is why Shuttle uses it. The LCE state pattern (loading state) gives your UI the hook it needs to handle the slightly longer load time gracefully.
These are documented tradeoffs, not bugs. Architecture is always about weighing options. This one is worth it.
🤖 AI
Model Context Protocol (MCP)
The Model Context Protocol is an open standard that lets AI assistants connect to external tools and data sources. Rather than relying solely on training data, an MCP-enabled assistant can call live tools the moment you need them, generating accurate boilerplate, analysing your actual code, and returning up-to-date documentation without ever leaving your editor.
Shuttle publishes an MCP server to the MCP Registry, which means any developer can point their MCP-compatible editor at it and get Shuttle expertise inside their own project, without cloning or opening this repo. Your AI assistant can scaffold a complete Shuttle integration with ready-to-paste Kotlin boilerplate for Hilt, Koin, or manual wiring; detect TransactionTooLargeException risk in any Kotlin or Java snippet you paste; and retrieve the authoritative Shuttle spec on demand, covering core concepts, setup, transport, pickup, cleanup, and annotations.
For teams, this is the governance multiplier that code review alone cannot be. Every developer, regardless of experience level or editor preference, gets the same accurate, up-to-date guidance on integration patterns and risk from day one.
See the MCP README file for the full list of supported editors and the verification checklist.
🤝 Contributing
Pull requests are welcome. Check the Contributing Guide and Code of Conduct before opening one.
- Fork the repo
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m 'Add: my feature' - Push the branch:
git push origin feature/my-feature - Open a Pull Request
For bugs and feature requests, open an issue.
📄 License
MIT. See LICENSE.md for full terms.
Copyright © 2023 Craft & Graft LLC · GRARCHT ™ 2021
Source: README.md at commit 218a773
Tools
0Version history
1- v4.0.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts