MCP Server for AI Integration
Enable AI coding assistants like Claude, Cursor, and Copilot to access accurate react-native-nitro-device-info documentation through the MCP (Model Context Protocol) server.
What is MCP?
MCP (Model Context Protocol) is an open protocol by Anthropic that enables AI tools to access external data sources and tools. The MCP server for react-native-nitro-device-info allows AI assistants to:
- Provide accurate API documentation instead of hallucinating
- Generate correct TypeScript code with proper types
- Answer platform-specific questions (iOS vs Android)
- Help troubleshoot common issues
Quick Setup (Recommended)
Run the init command in your React Native project to automatically configure MCP for Cursor and Claude Code:
This creates:
.cursor/mcp.json- Cursor IDE configuration.mcp.json- Claude Code project configuration
Then restart your IDE and start asking questions!
Manual Installation
Using npx
No installation required. Configure your AI tool to run:
Global Installation
Then run:
Manual Configuration
Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
After saving, restart Claude Desktop completely (Cmd+Q, then reopen).
Cursor IDE
Create .cursor/mcp.json in your project root:
Other MCP Clients
For any MCP-compatible client using stdio transport:
Available Tools
The MCP server provides three tools:
Usage Examples
Basic API Questions
"How do I get the device's battery level?"
The AI will query the MCP server and provide:
API Discovery
"What APIs are available for network information?"
Platform-Specific Questions
"Why does getIpAddress return empty on iOS simulator?"
Code Generation
"Generate code to display all device info on a screen"
Verification
After configuration, verify the MCP server is working:
- Ask your AI tool: "What tools does the nitro-device-info MCP server provide?"
- Expected response should mention
search_docs,get_api, andlist_apis
Troubleshooting
Server Not Loading
-
Check Node.js version (requires v20.0.0+):
-
Verify npx works:
-
Test server directly:
-
Check Claude Desktop logs (macOS):
Common Issues
Requirements
- Node.js 20.0.0 or higher
- npm 10.0.0 or higher
- MCP-compatible AI tool (Claude Desktop, Cursor, etc.)
