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.
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:
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 configurationThen restart your IDE and start asking questions!
No installation required. Configure your AI tool to run:
Then run:
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).
Create .cursor/mcp.json in your project root:
For any MCP-compatible client using stdio transport:
The MCP server provides three tools:
| Tool | Purpose | Example Query |
|---|---|---|
search_docs |
Natural language documentation search | "how to get device model" |
get_api |
Detailed info about a specific API | "show me getBatteryLevel" |
list_apis |
List APIs by category/platform/type | "list all network APIs" |
"How do I get the device's battery level?"
The AI will query the MCP server and provide:
"What APIs are available for network information?"
"Why does getIpAddress return empty on iOS simulator?"
"Generate code to display all device info on a screen"
After configuration, verify the MCP server is working:
search_docs, get_api, and list_apisCheck Node.js version (requires v20.0.0+):
Verify npx works:
Test server directly:
Check Claude Desktop logs (macOS):
| Issue | Cause | Solution |
|---|---|---|
| "command not found" | Node.js not in PATH | Reinstall Node.js or add to PATH |
| "npm ERR! 404" | Package not published | Wait for npm publish or build from source |
| JSON parse error | Invalid config syntax | Check for trailing commas, quotes |
| Server timeout | Slow network/registry | Use global install for offline use |