Using Model Context Protocol (MCP) with Expo

Edit page

A guide on integrating Model Context Protocol with Expo projects to enhance AI model capabilities.


Expo MCP Server requires an EAS paid plan.

Model Context Protocol (MCP) is a standard protocol that allows AI models to integrate with external data sources, providing enhanced context for more precise responses. It enables AI-assisted tools like agents to understand your development environment more deeply, allowing them to provide better assistance with your codebase.

Expo MCP Server is a remote MCP server hosted by Expo that integrates with popular AI-assisted tools such as Claude Code, Cursor, VS Code, and others, enabling them to interact directly with your Expo projects.

Introducing Expo MCP Server: for accurate, context-aware AI responses
Introducing Expo MCP Server: for accurate, context-aware AI responses

Enhance your AI-assisted tools for building apps with Expo.

What does Expo MCP Server do?

Expo MCP Server teaches your AI-assisted tools about the Expo SDK and lets them interact with mobile simulators and the React Native DevTools. These are some examples of the tasks Expo MCP Server enhances:

Learn about developing with Expo. Your AI-assisted tools can fetch the latest official Expo documentation on demand and use it to reply to prompts like:

  • "How do I use Expo Router?"
  • "Search the Expo docs for implementing deep linking"
  • "Read the Expo Router docs page"
  • "What is Expo CNG?"

Manage dependencies. Expo MCP Server guides you toward installing our recommended packages and uses npx expo install to install known, compatible versions.

  • "Add SQLite with basic CRUD operations"
  • "Install expo-camera and show me how to take photos"
  • "Add expo-notifications for push notifications"

Manage builds and workflows. Expo MCP Server can trigger and monitor EAS builds, run workflows, and pull crash data from TestFlight:

  • "Investigate why my most recent iOS build on EAS failed"
  • "Identify any patterns in recent failing workflows"
  • "Create a workflow that runs Maestro tests"
  • "Show me recent TestFlight crashes"
  • "Show TestFlight feedback for my app"

Automate visual verification and testing. Multimodal AI-assisted tools can screenshot and interact with your running app in a simulator. Expo MCP Server includes local capabilities enabled by adding the expo-mcp package to your project's dependencies.

  • "Add a blue circle view and make sure it renders correctly"
  • "Add a button and tap it to verify the interaction works"
  • "Add a counter button that increments on tap and verify the state updates correctly"

Your AI-assisted tools can autonomously write the code, capture screenshots to verify the UI is correct, test interactions, and fix issues they find.

The complete table of MCP capabilities documents the tools and prompts Expo MCP Server provides to AI-assisted tools.

Prerequisites

Before using Expo MCP Server, ensure you have:

  • An Expo account with an EAS paid plan
  • An Expo project created either with npx create-expo-app@latest --template default@sdk-55 or has the latest expo package version installed
  • AI-assisted tools with remote MCP server support (Claude Code, Cursor, VS Code, and so on)

Installation and setup

1

Install Expo MCP Server

Expo MCP Server supports integration with various AI-assisted tools. Use the general settings below or expand your specific tool for detailed instructions:

  • Server type: Streamable HTTP
  • URL: https://mcp.expo.dev/mcp
  • Authentication: OAuth
Claude Code setup
Terminal
- claude mcp add --transport http expo-mcp https://mcp.expo.dev/mcp

After installation, run /mcp in your Claude Code session to authenticate.

Cursor setup

Click the following link to install the MCP server for Cursor:

Install MCP Server
VS Code setup
  1. Open Command Palette (Cmd ⌘ + Shift + P or Ctrl + Shift + P)
  2. Run MCP: Add Server
  3. Select HTTP
  4. Enter the server details:
    • URL: https://mcp.expo.dev/mcp
    • Name: expo-mcp
Codex setup
Terminal
- codex mcp add expo-mcp --url https://mcp.expo.dev/mcp

The above command adds the MCP server to your Codex configuration file and prompts you to authenticate with your Expo account.

2

Authenticate with Expo

After installing the MCP server, you'll need to authenticate using one of two methods:

Generate a Personal access token from your Expo account and use it during the OAuth flow.

  • To generate an access token, open Access tokens settings page in EAS dashboard.
  • Under Personal access tokens, click Create token. Copy the token and use it during the OAuth flow.

Credentials

Use your Expo account username and password. In this case, the server will generate an access token automatically.

3

Local capabilities are only available in SDK 54 and later.

For the full MCP experience with advanced features like taking screenshots from your iOS Simulator, opening DevTools, and automation capabilities, set up a local Expo development server:

Terminal
- cd /path/to/your-project

# Install the expo-mcp package
- npx expo install expo-mcp --dev

# Ensure you are logged in to Expo CLI with the same account as the one used to# authenticate with the MCP server
- npx expo whoami || npx expo login

# Start the dev server with MCP capabilities
- EXPO_UNSTABLE_MCP_SERVER=1 npx expo start
Whenever you start or stop the development server, you need to reconnect or restart your MCP server connection in your AI-assisted tool to ensure the AI-assisted tool gets refreshed capabilities.

Server capabilities versus local capabilities

Expo MCP Server provides two types of capabilities depending on your setup:

Server capabilities

Server capabilities are available with just the remote MCP server connection, without needing to set up a local development server. The search_documentation tool is an example of a server capability.

Local capabilities

Local capabilities require a local Expo development server to be running and provide advanced features that interact with your local development environment:

  • Automation tools: Take screenshots, tap views, find elements by testID
  • Development tools: Open React Native DevTools
  • Project analysis: Generate expo-router sitemap

