Skip to content
claude-mobile-metro-manager logo

Metro Bundler Management with expo-mcp Support

claude-mobile-metro-manager

Use when starting Metro bundler for Expo development, debugging Metro errors, or enabling expo-mcp local capabilities - manages Metro lifecycle with EXPO_UNSTABLE_MCP_SERVER=1 flag for autonomous testing

SKILL.md

Full skill instructions

Metro Bundler Management with expo-mcp Support

Overview

Manage Metro bundler lifecycle with EXPO_UNSTABLE_MCP_SERVER=1 environment variable to enable expo-mcp local capabilities.

Core principle: Start Metro with MCP flag. Monitor health. Enable autonomous testing.

Announce at start: "I'm using the claude-mobile-metro-manager skill to start Metro with expo-mcp support."

When to Use

  • Starting Metro for development (Phase 4)
  • Before iOS builds or expo-mcp testing (Gate 4A)
  • Debugging Metro errors (port conflicts, cache issues)
  • Enabling expo-mcp local tools (automation_take_screenshot, automation_tap_by_testid, etc.)

Critical Requirement: MCP Flag

ALWAYS start Metro with expo-mcp flag:

EXPO_UNSTABLE_MCP_SERVER=1 npx expo start

Why: Enables expo-mcp local capabilities:

  • automation_take_screenshot
  • automation_tap, automation_tap_by_testid
  • automation_find_view_by_testid
  • open_devtools
  • expo_router_sitemap

Without flag: Only server tools available (search_documentation, add_library, generate_*_md, learn)

Quick Reference

TaskCommandTool
Start with MCP./​scripts/​start-metro.shSerena execute_shell_command
Start + clear cache./​scripts/​start-metro.sh --clear-cacheSerena
Check healthRead logs/​metro.logmorphllm read_file
Stop Metro./​scripts/​stop-metro.shSerena
Verify MCP enabledCheck for "expo-mcp server" in logsmorphllm

Core Workflow

1. Start Metro with MCP Support

mcp__serena__execute_shell_command({
  command: "./​scripts/​start-metro.sh",
  cwd: "/​Users/​nick/​Desktop/​claude-mobile-expo"
});

// Script includes: EXPO_UNSTABLE_MCP_SERVER=1 npm start

// Verify success
mcp__morphllm__read_file({
  path: "/​Users/​nick/​Desktop/​claude-mobile-expo/​logs/​metro.log",
  head: 100
});
// Must show: "Metro.*waiting" AND "expo-mcp server" or "MCP server"

2. Verify expo-mcp Local Tools Available

After Metro starts with flag, verify local capabilities:

"Take a screenshot to test expo-mcp"

If successful: expo-mcp local tools are working ✅

If error: Check Metro logs for MCP server status

3. Clear Cache When Needed

mcp__serena__execute_shell_command({
  command: "./​scripts/​start-metro.sh --clear-cache"
});

When to clear:

  • "Unable to resolve module" errors
  • After dependency changes
  • After Metro crash

4. Fix Common Errors

Port 8081 in use:

mcp__serena__execute_shell_command({
  command: "pkill -f metro && ./​scripts/​start-metro.sh"
});

Module resolution failed:

mcp__serena__execute_shell_command({
  command: "./​scripts/​start-metro.sh --clear-cache"
});

Common Mistakes

MistakeReality
"Start without MCP flag"WRONG. Local tools won't work. Must use EXPO_UNSTABLE_MCP_SERVER=1.
"npm start is fine"WRONG. Use script with logging and MCP flag.
"Don't check logs"WRONG. Verify MCP server started.
"Cache clear is slow"WRONG. 10s vs hours debugging.

❌ WRONG

cd claude-code-mobile && npx expo start  # Missing MCP flag!

✅ CORRECT

cd claude-code-mobile && EXPO_UNSTABLE_MCP_SERVER=1 npx expo start
# OR use automation script:
./​scripts/​start-metro.sh  # Has flag built-in

Red Flags

  • "MCP flag is optional" → WRONG. Required for autonomous testing.
  • "Server tools are enough" → WRONG. Local tools needed for testing.
  • "Direct npm start is fine" → WRONG. Use script with flag and logging.

Integration

  • Enables: expo-mcp local capabilities for autonomous testing
  • Use BEFORE: @claude-mobile-ios-testing (requires Metro with MCP)
  • Use WITH: All Phase 4 development (frontend implementation)

Reference

Metro should show in logs:

✅ Metro waiting on port 8081
✅ expo-mcp server listening (or MCP server enabled)

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View