Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

edwardshez/ClaudeComputerCommander

Open more actions menu
 
 

Repository files navigation

Claude Computer Commander

A terminal server that allows Claude to execute commands on your computer and manage processes through Model Context Protocol (MCP).

Features

  • Execute terminal commands with output streaming
  • Command timeout and background execution support
  • Process management (list and kill processes)
  • Session management for long-running commands

Setup

  1. Clone the repository:
git clone https://github.com/wonderwhy-er/ClaudeComputerCommander.git
cd ClaudeComputerCommander
  1. Build and setup the server:
npm run setup

This command will:

  • Install dependencies
  • Build the server
  • Create a config file for Claude's desktop app if it doesn't exist
  • Add MCP server to Claude's config file if its not there
  • It will also add Puppeteer fir browser automation and File editing servers
  • Afterwards start the Claude and you should have access

Usage

The server provides the following tools:

  • execute_command: Execute terminal commands with configurable timeout
    • Commands that don't complete within the timeout continue running in background
    • Use read_output to get new output from long-running commands
  • read_output: Get new output from a running command by PID
  • force_terminate: Stop a running command session
  • list_sessions: View all currently running command sessions
  • list_processes: View all system processes
  • kill_process: Terminate a process by PID

Handling Long-Running Commands

When executing commands that may take a while to complete:

  1. The execute_command tool will return after a timeout (default: 1 second) with initial output
  2. If the command is still running, it continues in the background
  3. Use read_output with the returned PID to get any new output
  4. Use force_terminate to stop a running command if needed

Model Context Protocol Integration

This project demonstrates the integration with Anthropic's Model Context Protocol (MCP), which allows AI assistants to interact with local systems. Key differences from OpenAI's Custom GPT actions:

  • Local server support in Claude Desktop (vs. only internet-hosted actions in ChatGPT)
  • Uses MCP tool calls instead of OpenAPI schemas
  • Runs locally through Claude Desktop's MCP system

Created as part of exploring Claude MCPs: https://youtube.com/live/TlbjFDbl5Us

License

MIT

About

This is MCP server for Claude that gives it terminal control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 70.6%
  • JavaScript 29.4%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.