- Explore MCP Servers
- MCPRunner
Mcprunner
What is Mcprunner
MCPRunner is a lightweight CLI tool designed to simplify the execution of scripts with environment variables, specifically optimized for Cursor AI development workflows.
Use cases
Use cases for MCPRunner include starting development servers, running the Cursor AI MCP server, and any scenario where environment variables need to be set quickly and efficiently before executing commands.
How to use
To use MCPRunner, install it globally using npm or run it directly with npx. The basic command syntax is: npx mcprunner ENV_VAR1=value1 ENV_VAR2=value2 -- command_to_run.
Key features
Key features of MCPRunner include single command execution for scripts and environment variables, easy management of environment variables from the command line, integration with Cursor AI workflows, and cross-platform compatibility with macOS, Linux, and Windows.
Where to use
MCPRunner is primarily used in software development environments, particularly for projects involving Cursor AI and similar applications that require efficient management of environment variables.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcprunner
MCPRunner is a lightweight CLI tool designed to simplify the execution of scripts with environment variables, specifically optimized for Cursor AI development workflows.
Use cases
Use cases for MCPRunner include starting development servers, running the Cursor AI MCP server, and any scenario where environment variables need to be set quickly and efficiently before executing commands.
How to use
To use MCPRunner, install it globally using npm or run it directly with npx. The basic command syntax is: npx mcprunner ENV_VAR1=value1 ENV_VAR2=value2 -- command_to_run.
Key features
Key features of MCPRunner include single command execution for scripts and environment variables, easy management of environment variables from the command line, integration with Cursor AI workflows, and cross-platform compatibility with macOS, Linux, and Windows.
Where to use
MCPRunner is primarily used in software development environments, particularly for projects involving Cursor AI and similar applications that require efficient management of environment variables.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCPRunner
A lightweight CLI tool designed to simplify running scripts with environment variables, specifically optimized for Cursor AI development workflows.
🚀 Overview
MCPRunner streamlines the process of executing scripts with environment variables by combining these operations into a single command. It’s particularly useful for Cursor AI development, where managing environment configurations and starting the MCP server can become repetitive.
✨ Features
- Single Command Execution: Run scripts and load environment variables in one step
- Environment Variable Management: Easily set environment variables directly from the command line
- Cursor AI Integration: Optimized for Cursor AI MCP server workflows
- Cross-Platform: Works on macOS, Linux, and Windows
📦 Installation
npm install -g mcprunner
Or use directly with npx (recommended):
npx mcprunner [options]
🔧 Usage
The basic syntax for MCPRunner is:
npx mcprunner ENV_VAR1=value1 ENV_VAR2=value2 -- command_to_run
Where:
ENV_VAR1=value1 ENV_VAR2=value2are the environment variables you want to set--is the separator between environment variables and the commandcommand_to_runis the command you want to execute with those environment variables
Basic Usage
npx mcprunner PORT=3000 NODE_ENV=development -- npm start
With Cursor AI MCP Server
npx mcprunner MCP_PORT=3333 MCP_HOST=localhost DEBUG=true -- npm run mcp:server
📋 Examples
Starting a Development Server
# Set development environment variables and start the dev server
npx mcprunner NODE_ENV=development PORT=8080 API_URL=http://localhost:3000 -- npm run dev
Running Cursor AI MCP Server
# Set Cursor AI specific variables and start the MCP server
npx mcprunner MCP_PORT=3333 MCP_LOG_LEVEL=debug MCP_TIMEOUT=30000 -- node src/mcp/server.js
Chaining Multiple Commands
# Set environment variables and run multiple commands
npx mcprunner NODE_ENV=production -- npm run build && npm run start
🔍 How It Works
MCPRunner works by:
- Parsing the environment variables and command from your input
- Creating a temporary script file (
.shor.batdepending on your OS) - Writing the environment variables as export/set statements in the script
- Executing the script with your command
This approach ensures that the environment variables are properly set for the command execution, regardless of your operating system.
🔍 Why MCPRunner for Cursor AI?
When working with Cursor AI, you often need to:
- Set specific environment variables for the MCP server
- Start the MCP server with different configurations
- Maintain different environment settings for development/testing
MCPRunner simplifies this workflow into a single command, reducing the cognitive overhead and potential for configuration errors.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
👤 Author
Abdelrahman Hegab
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










