npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@synnode/expo-metro-mcp

v1.0.3

Published

MCP server for Expo/React Native development — live logs, stack trace resolution, and simulator/emulator automation via CDP and platform CLIs.

Readme

@synnode/expo-metro-mcp

MCP server that connects to a running Expo/Metro dev server and exposes its logs to Claude Code.

Uses the Chrome DevTools Protocol (CDP) inspector endpoint that Metro exposes — the same channel that React Native DevTools uses. Works with Expo SDK 50+ including the new architecture (Bridgeless/JSI).

Installation

# Register with Claude Code CLI
claude mcp add expo-metro npx @synnode/expo-metro-mcp

Or install globally and register:

npm install -g @synnode/expo-metro-mcp
claude mcp add expo-metro expo-metro-mcp

Restart Claude Code after adding the server.

Requirements

  • Expo / Metro dev server running (npx expo start)
  • A device or emulator connected to Metro (the app must be running for logs to appear)

Configuration

# Defaults — only override if needed
METRO_PORT=8081
METRO_HOST=localhost
LOG_BUFFER_SIZE=1000

If Metro runs on a different port:

claude mcp add expo-metro --env METRO_PORT=8082 npx @synnode/expo-metro-mcp

Available tools

| Tool | Description | |---|---| | get_logs | Recent logs from the buffer. Optional: lines, level (error/warn/info/log/debug), since (e.g. "30s", "2m", unix timestamp) | | get_errors | Errors with stack traces from the buffer. Optional: lines | | get_status | Connection status, device name, and buffer statistics | | clear_logs | Clear the log buffer | | watch_logs | Poll for incoming logs for a time window. Optional: duration (e.g. "10s", max "30s"), level | | connect | Grab the CDP connection from Metro. Use after disconnect or when get_status shows disconnected | | disconnect | Release the CDP connection so React Native DevTools can connect freely | | reload | Reload the React Native app via Metro | | resolve_stack | Resolve a stack trace against the Metro source map, showing original file/line instead of bundle offsets | | list_devices | List active iOS simulators and Android emulators | | screenshot | Take a screenshot of the active simulator/emulator. Returns the image directly. Optional: platform, device_id | | tap | Tap at x,y coordinates on the active simulator/emulator. Optional: platform, device_id | | swipe | Swipe from one coordinate to another. Optional: duration_ms, platform, device_id |

Screenshot & UI automation

screenshot, tap, and swipe interact directly with your running simulator or emulator — no extra packages or paid plans needed.

Requirements:

  • iOS screenshots: macOS with Xcode installed (xcrun simctl must be available)
  • iOS tap/swipe: idb — Facebook's iOS Development Bridge
    brew tap facebook/fb && brew install idb-companion
    pip3 install fb-idb
  • Android: adb in your PATH (part of Android SDK platform-tools) — tap, swipe and screenshot all work out of the box

Notes:

  • If multiple devices are running, use list_devices to find the ID and pass it via device_id
  • Coordinates are in points (iOS logical pixels) or pixels (Android)
  • iOS screenshots work without idb — only tap/swipe require it

Using alongside React Native DevTools

CDP only allows one client at a time. Switching between the MCP and DevTools is seamless — whichever connects last takes over, and the other is kicked out automatically.

  • To use DevTools: just open or reconnect it. The MCP will be disconnected automatically.
  • To return to MCP: call connect. DevTools will lose its connection.

disconnect is available if you want to explicitly release the connection first, but it's not required.

get_status always shows whether the MCP is currently connected.

How it works

Metro exposes a CDP WebSocket at /inspector/debug. On connect, the server calls /json/list to discover the active device target, then attaches via CDP and enables Runtime.consoleAPICalled events. Metro build errors (build_failed, bundling_error) are captured separately via the /events WebSocket, which reconnects automatically.

Teaching Claude Code about this MCP

Add SKILL.md to your project root (or CLAUDE.md) to teach Claude Code how to use this MCP effectively — when to check logs, how to debug errors, how to use screenshots and taps, and more.

curl -o SKILL.md https://raw.githubusercontent.com/Synnode/expo-metro-mcp/master/SKILL.md

Notes

  • If Metro is not reachable on startup: the server starts normally, get_status returns connected: false. Call connect once your dev server is up.
  • Memory is bounded by LOG_BUFFER_SIZE (circular buffer, oldest entries dropped first).
  • The CDP connection may show an "unsupported debugging client" notice in Metro's terminal — this is harmless.