A proxy server that enables AI assistants to run and interact with command-line applications like Expo through the Model Context Protocol (MCP), capturing logs and allowing keypress forwarding.
An MCP (Model Context Protocol) server that acts as a proxy for CLI commands, specifically designed for Expo development but adaptable for any command-line application.
npx mcp-command-proxy --prefix "ExpoServer" --command "expo start" --port 8383
http://localhost:8383/sse
Recommended to use the --port 8383
flag to avoid conflicts with other servers.
Also, you can add following instruction to .cursorrules file:
You can use MCP getRecentLogs tool to get the most recent logs from Expo server. And if needed, you can send key presses to the running process using sendKeyPress tool.
expo start
and interact with it while collecting logs# Install dependencies pnpm install # Build the project pnpm build # Run directly pnpm start -- --prefix "MyServer" --command "expo start" # Or install globally pnpm install -g mcp-command-proxy --prefix "MyServer" --command "expo start"
# Using the CLI mcp-command-proxy --prefix "ExpoServer" --command "expo start" # Or programmatically import { createServer } from 'mcp-command-proxy'; const server = await createServer({ prefix: 'ExpoServer', command: 'expo start', bufferSize: 500, port: 8080 }); // To stop the server later server.stop();
--prefix, -p
: Name/prefix for the server (default: "CommandProxy")--command, -c
: Command to run (required)--buffer-size, -b
: Number of log lines to keep in memory (default: 300)--port
: Port for HTTP server (default: 8080)--help, -h
: Show helpThis server implements the following MCP tools:
getRecentLogs
: Returns the most recent logs from the buffer
limit
(optional): Number of logs to return (default: 100)types
(optional): Types of logs to include (stdout, stderr, system) (default: all)sendKeyPress
: Sends a key press to the running process
key
: Key to send (e.g. "enter", "a", "1", "space")getProcessStatus
: Returns the current status of the process
mcp-command-proxy -p "ExpoServer" -c "expo start" -b 500
# Clone the repository git clone https://github.com/hormold/mcp-command-proxy.git cd mcp-command-proxy # Install dependencies pnpm install # Build the project pnpm build # Run in development mode pnpm dev
MIT
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!