Shell and coding agent on claude desktop app
Empowering chat applications to code, build and run on your local machine.
⚠️ Warning: do not allow BashCommand tool without reviewing the command, it may result in data loss.
[24 Mar 2025] Improved writing and editing experience for sonnet 3.7, CLAUDE.md gets loaded automatically.
[16 Feb 2025] You can now attach to the working terminal that the AI uses. See the "attach-to-terminal" section below.
[15 Jan 2025] Modes introduced: architect, code-writer, and all powerful wcgw mode.
[8 Jan 2025] Context saving tool for saving relevant file paths along with a description in a single file. Can be used as a task checkpoint or for knowledge transfer.
[29 Dec 2024] Syntax checking on file writing and edits is now stable. Made initialize
tool call useful; sending smart repo structure to claude if any repo is referenced. Large file handling is also now improved.
[9 Dec 2024] Vscode extension to paste context on Claude app
task id
". The saved file can be used to do other kinds of knowledge transfer, such as taking help from another AI.screen -x
to attach to the terminal that the AI runs commands on. See history or interrupt process or interact with the same terminal that AI uses.First install uv
using homebrew brew install uv
(Important: use homebrew to install uv. Otherwise make sure uv
is present in a global location like /usr/bin/)
Then create or update claude_desktop_config.json
(~/Library/Application Support/Claude/claude_desktop_config.json) with following json.
{
"mcpServers": {
"wcgw": {
"command": "uv",
"args": [
"tool",
"run",
"--from",
"wcgw@latest",
"--python",
"3.12",
"wcgw_mcp"
]
}
}
}
Then restart claude app.
If there's an error in setting up
uv
is installed. Then run 'which uv' in the terminal, and use its output in place of "uv" in the configuration.uv tool run --from wcgw@latest --python 3.12 wcgw_mcp
runs in your terminal. It should have no output and shouldn't exit.uv
version 0.6.0
for which this tool was tested.npx @modelcontextprotocol/[email protected] uv tool run --from wcgw@latest --python 3.12 wcgw_mcp
This mcp server works only on wsl on windows.
To set it up, install uv
Then add or update the claude config file %APPDATA%\Claude\claude_desktop_config.json
with the following
{
"mcpServers": {
"wcgw": {
"command": "wsl.exe",
"args": [
"uv",
"tool",
"run",
"--from",
"wcgw@latest",
"--python",
"3.12",
"wcgw_mcp"
]
}
}
}
Wait for a few seconds. You should be able to see this icon if everything goes right.
over here
Then ask claude to execute shell commands, read files, edit files, run your code, etc.
There are three built-in modes. You may ask Claude to run in one of the modes, like "Use 'architect' mode"
Mode | Description | Allows | Denies | Invoke prompt |
---|---|---|---|---|
Architect | Designed for you to work with Claude to investigate and understand your repo. | Read-only commands | FileEdit and Write tool | Run in mode='architect' |
Code-writer | For code writing and development | Specified path globs for editing or writing, specified commands | FileEdit for paths not matching specified glob, Write for paths not matching specified glob | Run in code writer mode, only 'tests/**' allowed, only uv command allowed |
**wcgw** | Default mode with everything allowed | Everything | Nothing | No prompt, or "Run in wcgw mode" |
Note: in code-writer mode either all commands are allowed or none are allowed for now. If you give a list of allowed commands, Claude is instructed to run only those commands, but no actual check happens. (WIP)
If you've screen
command installed, wcgw runs on a screen instance automatically. If you've started wcgw mcp server, you can list the screen sessions:
screen -ls
And note down the wcgw screen name which will be something like 93358.wcgw.235521
where the last number is in the hour-minute-second format.
You can then attach to the session using screen -x 93358.wcgw.235521
You may interrupt any running command safely.
You can interact with the terminal but beware that the AI might be running in parallel and it may conflict with what you're doing. It's recommended to keep your interactions to minimum.
You shouldn't exit the session using exit
or Ctrl-d, instead you should use ctrl+a+d
to safely detach without destroying the screen session.
https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw
Commands:
cmd+'
and then enter instructions. This will switch the app to Claude and paste a text containing your instructions, file path, workspace dir, and the selected text.Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
First build the docker image docker build -t wcgw https://github.com/rusiaaman/wcgw.git
Then you can update /Users/username/Library/Application Support/Claude/claude_desktop_config.json
to have
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount",
"type=bind,src=/Users/username/Desktop,dst=/workspace/Desktop",
"wcgw",
]
}
}
}
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.
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.
The server provides the following MCP tools:
Shell Operations:
Initialize
: Reset shell and set up workspace environment
any_workspace_path
(string), initial_files_to_read
(string[]), mode_name
("wcgw"|"architect"|"code_writer"), task_id_to_resume
(string)BashCommand
: Execute shell commands with timeout control
command
(string), wait_for_seconds
(int, optional)send_text
(string) or send_specials
(["Enter"|"Key-up"|...]) or send_ascii
(int[]), wait_for_seconds
(int, optional)File Operations:
ReadFiles
: Read content from one or more files
file_paths
(string[])WriteIfEmpty
: Create new files or write to empty files
file_path
(string), file_content
(string)FileEdit
: Edit existing files using search/replace blocks
file_path
(string), file_edit_using_search_replace_blocks
(string)ReadImage
: Read image files for display/processing
file_path
(string)Project Management:
ContextSave
: Save project context and files for Knowledge Transfer or saving task checkpoints to be resumed later
id
(string), project_root_path
(string), description
(string), relevant_file_globs
(string[])All tools support absolute paths and include built-in protections against common errors. See the MCP specification for detailed protocol information.