Skip to main content

What could go wrong giving full shell access to chatgpt?

Project description

Shell and Coding agent for Claude and Chatgpt

  • Claude - An MCP server on claude desktop for autonomous shell, coding and desktop control agent.
  • Chatgpt - Allows custom gpt to talk to your shell via a relay server.

Tests Mypy strict Build

Updates

  • [01 Dec 2024] Removed author hosted relay server for chatgpt.

  • [26 Nov 2024] Introduced claude desktop support through mcp

🚀 Highlights

  • Full Shell Access: No restrictions, complete control.
  • Desktop control on Claude: Screen capture, mouse control, keyboard control on claude desktop (on mac with docker linux)
  • Create, Execute, Iterate: Ask claude to keep running compiler checks till all errors are fixed, or ask it to keep checking for the status of a long running command till it's done.
  • Interactive Command Handling: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.
  • REPL support: [beta] Supports python/node and other REPL execution.

Claude Setup

Update claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json)

{
  "mcpServers": {
    "wcgw": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "wcgw@latest",
        "--python",
        "3.12",
        "wcgw_mcp"
      ]
    }
  }
}

Then restart claude app.

[Optional] Computer use support using desktop on docker

Computer use is disabled by default. Add --computer-use to enable it. This will add necessary tools to Claude including ScreenShot, Mouse and Keyboard control.

{
  "mcpServers": {
    "wcgw": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "wcgw@latest",
        "--python",
        "3.12",
        "wcgw_mcp",
        "--computer-use"
      ]
    }
  }
}

Claude will be able to connect to any docker container with linux environment. Native system control isn't supported outside docker.

You'll need to run a docker image with desktop and optional VNC connection. Here's a demo image:

docker run -p 6080:6080 ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest

Then ask claude desktop app to control the docker os. It'll connect to the docker container and control it.

Connect to http://localhost:6080/vnc.html for desktop view (VNC) of the system running in the docker.

Usage

Wait for a few seconds. You should be able to see this icon if everything goes right.

mcp icon over here

mcp icon

Then ask claude to execute shell commands, read files, edit files, run your code, etc.

If you've run the docker for LLM to access, you can ask it to control the "docker os". If you don't provide the docker container id to it, it'll try to search for available docker using docker ps command.

Chatgpt Setup

Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md

Examples

Computer use example

computer-use

Shell example

example

[Optional] Local shell access with openai API key or anthropic API key

Openai

Add OPENAI_API_KEY and OPENAI_ORG_ID env variables.

Then run

uvx --from wcgw@latest wcgw_local --limit 0.1 # Cost limit $0.1

You can now directly write messages or press enter key to open vim for multiline message and text pasting.

Anthropic

Add ANTHROPIC_API_KEY env variable.

Then run

uvx --from wcgw@latest wcgw_local --claude

You can now directly write messages or press enter key to open vim for multiline message and text pasting.

Project details


Release history Release notifications | RSS feed

This version

2.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wcgw-2.0.2.tar.gz (597.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wcgw-2.0.2-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file wcgw-2.0.2.tar.gz.

File metadata

  • Download URL: wcgw-2.0.2.tar.gz
  • Upload date:
  • Size: 597.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for wcgw-2.0.2.tar.gz
Algorithm Hash digest
SHA256 f174bcda851e880885ada90853a844b115277906511406627a3655d46def38ab
MD5 953435691ce99e7a5cd3fe31afb10d35
BLAKE2b-256 3500ae225c58bb3db73a31b5d08b09b71257d97339410cebfbca015c09a6e607

See more details on using hashes here.

File details

Details for the file wcgw-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: wcgw-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for wcgw-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 261f0d4377db8303bae62a9d854dde6bf59c19f9baf4948010d9d5566767d9d7
MD5 4c806d2d9dde6fd8eff9dd3b1fe16781
BLAKE2b-256 06d0ddf02f3a171387fb7e69203846a2f2f34d70a6d849fdf37e04a22c9f0d15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page