These capabilities enable more sophisticated workflows like automated testing, visual verification, and deeper project introspection. To use local capabilities, you will need to follow the Set up local capabilities section above.

Available MCP capabilities

The MCP capabilities are subject to change from the expo-mcp package updates or MCP server changes. The following list is a reference and may not be up to date.

Tools

ToolDescriptionExample PromptAvailability
add_libraryAdd an Expo library to the project using expo install and attach usage instructions when available."add sqlite and basic CRUD to the app"Server
search_documentationSearch the official Expo documentation and return page URLs ranked by relevance for a user query. Use read_documentation to fetch the full content of specific pages, starting from the top."search documentation for CNG"Server
read_documentationFetch a single Expo documentation page and return its content as markdown. Returns up to ~5000 tokens per call. Use offset to paginate through long pages."read the Expo Router docs page"Server
learnLearn Expo how-to for a specific topic and remember it for future conversations. Use this to teach the assistant about specific Expo features or workflows."learn how to use expo-router"Server
workflow_createCreates a new EAS workflow YAML file for Expo projects or fetches workflow syntax documentation. Use this when users want to create CI/CD workflows in .eas/workflows/ or need to learn EAS workflow syntax. After creating, use workflow_validate to validate the file."create a CI/CD workflow for building and deploying"Server
workflow_infoFetches detailed information about a specific EAS workflow run by ID. Use this to check the status, job results, errors, and artifacts of a workflow run. If workflow has multiple jobs, draw them in a diagram to show the dependencies between jobs."get the status of the latest workflow run"Server
workflow_listLists recent EAS workflow runs for a project. Provide either appId (from app.json "extra.eas.projectId") OR appFullName (e.g., "@owner/my-app")."list the recent workflow runs"Server
workflow_logsFetches logs for a specific job in an EAS workflow run. Call without sectionIndex or phase to get a summary of log sections (phase names and line ranges); then call again with sectionIndex or phase to fetch that section."show me the logs for the build job in the workflow"Server
workflow_runTriggers an EAS workflow run from a git reference. Provide either appId (from app.json "extra.eas.projectId") OR appFullName (e.g., "@owner/my-app"). The workflow file must exist at the specified git reference."run the build-and-deploy workflow"Server
workflow_cancelCancels a running EAS workflow. Use workflow_info to get the workflow run ID."cancel the running workflow"Server
workflow_validateValidates EAS workflow YAML syntax and configuration. Use this after creating a workflow to ensure it is valid. Provide either appId (from app.json "extra.eas.projectId") OR appFullName (e.g., "@owner/my-app")."validate my workflow file"Server
build_listLists EAS builds for a project. Provide either appId (from app.json "extra.eas.projectId") OR appFullName (e.g., "@owner/my-app"). Use this to see recent builds, their status, and available artifacts."list the recent builds for this project"Server
build_infoFetches the status and detailed information about a specific EAS build by ID. Use this to check build status, errors, artifacts, and other details."get the status of my latest iOS build"Server
build_logsFetches the logs for a specific EAS build. The build must be completed (finished or errored) to have logs available."show me the logs for the failed build"Server
build_submitSubmits an EAS build to the app store (Google Play Store for Android, App Store for iOS). The build must be a finished build with the appropriate distribution type. Provide either appId (from app.json "extra.eas.projectId") OR appFullName (e.g., "@owner/my-app")."submit the latest build to the App Store"Server
build_runTriggers a new EAS build using a build profile from eas.json. Requires a GitHub repository to be connected to the project. Provide either appId (from app.json "extra.eas.projectId") OR appFullName (e.g., "@owner/my-app")."run a production build for iOS"Server
build_cancelCancels an EAS build that is queued or in progress. Use build_info to check the current status first."cancel the build that is currently in progress"Server
testflight_crashesFetch TestFlight crash data. Without crashId, lists recent crashes. With crashId, returns the full crash log with stack trace."show me recent TestFlight crashes"Server
testflight_feedbackFetch screenshot feedback from TestFlight. Returns feedback metadata including device info, user comments, and screenshot URLs."show TestFlight feedback for my app"Server
expo_router_sitemapQuery the all routes of the current expo-router project. This is useful if you were using expo-router and want to know all the routes of the app."check the expo-router-sitemap output"Local (requires expo-router library)
open_devtoolsOpen the React Native DevTools."open devtools"Local
collect_app_logsCollect logs from native device (logcat/syslog) or JavaScript console."collect app logs from the iOS simulator"Local
automation_tapTap on the device at the given coordinates (x, y) or by react-native testID. Provide either (x AND y) or testID."tap the screen at x=12, y=22"Local
automation_take_screenshotTake screenshot of the full app or a specific view by react-native testID. Optionally provide testID to screenshot a specific view."take a screenshot and verify the blue circle view"Local
automation_find_viewFind view and dump its properties. This is useful to verify the view is rendered correctly."dump properties for testID 'button-123'"Local

Prompts

If your AI-assisted tool supports MCP prompts, you may see additional menu options, such as slash commands in Claude Code:

PromptDescriptionAvailability
expo_router_sitemapQuery the all routes of the current expo-router project using expo-router-sitemap.Local

Limitations

The current implementation has the following limitations:

  • Only supports a single development server connection at a time
  • iOS support for local capabilities is limited to simulators only (physical devices not yet supported)
  • iOS support for local capabilities is only available on macOS hosts.

Additional resources

Model Context Protocol Documentation

Learn more about the MCP specification and protocol details.