Skip to main content
Glama

React Native Debugger MCP

by twodoorsdev
tool.spec.ts952 B
import { describe, expect, it } from 'bun:test'; import { readConsoleLogsFromApp } from './tool'; describe('readConsoleLogsFromApp', () => { it('should connect to Metro server and read logs', async () => { // First get the connected apps const metroServerOrigin = 'http://localhost:8081'; const response = await fetch(`${metroServerOrigin}/json/list`); const apps = await response.json(); if (!apps || apps.length === 0) { throw new Error( 'No connected apps found. Please ensure Metro is running and a React Native app is connected.', ); } console.log('Found connected apps:', JSON.stringify(apps, null, 2)); // Use the first connected app const app = apps[0]; console.log('Using app:', JSON.stringify(app, null, 2)); const logs = await readConsoleLogsFromApp(app, 5); console.log('Received logs:', JSON.stringify(logs, null, 2)); expect(Array.isArray(logs)).toBe(true); }, 10000); // 10 second timeout });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/twodoorsdev/react-native-debugger-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server