# agent-godmode [Health: Active]

**Category:** 📂 File Systems  
**Repository:** https://github.com/mdvohra/agent-godmode  
**GitHub Stars:** 0  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-godmode

## Description
Sandboxed workspace MCP: file ops, argv-only run_command, list_files; BYO LLM prompts.

## Tools
Capabilities this server exposes over MCP:

- **read_file** — Read a UTF-8 text file; optional line range and byte cap.
- **write_file** — Create or overwrite/append UTF-8 text; creates parent directories.
- **edit_file** — Search-and-replace in an existing UTF-8 file: non-empty `old_string`, optional `replace_all`. With `replace_all=false`, `old_string` must match **exactly once** (use surrounding context from `read_file` for uniqueness). Invalid UTF-8 returns an error instead of corrupting binary data.
- **list_files** — List directory entries with optional recursion, glob, depth cap, dotfile control.
- **run_command** — Run a subprocess from an **`argv` list only** (no shell); optional `cwd` under the root.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "agent-godmode": {
    "command": "uvx",
    "args": ["agent-godmode"],
    "env": {
      "AGENT_GODMODE_ROOT": ""
    }
  }
}
```

**Requires environment variables:** `AGENT_GODMODE_ROOT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What the agent-godmode MCP server does

The agent-godmode MCP server gives an MCP client a set of operations over one configured workspace. It can read UTF-8 text, create or modify text files, inspect directory contents, and start subprocesses. File paths are interpreted relative to the workspace root; absolute paths are accepted only when they resolve inside that root.

The package is intended for building Cursor-style agents, but it does not provide a hosted model. The application using it keeps the LLM connection and API credentials. Alongside the MCP interface, the same workspace operations are available in Python through `AgentWorkspace` and `WorkspaceTools`.

## How it works

A server process is started through the `agent-godmode` command and communicates with an MCP client over stdio. The workspace root comes from `--root` or `AGENT_GODMODE_ROOT`; a command-line root takes precedence for that process. Every file operation uses this root as its boundary, and `run_command` accepts an `argv` array rather than a shell command string.

The command runner can use an optional working directory under the root. It does not invoke a shell, which means shell parsing and shell operators are not part of the tool interface. Command names can also be restricted with a comma-separated allowlist of executable basenames. Read size, command duration, command output, and directory listing limits are configurable.

For model integration, `OPENAI_TOOL_DEFINITIONS` describes the tools and `TOOL_DESCRIPTIONS` provides their descriptions. `SYSTEM_PROMPT_V1` supplies the documented agent behavior. Applications can use these definitions with their own model client, including OpenAI Chat Completions as shown in the project documentation.

## Setup and configuration

Install the package with `pip install agent-godmode`. Configure an MCP client with a server entry that runs `agent-godmode`, then set an absolute workspace path through `AGENT_GODMODE_ROOT` or pass `--root /path/to/workspace`. If the client does not automatically load server instructions, add `SYSTEM_PROMPT_V1` to its system prompt.

The main optional settings are `AGENT_GODMODE_MAX_READ_BYTES`, `AGENT_GODMODE_COMMAND_TIMEOUT`, `AGENT_GODMODE_MAX_COMMAND_OUTPUT_BYTES`, `AGENT_GODMODE_LIST_MAX_ENTRIES`, and `AGENT_GODMODE_ALLOWED_COMMANDS`. Their defaults limit reads to 512000 bytes, subprocesses to 120 seconds, combined command output to 256000 bytes, and directory results to 2000 entries. The command allowlist is unrestricted when unset.

An in-process Python setup can create an `AgentWorkspace` for a chosen directory without starting an MCP process. Direct workspace and edit operations do not require an OpenAI key; an API key is needed only for the documented Chat Completions examples.

## Tools and capabilities

- `read_file` reads UTF-8 text with optional line ranges and a byte cap.
- `write_file` creates, overwrites, or appends UTF-8 text and creates missing parent directories.
- `edit_file` replaces a non-empty string in an existing UTF-8 file. Unless `replace_all` is enabled, the target must occur exactly once.
- `list_files` lists entries with optional recursion, glob matching, depth limits, and dotfile control.
- `run_command` starts a subprocess from an argv list and supports an optional workspace-relative `cwd`.

Invalid UTF-8 is reported as an error instead of being treated as editable text. For reliable single replacements, read the surrounding file content first and provide enough context to make the old string unique.

## Limitations and notes

The agent-godmode MCP server is a tool-execution package, not an LLM host or model provider. API keys remain in the application. Its file operations are for UTF-8 text and do not provide a general binary-file editing interface. Commands are argv-only, so workflows that depend on shell syntax must be expressed through an executable and its arguments. The configured workspace root and command limits determine what the agent can access and how much output it can receive.

_Full upstream README: https://allmcps.com/mcp/agent-godmode/readme_

