mcp-server-commands logo

mcp-server-commands

by g0t4

This server provides tools for Large Language Models (LLMs) to execute commands and scripts on a system. It's designed to be used with applications like the Claude Desktop app, allowing the LLM to interact with the operating system.

View on GitHub

Last updated: N/A

What is mcp-server-commands?

mcp-server-commands is a server that exposes two tools to LLMs: run_command and run_script. run_command allows the LLM to execute arbitrary commands, while run_script enables the LLM to run scripts by passing the script content over STDIN.

How to use mcp-server-commands?

To use with Claude Desktop, configure the server in the claude_desktop_config.json file, specifying the command and arguments to launch the server. You can use the published npm package or a local build. Be cautious with the commands you allow the server to run and use the Approve Once option in Claude Desktop.

Key features of mcp-server-commands

  • Execute arbitrary commands

  • Execute scripts with STDIN

  • Integration with Claude Desktop

  • Logging to STDERR

  • Debugging support with MCP Inspector

Use cases of mcp-server-commands

  • Running system commands (e.g., hostname, ls)

  • Executing code written by the LLM

  • Creating new files using cat as an interpreter

  • Automating tasks through script execution

FAQ from mcp-server-commands

How do I install the server?

You can install it using npm (npm install) and build it (npm run build). Alternatively, you can use the published npm package.

How do I configure the server with Claude Desktop?

Add the server configuration to the claude_desktop_config.json file, specifying the command and arguments to launch the server.

How can I see more detailed logs?

Add the --verbose flag to the args in the server configuration to enable more verbose logging.

How do I debug the server?

Use the MCP Inspector by running npm run inspector. This will provide a URL to access debugging tools in your browser.

What are the security considerations?

Be careful what commands you allow the server to run. Use Approve Once in Claude Desktop and do not run the server with sudo.