Metadata-Version: 2.4
Name: py-commander-mcp
Version: 0.2.1
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 operations, process execution, PDF creation,
system management, and configuration — all via `uvx`, no Node.js required.

Built as a Python port of Desktop Commander's key features.

## Features

### Filesystem
- **Read files**: text (pagination), PDF, Excel, DOCX, images (base64)
- **Write files**: text, DOCX (markdown→styled), Excel (JSON→sheets)
- **PDF creation**: create from markdown, insert/delete pages, page breaks
- **Edit files**: surgical `edit_block` find/replace
- **Directory ops**: list (recursive depth), create, move/rename
- **Search**: by file name (glob/regex) or file content with context

### Process execution
- Start shell commands, REPLs (Python, Node.js, etc.), scripts
- Interactive stdin I/O with prompt detection
- Output pagination (offset/length like `read_file`)
- Session management: list, force-terminate, auto-cleanup

### System tools
- **`list_processes`**: cross-platform (Linux/macOS/Windows) process listing
- **`kill_process`**: kill any system PID (SIGTERM → SIGKILL on Unix,
  taskkill on Windows)
- **`get_config` / `set_config_value`**: JSON-based config persistence
  (blocked commands, allowed directories, limits, telemetry)

## Usage

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

## Tools

### Filesystem (12 tools)

| 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 |
| `write_pdf` | Create/modify PDFs from markdown |
| `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` / `list_searches` | Manage search sessions |

### Process execution (5 tools)

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

### System tools (4 tools)

| Tool | Description |
|------|-------------|
| `list_processes` | List all running system processes (cross-platform) |
| `kill_process` | Kill any system process by PID |
| `get_config` | Return full server configuration |
| `set_config_value` | Set a configuration value by key |
