Composables CLI Ships with MCP Server for Compose Multiplatform Projects
Composables released the Composables CLI and MCP server on July 7.
This tool targets Compose Multiplatform projects, handling new project creation, adding modules to existing Gradle projects, querying Composables UI documentation in the terminal, and installing MCP for clients like Android Studio, Codex, and Cursor.
Installation Command
The installation method is fairly standard:
npm install -g composables-cli
After installation, the main command is composables. The CLI documentation lists four entry points: init, add, docs, mcp. These commands correspond to creating a new project, adding a module, querying documentation, and configuring MCP.
composables init
composables add module
composables docs search <query>
composables mcp install --client <client>
Creating a Project
composables init launches an interactive wizard that asks for the project directory, package name, application name, and target platforms. It generates a Compose Multiplatform project and includes Composables UI, Spotless, and basic Gradle configuration.
composables init
For agent usage, the CLI documentation recommends passing all parameters at once to prevent the agent from getting stuck on interactive input. The following command creates a project in the my-app directory with the package name com.example.app, the application name My App, and target platforms Android, JVM, iOS, and Wasm.
composables init my-app \
--package com.example.app \
--app-name "My App" \
--targets android,jvm,ios,wasm
--targets only accepts comma-separated android,jvm,ios,wasm. If you only want to run Android and desktop first, the command can be narrowed to:
composables init compose-demo \
--package com.example.composedemo \
--app-name "Compose Demo" \
--targets android,jvm
Adding a Module
The add entry point is used within an existing Gradle project. The command must be executed from the Gradle root directory:
composables add module
The interactive wizard asks for the module path, module type, package name, application name, and target platforms. The non-interactive syntax is as follows:
composables add module chatApp \
--type app \
--package com.example.chat \
--app-name "Chat" \
--targets android,jvm,ios,wasm
If you are just adding a UI library, change --type to library and omit --app-name:
composables add module chatUi \
--type library \
--package com.example.chat.ui \
--targets android,jvm,ios,wasm
MCP Integration
The MCP documentation lists several clients: android-studio, antigravity, claude, codex, cursor, firebender, opencode, zed.
The installation command for Android Studio is:
composables mcp install --client android-studio
After that, open Android Studio, go to Settings > Tools > AI > MCP Servers, and enable Enable MCP Servers in the JSON View. This entry corresponds to the MCP configuration for Gemini in Android Studio.
The command for Codex is:
composables mcp install --client codex
Claude, Cursor, OpenCode, and Zed follow the same pattern:
composables mcp install --client claude
composables mcp install --client cursor
composables mcp install --client opencode
composables mcp install --client zed
The MCP server has two usage modes. Clients that support streamable HTTP transport can directly configure this endpoint:
https://composables.com/mcp
If the client needs to execute local project actions, such as creating a project or adding a module, use stdio:
composables mcp start
Normally, you don't need to run mcp start manually. After composables mcp install writes the configuration, the MCP client will start it when needed.
Dependency Methods
When a new project is generated by the CLI, Composables UI is already wired in. For manually integrating into an existing project, the installation documentation provides two methods.
The first is to directly add the full UI dependency:
implementation("com.composables:ui:0.2.0")
The second is to add only the base libraries they depend on when copying component source code:
implementation("com.composables:composeunstyled:2.7.0")
implementation("com.composables:compose-interaction-capabilities:1.1.0")
These two methods have different impacts on project management. Directly depending on com.composables:ui means upgrades follow the library version; copying component source code means the code enters your own repository, and subsequent modifications and conflicts must be handled yourself.
In Android projects, I prefer to use Gradle dependency first. Only when a specific component truly needs its internal behavior changed would I consider copying the source code. For example, if you just want to adjust a Button's visual tokens, use theming; if you need to change internal logic like focus, keyboard behavior, or the semantics tree, copying the source code makes sense.
Finally
Composables CLI mainly solves four things: init creates a Compose Multiplatform project, add module adds a module to a Gradle project, docs queries Composables UI documentation in the terminal, and mcp install connects the same documentation to agents.