read_file
Read exact line slices from files with 1-indexed line numbers (<line>: <content>).
{
"tool": "read_file",
"arguments": {"path": "src/index.ts", "start_line": 1, "end_line": 50}
}
ShitCode
ShitCode / Model Context Protocol (MCP) API
Connect free AI chatbots (ChatGPT, Claude, Gemini, Grok, Perplexity) directly to your Windows or Linux PC. Give your AI assistant the ability to read and edit code, execute terminal commands, automate browsers with Playwright, and control desktop apps locally for $0.
Try searching for common terms like "file", "terminal", "browser", "click", or "git".
Read, search, patch, and create local files, inspect Git repositories, run isolated code, and execute custom prompt skills.
read_fileRead exact line slices from files with 1-indexed line numbers (<line>: <content>).
{
"tool": "read_file",
"arguments": {"path": "src/index.ts", "start_line": 1, "end_line": 50}
}
write_fileCreate or overwrite files with automatic parent directory creation.
{
"tool": "write_file",
"arguments": {"path": "src/hello.py", "content": "print('Hello from ShitCode!')\n"}
}
patch_fileSurgical search-and-replace text modification with unified diff verification.
{
"tool": "patch_file",
"arguments": {"path": "src/app.py", "target": "PORT = 3000", "replacement": "PORT = 8080"}
}
patchAlias for patch_file. Surgical search-and-replace text modification with unified diff verification.
{
"tool": "patch",
"arguments": {"path": "config.json", "diff": "@@ -1,3 +1,3 @@\n-debug: false\n+debug: true"}
}
multi_patch_filePerform multiple non-contiguous edits in a single file atomically with unified diff validation.
{
"tool": "multi_patch_file",
"arguments": {"path": "main.py", "patches": [{"target": "v1.0", "replacement": "v1.6"}]}
}
list_dirExplore directory tree structures with file sizes and type markers.
{
"tool": "list_dir",
"arguments": {"path": ".", "max_depth": 2, "include_hidden": false}
}
grep_searchFast line-by-line regex or literal content search with file inclusion glob filters.
{
"tool": "grep_search",
"arguments": {"pattern": "createLenisInstance", "path": "src", "context_lines": 2}
}
find_filesFast glob filename discovery across directory trees.
{
"tool": "find_files",
"arguments": {"pattern": "*.astro", "path": "src/pages"}
}
search_filesSearch for text patterns or filenames across the workspace (combined find/grep discovery).
{
"tool": "search_files",
"arguments": {"query": "tutorial", "path": "src"}
}
git_statusInspect git working tree status, modified/untracked files, and summary diffs.
{
"tool": "git_status",
"arguments": {"untracked": true}
}
execute_codeSandboxed Python script runner for testing snippets, algorithms, and data calculations.
{
"tool": "execute_code",
"arguments": {"code": "import sys; print(f'Python {sys.version}')", "timeout": 10}
}
skills_listMANDATORY FIRST STEP: Discover all specialized workflow manuals, coding guidelines, and SOPs (SKILL.md) stored in the CLI's root 'skills/' folder (including UI animation & design, speech/TTS, testing, deployment). Always call this first before performing complex or domain-specific tasks.
{
"tool": "skills_list",
"arguments": {}
}
skill_viewRead the full markdown workflow guidelines and instructions for a specific skill from the CLI root 'skills/' directory into context.
{
"tool": "skill_view",
"arguments": {"name": "code-review"}
}
skill_manageDynamically create, update, or delete custom skill manuals inside the CLI's root 'skills/' directory.
{
"tool": "skill_manage",
"arguments": {"action": "create", "name": "test-runner", "content": "Run pytest on modified files"}
}
Execute interactive or background shell commands (PowerShell, CMD, Bash) and manage running process trees on Windows or Linux.
terminalExecute shell commands (PowerShell/CMD on Windows, Bash on Linux) with directory memory and background execution.
{
"tool": "terminal",
"arguments": {"command": "npm run build", "cwd": "c:/projects/myapp", "timeout": 30}
}
process_manageInspect, monitor, tail logs, or terminate background processes.
{
"tool": "process_manage",
"arguments": {"action": "list"}
}
Automate Chromium web browsers with Playwright: click, type, extract DOM, capture screenshots, evaluate JS, and inspect network calls.
browser_openLaunch the built-in isolated ShitCode automation browser (Playwright with persistent profile) and navigate to a URL. Dedicated to high-speed web scraping, documentation reading, automated testing, and form filling with 100% reliable DOM selectors. Automatically launches a visible headed window on desktop GUI environments with headless fallback on remote servers. NOTE: To automate or interact with the user's personal everyday browser (e.g. Chrome, Edge, Brave with live logins to Gmail, YouTube, Twitter, GitHub), use Desktop Computer Control ('computer_actions', 'window_focus', 'clipboard_*') instead.
{
"tool": "browser_open",
"arguments": {"url": "https://news.ycombinator.com", "headless": true}
}
browser_actionsExecute a compound batch of browser actions sequentially in a single turn (e.g. open page, fill fields, click buttons, evaluate JavaScript, and verify outcome). Drastically cuts round-trip latency and provides real-time step execution feedback in the CLI terminal.
{
"tool": "browser_actions",
"arguments": {"actions": [{"action": "navigate", "url": "https://google.com"}, {"action": "type", "selector": "textarea[name=q]", "text": "ShitCode MCP"}, {"action": "screenshot"}]}
}
browser_clickClick an interactive element (button, link, input) on the active web page by CSS selector or text.
{
"tool": "browser_click",
"arguments": {"selector": "button[type=submit]"}
}
browser_typeType text into a form field, search bar, or editable element on the active web page.
{
"tool": "browser_type",
"arguments": {"selector": "input[name=username]", "text": "developer", "press_enter": true}
}
browser_extractExtract clean, readable Markdown, interactive element catalog, plain text, or scoped HTML from the active web page (token-efficient reading).
{
"tool": "browser_extract",
"arguments": {"selector": "main", "format": "markdown"}
}
browser_screenshotCapture visual screenshot of the current page or element for visual layout and UI validation.
{
"tool": "browser_screenshot",
"arguments": {"full_page": false}
}
browser_evaluateExecute arbitrary JavaScript expression or function in the active browser page context. Returns the evaluated result. Ideal for inspecting client-side SPA state, reading localStorage, dispatching custom events, or calculating element geometry.
{
"tool": "browser_evaluate",
"arguments": {"expression": "document.title"}
}
browser_consoleRetrieve captured browser console logs, warnings, and uncaught JavaScript runtime errors. Essential for diagnosing page issues, broken scripts, and client-side exceptions.
{
"tool": "browser_console",
"arguments": {"min_level": "warn"}
}
browser_networkCapture and inspect HTTP network traffic, API requests, status codes, headers, and response payloads. Use this to trace failed API calls (4xx/5xx) and inspect Fetch/XHR responses.
{
"tool": "browser_network",
"arguments": {"status_code": 404}
}
browser_closeClose the active built-in browser session and save its persistent profile.
{
"tool": "browser_close",
"arguments": {}
}
Direct desktop input: mouse clicks, drags, keyboard shortcuts, window enumeration, window focusing, and system clipboard read/write.
clipboard_writeCopy text string to the operating system clipboard.
{
"tool": "clipboard_write",
"arguments": {"text": "https://shitcode.in"}
}
clipboard_readRead the current text contents from the operating system clipboard.
{
"tool": "clipboard_read",
"arguments": {}
}
computerCross-platform OS desktop GUI automation tool (Anthropic Computer Use API standard). Take screenshots, move mouse, click, drag, type, and press hotkeys across Windows and Linux desktops. Use this tool or 'computer_actions' for visual tasks (canvas apps, Figma, games, layout verification) or when operating the user's personal everyday browser (Chrome, Edge, Brave) with live logins. Screenshots are returned as optimized image blocks.
{
"tool": "computer",
"arguments": {"action": "left_click", "coordinate": [960, 540]}
}
computer_actionsExecute a compound batch of desktop OS actions sequentially in a single turn (e.g. focus window, click, paste text via clipboard, press enter, and capture result screenshot). Dramatically cuts round-trip latency and provides real-time terminal progress indicators in the CLI. Recommended for automating desktop applications and interacting with the user's personal everyday browser (Chrome, Edge, Brave) with their active logins.
{
"tool": "computer_actions",
"arguments": {"actions": [{"action": "mouse_move", "coordinate": [500, 300]}, {"action": "left_click"}, {"action": "type", "text": "hello"}]}
}
windows_listList all open desktop application windows with titles, window IDs, PIDs, and bounding box coordinates on the user's host machine (Windows & Linux).
{
"tool": "windows_list",
"arguments": {}
}
window_focusActivate and bring the target desktop application window (e.g. Chrome, Notepad, VS Code) to the foreground before interacting.
{
"tool": "window_focus",
"arguments": {"title": "Visual Studio Code"}
}
window_stateChange window state: maximize, minimize, restore, or close.
{
"tool": "window_state",
"arguments": {"title": "Chrome", "state": "maximize"}
}
Native OS UIAutomation accessibility tree traversal for numbered, coordinate-free button clicks and input interactions.
desktop_snapshotFAST ACCESSIBILITY ENGINE: Read interactive controls (buttons, inputs, menus, checkboxes, tabs) of a desktop window using native OS accessibility trees (Windows UIAutomation / Linux AT-SPI). Returns a compact token-efficient JSON tree with element refs (@e1, @e2). Interacts headlessly without moving the cursor or taking screenshots. Use for standard desktop tasks.
{
"tool": "desktop_snapshot",
"arguments": {"app_name": "Calculator", "max_elements": 50}
}
desktop_interactFAST ACCESSIBILITY ACTION: Perform a headless action on a desktop UI element using its ref from desktop_snapshot (e.g. '@e1'). Clicks, toggles, or sets text headlessly without moving the physical mouse pointer. Falls back to deterministic physical click at element bounds if headless invoke is unsupported.
{
"tool": "desktop_interact",
"arguments": {"element_id": 14, "action": "click"}
}
Hardware telemetry, online device registry, URL scraping, and local image and video metadata inspection.
devices_listList all your online computers connected to ShitCode (name, OS type, primary status). Use this tool to discover available machines for targeted execution.
{
"tool": "devices_list",
"arguments": {}
}
web_extractFetch URLs and extract clean, readable markdown/text for documentation and API references.
{
"tool": "web_extract",
"arguments": {"url": "https://example.com", "format": "markdown"}
}
system_infoRetrieve structured operating system health, CPU load %, RAM usage, disk space, and top resource-consuming processes.
{
"tool": "system_info",
"arguments": {}
}
image_inspectInspect and visually analyze any local image file on the user's computer (PNG, JPG, JPEG, WEBP, BMP, SVG). Returns image dimensions, metadata, and visual image data directly for AI multimodal vision analysis.
{
"tool": "image_inspect",
"arguments": {"path": "assets/diagram.png"}
}
video_inspectInspect and visually analyze local video files on the user's computer in chunked temporal windows (default: 8 frames covering 16 seconds at 0.5 fps). Returns video metadata, individual frame timestamps, and a 'Next Window' pagination cursor to inspect subsequent segments or jump to specific timestamps without overflowing token context.
{
"tool": "video_inspect",
"arguments": {"path": "demo.mp4"}
}