This project is a fork of the @talzach/mcp-angular-cli
server, now adapted to provide Ionic CLI automation capabilities via the Model Context Protocol (MCP).
A Model Context Protocol server that provides Ionic CLI automation capabilities. This server enables LLMs and agents to interact with Ionic projects, generate pages/components/services, add native platforms, build and serve apps, and manage Ionic projects via the Ionic CLI.
-
Run
ionic start
to create new Ionic projects with various templates and frameworks -
Run
ionic generate
to scaffold Ionic/Angular artifacts (pages, components, services, etc.) -
Run
ionic capacitor add
to add native platforms (iOS, Android) to your project -
Run
ionic build
to build your app for different platforms and engines -
Run
ionic serve
to start a development server with live reload -
Run
ionic info
to get project and environment information -
All via the Model Context Protocol (MCP) for agent/LLM integration
You can install the package globally using npm:
npm install -g mcp-ionic-cli
Or use it locally in your project:
npm install --save-dev mcp-ionic-cli
You can run the server directly:
npx mcp-ionic-cli
Or, if you want to use it as a custom MCP server in your agent or tool, configure it like this:
{
"mcpServers": {
"ionic-cli": {
"command": "npx",
"args": ["-y", "mcp-ionic-cli"]
}
}
}
-
Create a new Ionic project:
{ "name": "my-ionic-app", "template": "tabs", "type": "angular", "capacitor": true, "directory": "/absolute/path/to/where/you/want/it" }
-
Generate a page:
{ "type": "page", "name": "home", "appRoot": "/absolute/path/to/your/ionic/project" }
-
Add a native platform:
{ "platform": "ios", "appRoot": "/absolute/path/to/your/ionic/project" }
-
Build your app:
{ "appRoot": "/absolute/path/to/your/ionic/project", "engine": "browser" }
-
Serve your app:
{ "appRoot": "/absolute/path/to/your/ionic/project", "port": 8100, "external": true }
Star this repo if you find it useful!
To publish a new version of this package to npm, run:
npm run publish-npm
This will automatically build the project and publish it as a public package.
If you want to test or develop this server locally, you need to point your MCP server configuration to your local build output. After building the project (e.g., with npm run build
), set your MCP server file (e.g., .mcp.json
or similar) to use the local dist/index.js
file:
{
"ionic-cli": {
"command": "node",
"args": ["/path/to/your/mcp-ionic-cli/dist/index.js"]
}
}