{"id":28125984,"url":"https://github.com/hormold/mcp-command-proxy","last_synced_at":"2026-02-27T17:45:25.336Z","repository":{"id":281400526,"uuid":"945174897","full_name":"Hormold/mcp-command-proxy","owner":"Hormold","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-08T21:25:35.000Z","size":89,"stargazers_count":11,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T13:39:08.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hormold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-08T20:37:04.000Z","updated_at":"2025-10-21T20:38:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e1934ad-6393-45ba-bbcf-63b0896ed511","html_url":"https://github.com/Hormold/mcp-command-proxy","commit_stats":null,"previous_names":["hormold/mcp-command-proxy"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Hormold/mcp-command-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fmcp-command-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fmcp-command-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fmcp-command-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fmcp-command-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hormold","download_url":"https://codeload.github.com/Hormold/mcp-command-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fmcp-command-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29906853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-14T10:23:01.342Z","updated_at":"2026-02-27T17:45:25.306Z","avatar_url":"https://github.com/Hormold.png","language":"TypeScript","funding_links":[],"categories":["Command Line"],"sub_categories":["How to Submit"],"readme":"# MCP Command Proxy\n\nAn 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.\n\n## How to use in Cursor (Expo example)\n\n1. Go to the directory of your Expo project\n2. Run `npx mcp-command-proxy --prefix \"ExpoServer\" --command \"expo start\" --port 8383`\n3. Go to Cursor settings -\u003e MCP -\u003e +Add new MCP server, like this:  \n![add_mcp_server](guide/add_mcp.png)\n4. Set the name to \"ExpoServer\", Type to \"SSE\", URL to `http://localhost:8383/sse`\n5. Click \"Save\" and you should now be able to use the MCP server in Cursor. Like this:\n![mcp_server_in_cursor](guide/result.png)\n\nRecommended to use the `--port 8383` flag to avoid conflicts with other servers.\nAlso, you can add following instruction to .cursorrules file:\n```\nYou 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.\n```\n\n\n## Features\n\n- **Command Proxying**: Run any CLI command through the MCP server\n- **Log Collection**: Capture and store logs from running processes (configurable buffer size)\n- **Key Press Forwarding**: Forward key presses from client to the running process\n- **Transparent Experience**: The end user sees the command output exactly as if they ran it directly\n- **Interactive Commands**: Works with interactive CLI tools like Expo\n- **MCP Integration**: Built using the MCP SDK for easy integration with Claude and other MCP-enabled AI assistants\n\n## How It Works\n\n1. The server starts a specified command in a pseudo-terminal (PTY)\n2. All stdout/stderr output is:\n   - Streamed to the client in real-time\n   - Stored in a circular buffer (configurable size, default 300 lines)\n3. Key presses from the client are forwarded to the running process\n4. The server provides tools to:\n   - View collected logs\n   - Send key presses to the process\n   - Get the current state of the process\n\n## Use Cases\n\n- **Expo Development**: Run `expo start` and interact with it while collecting logs\n- **Build Processes**: Monitor build processes and analyze logs\n- **Long-running Services**: Monitor services and keep recent log history\n- **Remote Command Execution**: Execute and monitor commands from remote clients\n\n## Requirements\n\n- Node.js 18+ \n- TypeScript\n- pnpm (recommended) or npm\n\n## Installation\n\n```bash\n# Install dependencies\npnpm install\n\n# Build the project\npnpm build\n\n# Run directly\npnpm start -- --prefix \"MyServer\" --command \"expo start\"\n\n# Or install globally\npnpm install -g\nmcp-command-proxy --prefix \"MyServer\" --command \"expo start\"\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Using the CLI\nmcp-command-proxy --prefix \"ExpoServer\" --command \"expo start\"\n\n# Or programmatically\nimport { createServer } from 'mcp-command-proxy';\n\nconst server = await createServer({\n  prefix: 'ExpoServer',\n  command: 'expo start',\n  bufferSize: 500,\n  port: 8080\n});\n\n// To stop the server later\nserver.stop();\n```\n\n### Options\n\n- `--prefix, -p`: Name/prefix for the server (default: \"CommandProxy\")\n- `--command, -c`: Command to run (required)\n- `--buffer-size, -b`: Number of log lines to keep in memory (default: 300)\n- `--port`: Port for HTTP server (default: 8080)\n- `--help, -h`: Show help\n\n### MCP Integration\n\nThis server implements the following MCP tools:\n\n1. `getRecentLogs`: Returns the most recent logs from the buffer\n   - Parameters: \n     - `limit` (optional): Number of logs to return (default: 100)\n     - `types` (optional): Types of logs to include (stdout, stderr, system) (default: all)\n\n2. `sendKeyPress`: Sends a key press to the running process\n   - Parameters:\n     - `key`: Key to send (e.g. \"enter\", \"a\", \"1\", \"space\")\n\n3. `getProcessStatus`: Returns the current status of the process\n   - Parameters: None\n\n## Examples\n\n### Running Expo Start\n\n```bash\nmcp-command-proxy -p \"ExpoServer\" -c \"expo start\" -b 500\n```\n\n### Using with Claude\n\n1. Configure Claude to connect to this MCP server (SSE endpoint: http://localhost:8080/sse)\n2. Ask Claude to run Expo or other commands\n3. Claude can analyze logs and help troubleshoot issues\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/hormold/mcp-command-proxy.git\ncd mcp-command-proxy\n\n# Install dependencies\npnpm install\n\n# Build the project\npnpm build\n\n# Run in development mode\npnpm dev\n```\n\n## License\n\nMIT ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhormold%2Fmcp-command-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhormold%2Fmcp-command-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhormold%2Fmcp-command-proxy/lists"}