Skip to main content
Glama

Claude Desktop Commander MCP

interact_with_process

Send input to a running process and receive responses for local file analysis, including CSV, JSON, and data processing. Designed for interactive workflows with REPLs like Python, Node.js, and R. Ensures accurate execution with error detection and clean output formatting. Mandatory for local file access tasks.

Instructions

Send input to a running process and automatically receive the response. CRITICAL: THIS IS THE PRIMARY TOOL FOR ALL LOCAL FILE ANALYSIS For ANY local file analysis (CSV, JSON, data processing), ALWAYS use this instead of the analysis tool. The analysis tool CANNOT access local files and WILL FAIL - use processes for ALL file-based work. FILE ANALYSIS PRIORITY ORDER (MANDATORY): 1. ALWAYS FIRST: Use this tool (start_process + interact_with_process) for local data analysis 2. ALTERNATIVE: Use command-line tools (cut, awk, grep) for quick processing 3. NEVER EVER: Use analysis tool for local file access (IT WILL FAIL) REQUIRED INTERACTIVE WORKFLOW FOR FILE ANALYSIS: 1. Start REPL: start_process("python3 -i") 2. Load libraries: interact_with_process(pid, "import pandas as pd, numpy as np") 3. Read file: interact_with_process(pid, "df = pd.read_csv('/absolute/path/file.csv')") 4. Analyze: interact_with_process(pid, "print(df.describe())") 5. Continue: interact_with_process(pid, "df.groupby('column').size()") BINARY FILE PROCESSING WORKFLOWS: Use appropriate Python libraries (PyPDF2, pandas, docx2txt, etc.) or command-line tools for binary file analysis. SMART DETECTION: - Automatically waits for REPL prompt (>>>, >, etc.) - Detects errors and completion states - Early exit prevents timeout delays - Clean output formatting (removes prompts) SUPPORTED REPLs: - Python: python3 -i (RECOMMENDED for data analysis) - Node.js: node -i - R: R - Julia: julia - Shell: bash, zsh - Database: mysql, postgres PARAMETERS: - pid: Process ID from start_process - input: Code/command to execute - timeout_ms: Max wait (default: 8000ms) - wait_for_prompt: Auto-wait for response (default: true) Returns execution result with status indicators. ALWAYS USE FOR: CSV analysis, JSON processing, file statistics, data visualization prep, ANY local file work NEVER USE ANALYSIS TOOL FOR: Local file access (it cannot read files from disk and WILL FAIL) This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.

Input Schema

NameRequiredDescriptionDefault
inputYes
pidYes
timeout_msNo
wait_for_promptNo

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "input": { "type": "string" }, "pid": { "type": "number" }, "timeout_ms": { "type": "number" }, "wait_for_prompt": { "type": "boolean" } }, "required": [ "pid", "input" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wonderwhy-er/DesktopCommanderMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server