# Set Up Deep Linking with Cursor + MCP Server > A complete walkthrough to install the MCP server, configure Cursor, ask it to set up deep links, and verify results with AI-assisted automation. - Canonical: https://redirectly.app/blog/cursor-mcp-deep-linking - Site: [Redirectly](https://redirectly.app) — deferred deep linking for Flutter & React Native - Published: 2026-03-07 - Author: Dmytro Vyrych - Category: AI Tools · 10 min read Harness the power of AI-native development. Use Cursor with Redirectly's MCP server to automate and streamline your deep linking setup in minutes. ## What is MCP & Why Use It? **Model Context Protocol:** MCP is an open protocol that connects AI systems like Cursor to external tools and services. It enables AI editors to understand your codebase, access APIs, and execute tasks with precise context—transforming them from general-purpose assistants into specialized tools for your specific workflow. **Benefits for Deep Linking:** - Automate repetitive configuration - AI understands your project structure - Generate platform-specific code - Real-time verification & feedback - Eliminate manual errors - 10x faster setup time **AI-Native Workflow:** - No context switching between tools - Ask natural language questions - Cursor handles all implementation - Multi-file edits in seconds - Instant code generation - Built-in testing & verification ## Install the Redirectly MCP Server ### Step 1: Install via npm The Redirectly MCP server is available on npm. Install it globally or locally in your project: ```bash npm install -g @redirectly/mcp-server ``` **Tip:** Global installation makes the server available from any directory. ### Step 2: Verify Installation Verify that the MCP server is installed correctly: ```bash redirectly-mcp --version ``` You should see a version number like `1.0.0` ## Configure Cursor ### Step 1: Open Cursor Settings Open Cursor and access the MCP configuration: 1. Press `Cmd/Ctrl + K` to open Command Palette 2. Search for "MCP" or "Model Context Protocol" 3. Select "Cursor Settings: MCP" 4. Open the JSON configuration file ### Step 2: Add Redirectly MCP Server Add the Redirectly MCP server to your Cursor configuration: ```json { "mcpServers": { "redirectly": { "command": "redirectly-mcp", "args": [], "env": { "REDIRECTLY_API_KEY": "your-api-key-here" } } } } ``` ### Step 3: Set Your API Key Get your API key from Redirectly and add it to the configuration. Visit [your dashboard](https://dashboard.redirectly.app/dashboard) to find your API key. **Security:** Never commit your API key to version control. Use environment variables or a .env.local file instead. ### Step 4: Restart Cursor Close and reopen Cursor to apply the new MCP server configuration. ```text Cmd/Ctrl + Q to quit Cursor Reopen Cursor from your applications ``` ## Ask Cursor to Set Up Deep Links ### Natural Language Prompts Now you can ask Cursor to handle deep linking setup directly. Use natural language to describe what you need: ### Example 1: Flutter iOS Setup Ask Cursor to set up Universal Links for iOS: ```text @redirectly Set up Universal Links for iOS in my Flutter app. My domain is myapp.com. Configure Associated Domains, create the AASA file, and add the deep link handler to my main.dart. ``` ### Example 2: Android App Links Setup Ask Cursor to configure Android App Links: ```text @redirectly Configure App Links for Android in my React Native app. Domain: myapp.com App packages: com.myapp.dev, com.myapp.prod Add all required manifest configurations and deep link handlers. ``` ### Example 3: Full Stack Setup Ask for complete deep linking implementation across platforms: ```text @redirectly Set up complete deep linking for my app: - iOS: Universal Links for myapp.com and www.myapp.com - Android: App Links for the same domains - Create AASA file and assetlinks.json - Configure routing for /products/:id, /users/:id, and /share/:code paths - Add handlers to my app startup code ``` ### How It Works When you use the @redirectly mention, Cursor: - Analyzes your project structure and configuration - Accesses the Redirectly MCP server for best practices - Generates platform-specific configuration files - Creates or updates all necessary source code - Provides testing guidance and verification steps ## Verify Your Results ### Check Generated Files After Cursor completes the setup, verify that all necessary files have been created: ```bash # iOS ls ios/Runner.xcodeproj/ # Android ls android/app/src/ # Web (AASA file) ls web/.well-known/apple-app-site-association ``` ### Test on Device Build and test your app on real devices to verify deep linking works: - **iOS:** Run `flutter run` on a real device and test with deep links in Notes or Safari - **Android:** Test with adb command to trigger deep links: `adb shell am start -a android.intent.action.VIEW -d "myapp.com/products/123"` ### Use Redirectly's Verification Tools Validate your configuration using the online tools: - [AASA Validator](https://redirectly.app/aasa-validator.md) - [assetlinks.json Validator](https://redirectly.app/assetlinks-validator.md) ## Troubleshooting ### MCP Server Not Connecting **Issue:** Cursor doesn't recognize the @redirectly mention **Solution:** - Verify the MCP server installed: `redirectly-mcp --version` - Check MCP configuration in Cursor settings - Restart Cursor completely - Check that API key is set correctly ### Generated Code Has Errors **Issue:** Cursor generated code that doesn't compile **Solution:** - Provide more context in your initial request - Specify your project structure clearly - Ask Cursor to verify the generated code - Provide error messages for Cursor to fix ### API Key Issues **Issue:** "Invalid API key" or authentication errors **Solution:** - Visit [your dashboard](https://dashboard.redirectly.app/dashboard) to get a fresh API key - Update your Cursor MCP configuration - Ensure no extra spaces or quotes in the API key - Restart Cursor after updating ## Get Started with MCP Today Transform your deep linking workflow with AI-native development. Set up complex routing in minutes instead of hours. Learn more on the [MCP page](https://redirectly.app/mcp.md) or get your API key at https://dashboard.redirectly.app/. ## Related - [Vibe Coding with Deep Links](https://redirectly.app/blog/vibe-coding-deep-links.md) — Explore AI-native development workflows and how MCP servers revolutionize developer experience. - [Flutter Universal Links Setup](https://redirectly.app/blog/flutter-universal-links-ios-setup.md) — Learn the manual approach to deep linking configuration for complete understanding. --- Full site index for AI agents: https://redirectly.app/llms.txt