Linux Command MCP (Model Context Protocol)
About
MCP server and client for running Linux commands
Details
- Author
- xkiranj
- GitHub stars
- 25
- Downloads
- 539
- Categories
- Other
Jump to
- Execute Linux commands via MCP client
- Supports interactive scripts with stdin input
- No sudo execution requiring password prompts
- PM2 process management for server reliability
- Client commands: exec, list, help, exit
- Uses absolute paths in configuration
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Linux Command MCP (Model Context Protocol)Command (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install Node.js v18+, npm, and PM2. Clone the repository, then install and build both server and client. Configure the server in claude_desktop_config.json with an absolute path to the built index.js. Start the server with PM2 via npm run pm2:start. Use the client by running npm start and then issuing commands like exec "ls -l" or list /home. The server also supports an optional stdin parameter for interactive scripts.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"linux command mcp (model context protocol)": {
"linux-command": {
"command": "node",
"args": [
"/full/path/to/linux-command-mcp/server/dist/index.js"
]
}
}
}
}
McpServers
{
"linux-command": {
"command": "node",
"args": [
"/full/path/to/linux-command-mcp/server/dist/index.js"
]
}
}
Linux Command MCP (Model Context Protocol)
Overview
Linux Command MCP is a remote command execution system built using the Model Context Protocol (MCP), allowing secure and standardized execution of Linux commands.
Configuration for Claude Desktop MCP Servers
Understanding the Configuration
The MCP servers are configured in the claude_desktop_config.json file, typically located at ~/.config/Claude/claude_desktop_config.json.
Configuration Structure
"mcpServers": {
"server-name": {
"command": "node|npx|uvx",
"args": ["server-specific-arguments"],
"env": {
"OPTIONAL_ENVIRONMENT_VARIABLES": "value"
}
}
}
Linux Command MCP Server Configuration
"linux-command": {
"command": "node",
"args": [
"/full/path/to/linux-command-mcp/server/dist/index.js"
]
}
Configuration Explained
-"command": Specifies the executor (node, npx, uvx)
- "args": Full path to the server's executable
- Ensure the path is an absolute path to your index.js
Important Configuration Tips
- Always use full, absolute paths - Verify file permissions - Ensure the specified file is executablePrerequisites
- Node.js (v18.x or later)
- npm
- PM2 (for process management)
Installation
1. Clone the repository
git clone <repository-url>
cd linux-command-mcp
2. Install server dependencies
cd server
npm install
npm run build
3. Install client dependencies
cd ../client
npm install
npm run build
Usage
Starting the Server
1. Navigate to the server directory
cd server
2. Start with PM2
npm run pm2:start
Using the Client
Available Commands:
1. exec <command> - Execute a Linux command
2. list [directory] - List directory contents
3. help - Show this help
4. exit - Exit the client
Execute commands directly:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



