capacitor-mcp by cap-go/capgo-skills
npx skills add https://github.com/cap-go/capgo-skills --skill capacitor-mcp使用模型上下文协议(MCP)实现 Ionic 和 Capacitor 移动开发自动化的指南。
MCP(模型上下文协议)是一个将 AI 模型连接到外部工具和数据源的开放标准。对于 Capacitor 开发,MCP 能够实现:
awesome-ionic-mcp 服务器是一个综合性工具,提供对以下内容的访问:
添加到 claude_desktop_config.json(可通过 Claude > 设置 > 开发者访问):
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"]
}
}
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
添加到 cline_mcp_settings.json:
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"],
"disabled": false
}
}
}
添加到 .cursor/mcp.json(项目特定)或 ~/.cursor/mcp.json(全局):
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"]
}
}
}
服务器在初始化期间会进行约 160+ 次 GitHub API 调用来获取插件数据。未经身份验证时,GitHub 会将您限制为每小时 60 个请求。使用 token 后,此限制可提高到每小时 5,000 个请求。
将 GITHUB_TOKEN 添加到您的 MCP 配置中:
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
从 GitHub 设置 → 开发者设置 → 个人访问令牌获取 token。对于公共仓库不需要特殊权限。
// 获取 Ionic 组件定义
get_ionic_component_definition({ tag: "ion-button" })
// 返回来自 @ionic/core 的 TypeScript 定义
// 列出所有 Ionic 组件
get_all_ionic_components()
// 返回:["ion-button", "ion-card", "ion-input", ...]
// 获取组件 API 文档
get_component_api({ tag: "ion-button" })
// 返回来自 ionicframework.com 的 API 文档
// 获取组件演示代码
get_component_demo({ tag: "ion-modal" })
// 返回来自 docs-demo.ionic.io 的演示代码
// 获取官方 Capacitor 插件 API
get_official_plugin_api({ plugin: "Camera" })
// 返回来自 capacitorjs.com 的文档
// 列出所有官方插件
get_all_official_plugins()
// 返回:["Camera", "Filesystem", "Geolocation", ...]
// 搜索所有可用的 Capacitor 插件
get_all_capacitor_plugins()
// 返回来自所有插件发布者的超级列表
// 获取 Capawesome 插件文档
get_plugin_api({ plugin: "capacitor-firebase" })
// 列出 Capawesome 插件
get_all_free_plugins() // 免费插件
get_all_insider_plugins() // 内部/付费插件
// 获取 CapGo 插件文档
get_capgo_plugin_api({ plugin: "native-biometric" })
get_all_capgo_plugins()
// 获取 Capacitor 社区插件文档
get_capacitor_community_plugin_api({ plugin: "http" })
get_all_capacitor_community_plugins()
所有命令都接受一个 project_directory 参数(默认为当前目录)。
// 获取全面的项目信息
ionic_info({ format: "json" })
// 获取配置值
ionic_config_get({ key: "name" })
// 设置配置值
ionic_config_set({ key: "name", value: "MyApp" })
// 取消设置配置值
ionic_config_unset({ key: "telemetry" })
// 创建新的 Ionic 项目
ionic_start({
name: "MyApp",
template: "tabs", // blank, list, sidemenu, tabs
type: "react", // angular, react, vue
capacitor: true
})
// 列出可用模板
ionic_start_list()
// 初始化现有项目
ionic_init({ name: "MyApp", type: "react" })
// 修复项目依赖
ionic_repair()
// 构建 Web 资源
ionic_build({
project_directory: "./my-app",
prod: true,
engine: "browser" // 或 "cordova"
})
// 启动开发服务器(建议手动启动)
// 注意:服务器在前台运行,建议手动启动
ionic_serve({
project_directory: "./my-app",
port: 8100,
lab: false
})
// 生成页面
ionic_generate({
type: "page",
name: "home",
project_directory: "./my-app"
})
// 生成组件
ionic_generate({
type: "component",
name: "user-card"
})
// 生成服务
ionic_generate({
type: "service",
name: "auth"
})
// 其他类型:directive, guard, pipe, class, interface, module
// 列出可用集成
integrations_list()
// 启用集成(例如,Capacitor)
integrations_enable({ integration: "capacitor" })
// 禁用集成
integrations_disable({ integration: "cordova" })
// 检查 Capacitor 设置
capacitor_doctor({ platform: "ios" })
// 列出已安装的插件
capacitor_list_plugins()
// 初始化 Capacitor
capacitor_init({
name: "MyApp",
id: "com.example.app",
web_dir: "dist"
})
// 添加平台
capacitor_add({ platform: "ios" })
capacitor_add({ platform: "android" })
// 迁移到最新版本
capacitor_migrate()
// 同步 Web 资源和依赖
capacitor_sync({ platform: "ios" })
// 仅复制 Web 资源
capacitor_copy({ platform: "android" })
// 更新原生依赖
capacitor_update({ platform: "ios" })
// 构建原生发布版本
capacitor_build({
platform: "ios",
scheme: "App",
configuration: "Release"
})
// 在设备/模拟器上运行
capacitor_run({
platform: "ios",
target: "iPhone 15 Pro"
})
// 打开原生 IDE
capacitor_open({ platform: "ios" }) // 打开 Xcode
capacitor_open({ platform: "android" }) // 打开 Android Studio
// 1. 创建 Ionic 项目
ionic_start({
name: "MyApp",
template: "tabs",
type: "react",
capacitor: true
})
// 2. 添加 iOS 平台
capacitor_add({
project_directory: "./MyApp",
platform: "ios"
})
// 3. 构建并同步
ionic_build({
project_directory: "./MyApp",
prod: true
})
capacitor_sync({
project_directory: "./MyApp",
platform: "ios"
})
// 获取系统信息
ionic_info({ format: "json" })
// 检查 Capacitor 设置
capacitor_doctor({ platform: "ios" })
// 列出已安装的插件
capacitor_list_plugins()
// 生成带路由的页面
ionic_generate({ type: "page", name: "profile" })
// 生成可复用组件
ionic_generate({ type: "component", name: "user-avatar" })
// 生成服务
ionic_generate({ type: "service", name: "data" })
借助 awesome-ionic-mcp,AI 助手可以:
安装 MCP 服务器后,您可以向 AI 助手提问:
awesome-ionic-mcp 服务器聚合了来自以下位置的数据:
@ionic/core 包(TypeScript 定义)服务器使用 Puppeteer 来获取一些文档。在初始化期间,您可能会看到一个浏览器窗口生成并关闭——这是正常现象。
每周安装次数
60
仓库
GitHub 星标数
18
首次出现
2026年2月6日
安全审计
安装于
gemini-cli59
opencode57
github-copilot55
codex55
kimi-cli53
amp52
Guide to using Model Context Protocol (MCP) for Ionic and Capacitor mobile development automation.
MCP (Model Context Protocol) is an open standard for connecting AI models to external tools and data sources. For Capacitor development, MCP enables:
The awesome-ionic-mcp server is a comprehensive tool that provides access to:
Add to claude_desktop_config.json (accessible via Claude > Settings > Developer):
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"]
}
}
}
Add to cline_mcp_settings.json:
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"],
"disabled": false
}
}
}
Add to .cursor/mcp.json (project-specific) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"]
}
}
}
The server makes ~160+ GitHub API calls during initialization to fetch plugin data. Without authentication, GitHub limits you to 60 requests/hour. With a token, this increases to 5,000 requests/hour.
Add GITHUB_TOKEN to your MCP configuration:
{
"mcpServers": {
"awesome-ionic-mcp": {
"command": "npx",
"args": ["-y", "awesome-ionic-mcp@latest"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
Get a token from GitHub Settings → Developer settings → Personal access tokens. No special permissions needed for public repos.
// Get Ionic component definition
get_ionic_component_definition({ tag: "ion-button" })
// Returns TypeScript definition from @ionic/core
// List all Ionic components
get_all_ionic_components()
// Returns: ["ion-button", "ion-card", "ion-input", ...]
// Get component API documentation
get_component_api({ tag: "ion-button" })
// Returns API docs from ionicframework.com
// Get component demo code
get_component_demo({ tag: "ion-modal" })
// Returns demo code from docs-demo.ionic.io
// Get official Capacitor plugin API
get_official_plugin_api({ plugin: "Camera" })
// Returns documentation from capacitorjs.com
// List all official plugins
get_all_official_plugins()
// Returns: ["Camera", "Filesystem", "Geolocation", ...]
// Search all available Capacitor plugins
get_all_capacitor_plugins()
// Returns superlist from all plugin publishers
// Get Capawesome plugin documentation
get_plugin_api({ plugin: "capacitor-firebase" })
// List Capawesome plugins
get_all_free_plugins() // Free plugins
get_all_insider_plugins() // Insider/paid plugins
// Get CapGo plugin documentation
get_capgo_plugin_api({ plugin: "native-biometric" })
get_all_capgo_plugins()
// Get Capacitor Community plugin docs
get_capacitor_community_plugin_api({ plugin: "http" })
get_all_capacitor_community_plugins()
All commands accept a project_directory parameter (defaults to current directory).
// Get comprehensive project info
ionic_info({ format: "json" })
// Get configuration value
ionic_config_get({ key: "name" })
// Set configuration value
ionic_config_set({ key: "name", value: "MyApp" })
// Unset configuration value
ionic_config_unset({ key: "telemetry" })
// Create new Ionic project
ionic_start({
name: "MyApp",
template: "tabs", // blank, list, sidemenu, tabs
type: "react", // angular, react, vue
capacitor: true
})
// List available templates
ionic_start_list()
// Initialize existing project
ionic_init({ name: "MyApp", type: "react" })
// Repair project dependencies
ionic_repair()
// Build web assets
ionic_build({
project_directory: "./my-app",
prod: true,
engine: "browser" // or "cordova"
})
// Start development server (manual launch recommended)
// Note: Server runs in foreground, manual launch preferred
ionic_serve({
project_directory: "./my-app",
port: 8100,
lab: false
})
// Generate page
ionic_generate({
type: "page",
name: "home",
project_directory: "./my-app"
})
// Generate component
ionic_generate({
type: "component",
name: "user-card"
})
// Generate service
ionic_generate({
type: "service",
name: "auth"
})
// Other types: directive, guard, pipe, class, interface, module
// List available integrations
integrations_list()
// Enable integration (e.g., Capacitor)
integrations_enable({ integration: "capacitor" })
// Disable integration
integrations_disable({ integration: "cordova" })
// Check Capacitor setup
capacitor_doctor({ platform: "ios" })
// List installed plugins
capacitor_list_plugins()
// Initialize Capacitor
capacitor_init({
name: "MyApp",
id: "com.example.app",
web_dir: "dist"
})
// Add platform
capacitor_add({ platform: "ios" })
capacitor_add({ platform: "android" })
// Migrate to latest version
capacitor_migrate()
// Sync web assets and dependencies
capacitor_sync({ platform: "ios" })
// Copy web assets only
capacitor_copy({ platform: "android" })
// Update native dependencies
capacitor_update({ platform: "ios" })
// Build native release
capacitor_build({
platform: "ios",
scheme: "App",
configuration: "Release"
})
// Run on device/emulator
capacitor_run({
platform: "ios",
target: "iPhone 15 Pro"
})
// Open native IDE
capacitor_open({ platform: "ios" }) // Opens Xcode
capacitor_open({ platform: "android" }) // Opens Android Studio
// 1. Create Ionic project
ionic_start({
name: "MyApp",
template: "tabs",
type: "react",
capacitor: true
})
// 2. Add iOS platform
capacitor_add({
project_directory: "./MyApp",
platform: "ios"
})
// 3. Build and sync
ionic_build({
project_directory: "./MyApp",
prod: true
})
capacitor_sync({
project_directory: "./MyApp",
platform: "ios"
})
// Get system info
ionic_info({ format: "json" })
// Check Capacitor setup
capacitor_doctor({ platform: "ios" })
// List installed plugins
capacitor_list_plugins()
// Generate page with routing
ionic_generate({ type: "page", name: "profile" })
// Generate reusable component
ionic_generate({ type: "component", name: "user-avatar" })
// Generate service
ionic_generate({ type: "service", name: "data" })
With awesome-ionic-mcp, AI assistants can:
With the MCP server installed, you can ask your AI assistant:
The awesome-ionic-mcp server aggregates data from:
@ionic/core package (TypeScript definitions)The server uses Puppeteer to fetch some documentation. You may see a browser window spawn and close during initialization - this is normal.
Weekly Installs
60
Repository
GitHub Stars
18
First Seen
Feb 6, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykFail
Installed on
gemini-cli59
opencode57
github-copilot55
codex55
kimi-cli53
amp52
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
67,500 周安装