Metadata-Version: 2.4
Name: py-commander-mcp
Version: 0.2.0
Summary: MCP Server — filesystem operations, process execution, PDF creation, system tools, and config management
Author-email: Yohann <yohann@example.com>
License: MIT
Requires-Python: >=3.10
Requires-Dist: mcp[cli]>=1.6.0
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: pymupdf>=1.25.0
Requires-Dist: python-docx>=1.1.0
Description-Content-Type: text/markdown

# py-commander-mcp

MCP Server for filesystem **and process** operations — read, write, edit,
search, manage files, and execute subprocesses (REPLs, shell commands, scripts).

Built as a Python port of the key features from Desktop Commander.
Runs exclusively via `uvx` — no Node.js required.

## Features

### Filesystem tools
- **Read files**: text (with offset/length pagination), PDF, Excel, DOCX, images (base64)
- **Write files**: text, DOCX (from markdown), Excel (from JSON 2D arrays)
- **Edit files**: surgical find/replace with `edit_block`
- **Directory ops**: list (recursive with depth), create, move/rename
- **File metadata**: size, dates, line counts
- **Search**: by file name (glob/regex) or file content with context lines

### Process execution tools
- **Start subprocesses**: shell commands, REPLs (Python, Node.js, etc.), scripts
- **Interactive REPL I/O**: send input, capture output, detect prompts
- **Output pagination**: read process output with offset/length (like `read_file`)
- **Session management**: list active sessions, force-terminate, auto-cleanup finished ones

## Usage

```json
{
  "mcpServers": {
    "py-commander-mcp": {
      "command": "uvx",
      "args": ["py-commander-mcp"]
    }
  }
}
```

## Tools

### Filesystem

| Tool | Description |
|------|-------------|
| `read_file` | Read files (text, PDF, Excel, DOCX, images) |
| `read_multiple_files` | Read multiple files at once |
| `write_file` | Write/create/append files |
| `edit_block` | Surgical find/replace edits |
| `create_directory` | Create directories |
| `list_directory` | List directory contents with depth |
| `move_file` | Move/rename files and directories |
| `get_file_info` | File metadata |
| `start_search` | Search files by name or content |
| `get_more_search_results` | Paginate search results |
| `stop_search` | Stop and free a search session |
| `list_searches` | List active searches |

### Process execution

| Tool | Description |
|------|-------------|
| `start_process` | Start a subprocess (REPL, script, shell command) |
| `read_process_output` | Read process output with offset/length pagination |
| `interact_with_process` | Send stdin to a process, capture response |
| `force_terminate` | Kill a running process (SIGTERM → SIGKILL) |
| `list_sessions` | List active process sessions |
