Using Model Context Protocol (MCP) with Expo
Edit
A guide on integrating Model Context Protocol with Expo projects to enhance AI model capabilities.
Expo MCP Server is currently in preview and is only available for EAS paid plan subscribers.
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 tools to understand your development environment more deeply, allowing them to provide better assistance with your codebase.
The Expo MCP server is a remote MCP server hosted at mcp.expo.dev that integrates with popular AI tools such as Claude Code, Cursor, VS Code, and others, enabling them to interact directly with your Expo projects.
Prerequisites
Before using the Expo MCP server, ensure you have:
- An expo.dev account (MCP server access is currently available for EAS paid plan subscribers only)
- An Expo project with Expo SDK 54 and the latest
expo
package version - AI tools with remote MCP server support (Claude Code, Cursor, VS Code and so on)
Installation and setup
1
Install the Expo MCP server
The Expo MCP server supports integration with various AI 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
2
Authenticate with Expo
After installing the MCP server, you'll need to authenticate using one of two methods:
Access token (recommended)
Generate a Personal access token from your Expo account and use it during the OAuth flow.
To generate an access token, open your EAS dashboard, navigate to Credentials > Access tokens > Personal access tokens, and then click Create token.
Credentials
Use your Expo account username and password. In this case, the server will generate an access token automatically.
3
Set up local capabilities (Recommended)
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:
-
cd /path/to/your-project
# Install expo-mcp package
-
npx expo install expo-mcp --dev
# Ensure you are logged in from CLI with the same account as the one used to authenticate with MCP server
-
npx expo whoami || npx expo login
# Start 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 tool to ensure the AI tool gets refreshed capabilities.
Server capabilities vs local capabilities
The 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 generate_agents_md 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 theexpo-mcp
package updates or MCP server changes. The following list is a reference and may not be up to date.
Tools
Tool | Description | Example Prompt | Availability |
---|---|---|---|
learn | Learn Expo how-to for a specific topic | "learn how to use expo-router" | Server |
search_documentation | Search from Expo documentation using natural language | "search documentation for CNG" | Server |
add_library | Install Expo packages with npx expo install and show documentation | "add sqlite and basic CRUD to the app" | Server |
generate_claude_md | Generate CLAUDE.md configuration files | "generate a CLAUDE.md for the project" | Server (Claude Code only) |
generate_agents_md | Generate AGENTS.md files | "generate an AGENTS.md file for the project" | Server |
expo_router_sitemap | Execute and display expo-router-sitemap output | "check the expo-router-sitemap output" | Local (requires expo-router library) |
open_devtools | Open React Native DevTools | "open devtools" | Local |
automation_tap | Tap at specific screen coordinates | "tap the screen at x=12, y=22" | Local |
automation_take_screenshot | Take full device screenshots | "take a screenshot and verify the blue circle view" | Local |
automation_find_view_by_testid | Find and analyze views by testID | "dump properties for testID 'button-123'" | Local |
automation_tap_by_testid | Tap views by testID | "click the view with testID 'button-123'" | Local |
automation_take_screenshot_by_testid | Screenshot specific views by testID | "screenshot the view with testID 'button-123'" | Local |
Prompts
If your AI tool supports MCP prompts, you may see additional menu options, such as slash commands in Claude Code:
Tool | Description | Availability |
---|---|---|
expo_router_sitemap | Execute and display expo-router-sitemap output | Local (requires expo-router library) |
onboarding | Display AGENTS.md content to the AI | Server |
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
Learn more about the MCP specification and protocol details.