finch-shell-mcp
This MCP server lets an agent inspect and edit local files and run and manage shell jobs over stdio or Streamable HTTP.
File tools: stat up to 200 absolute paths with size, times, short hash, and encoding guess; read bytes as text/hex/auto up to 2 MB; write whole files with text or hex, hash checks, readback, directory creation, and BOM/EOL preservation; patch exact text with required match counts; splice byte inserts/deletes with hash safety.
Command tools: start jobs via argv or interpreter script with cwd, env, stdin, timeouts, resource limits, tags, and TTL; default wait is 10 seconds, then output so far is returned while the job keeps running.
Job tools: read output incrementally by Unicode character cursor with optional waits; send stdin only while standing by; list live, lost, and optionally finished jobs with tag filters; kill a job and its process tree with a grace period.
Transport/session behavior: stdio has one job table; HTTP uses one job table per Mcp-Session-Id, with anonymous callers sharing a table; files are shared process-wide and up to 64 live jobs are allowed process-wide.
Local operation: requires Node.js 22.18+, stores job logs in FINCH_SHELL_HOME, and on loopback HTTP checks Host and Origin; non-loopback HTTP has no caller authentication.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@finch-shell-mcp run npm test and show me the output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
finch-shell-mcp
MCP server for local files and shell jobs.
An MCP server that gives an agent ten tools: five for files, five for commands. Writes can be checked against a hash and are read back after they land. Command output is one text stream, read with a Unicode code-point cursor.
Architecture
One process serves every caller. Each request builds its own MCP server object. Jobs are not kept on that object.
flowchart TB
client[MCP client]
client --> stdio[stdio]
client --> http[Streamable HTTP /mcp]
stdio --> server[finch-shell-mcp]
http --> server
server --> files[File tools, shared by every session]
server --> jobs[Job tools, one table per session]
files --> disk[Local files]
jobs --> procs[Child process tree]
jobs --> logs[Logs in FINCH_SHELL_HOME]stdio has one job table. HTTP uses one table per Mcp-Session-Id. Calls without that header share the anonymous table. Files, file locks, and the limit of 64 live jobs are process-wide. Two sessions cannot see each other's jobs, and they can read and write the same path.
Related MCP server: Files MCP Server
Features
Files: stat, read by byte offset, replace a whole file, exact text replace, insert or delete at a byte offset. A successful write is read back.
Commands:
argv, or a script for a named interpreter. The default wait is 10 seconds. When it elapses, the call returns the output so far and the job keeps running.A long job has a
job_id, a log file, and a status. You can keep reading, write to stdin, or stop the process tree.stdio and Streamable HTTP. On HTTP, jobs for different
Mcp-Session-Idvalues are not visible to each other. Files are shared.Output is not assumed to be UTF-8. Bytes that cannot be decoded become the replacement character and
lossyis set. The call itself still succeeds.No dependency needs a native compile step.
Requirements
Node.js 22.18 or newer.
Quick start
This version is not on npm yet. Download the release tarball and install it globally:
hlint-finch-shell-mcp-0.1.2.tgz
Linux:
curl -fsSL -o hlint-finch-shell-mcp-0.1.2.tgz https://github.com/hlint/finch-shell-mcp/releases/download/v0.1.2/hlint-finch-shell-mcp-0.1.2.tgz && npm install -g ./hlint-finch-shell-mcp-0.1.2.tgzWindows (PowerShell):
Invoke-WebRequest -Uri https://github.com/hlint/finch-shell-mcp/releases/download/v0.1.2/hlint-finch-shell-mcp-0.1.2.tgz -OutFile hlint-finch-shell-mcp-0.1.2.tgz; npm install -g .\hlint-finch-shell-mcp-0.1.2.tgzThat puts finch-shell-mcp on your PATH. Add this to an MCP client:
{
"mcpServers": {
"finch-shell": {
"command": "finch-shell-mcp"
}
}
}Or run it from a checkout:
npm install
npx finch-shell-mcpHTTP:
finch-shell-mcp --http
finch-shell-mcp --http 0.0.0.0:8787The default URL is http://127.0.0.1:7331/mcp. --http 8787 changes only the port and still binds to loopback. FINCH_SHELL_HTTP_HOST and FINCH_SHELL_HTTP_PORT apply when no address is passed. FINCH_TRANSPORT=http also starts HTTP.
Loopback checks Host and Origin. Any other address has no caller authentication and should stay on a network you trust.
Job logs live in FINCH_SHELL_HOME. When unset, Windows uses %LOCALAPPDATA%\finch-shell-mcp and other systems use ~/.finch-shell-mcp.
Tools
Tool | What it does |
| Size, times, and a short hash for many paths |
| Read text or hexadecimal bytes |
| Replace a whole file |
| Replace exact text |
| Insert or delete at a byte offset |
| Start a job and wait |
| Continue reading output |
| Write stdin after the job goes quiet |
| List jobs for this session |
| Stop a job and its process tree |
A tool result is one JSON text block. On failure, ok is false and error.code is stable. A non-zero command exit is not a failed call. Read status.
Fields, error codes, and limits are in the interface contract.
Development
npm install
npm test
npm run typecheck
npm run build
npm run packnpm install runs tsdown and writes dist/index.mjs. That file is the command. npm run pack typechecks, then builds a .tgz. Publishing runs the tests again. Layout and implementation notes are in the development guide.
License
Available Tools
10 toolsexecStart a jobC
mode is required. argv uses program and args. shell uses script and interpreter. The default wait is 10 seconds and does not kill the job. The response is the last 4096 characters.
Inputs: cwd, env, args, mode, +13 more.
fs_patchReplace exact textADestructive
Replace exact text, not a regular expression. Each edit has old_text, new_text, and count, and count must equal the number of matches. Files over 8 MB are rejected.
Inputs: bom, path, edits, encoding, +1 more.
fs_readRead a file by bytesARead-only
Read from a byte offset. mode is text, hex, or auto. At most 2 MB per call. A failed decode does not fail the call. hash is the short hash of the whole file.
Inputs: mode, path, length, offset, +3 more.
fs_spliceInsert or delete bytesBDestructive
offset is a byte count, start, or end. Provide exactly one of insert or insert_hex. No newline is added. An existing file requires expect_hash unless force is set.
Inputs: path, force, insert, offset, +5 more.
fs_statStat filesARead-only
Size, times, short hash, and an encoding guess for 1 to 200 absolute paths. hash defaults to true.
Inputs: hash, paths.
fs_writeWrite a whole fileADestructive
Provide exactly one of text or hex. A hex write to an existing file requires expect_hash unless force is set. The write is read back. Parent directories are created by default.
Inputs: hex, path, text, force, +4 more.
job_killStop a jobBDestructive
Windows uses taskkill /T /F on the parent chain. Other systems send SIGTERM to the process group, then SIGKILL after the grace period. A partial stop returns E_KILL_INCOMPLETE.
Inputs: job_id, grace_ms.
job_listList jobsBRead-only
Lists live jobs and jobs marked lost after a restart. tags is a subset match.
Inputs: tags, limit, include_finished.
job_readRead job outputCRead-only
cursor is a character index and may be negative. At most 16384 characters per call. wait_ms waits out the current burst, or the next burst when the job is already standing_by.
Inputs: cursor, job_id, wait_ms, max_chars.
job_sendWrite to a job stdinB
Accepted only while standing_by. cursor is required. No newline is added. Provide exactly one of input or input_hex.
Inputs: input, cursor, job_id, wait_ms, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Job tools and filesystem tools are grouped by resource, with mostly distinct actions: job read/send/kill/list and fs stat/read/write/patch/splice. The main ambiguity is among fs_write, fs_patch, and fs_splice, but their descriptions clarify the different editing semantics.
Names consistently use snake_case with resource prefixes job_ and fs_. The standalone exec is the only name without a resource prefix, which is a minor but readable deviation.
Ten tools is well-scoped for a shell/job and filesystem MCP server, covering process launch, job lifecycle, and core file operations. Each tool has a clear role without obvious redundancy.
Job lifecycle coverage is complete with list/read/send/kill plus exec for launching, and filesystem coverage includes stat/read/write/patch/splice. Explicit delete, rename, or directory-listing tools are missing, but agents can work around those via exec.
Maintenance
Related MCP Connectors
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Let ChatGPT and Claude read and edit files, search and run commands on your own computer.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Shared control plane for AI coding agents — tasks, memory, decisions, file locks. 12 tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables secure local filesystem operations and interactive terminal sessions for AI assistants. Provides 12 tools for file management, directory operations, code searching, and running interactive REPLs with security protections.15 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to safely explore directories, read files, search content by pattern or filename, and edit files with checksum verification and dry-run preview within sandboxed filesystem access.76MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to search, read, edit, and manage files and directories, execute and control terminal commands and processes, and perform code or text searches and replacements. It also supports in-memory code execution and interactive process sessions for tasks like data analysis and long-running command management.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to read, write, edit, search, rename, move, and delete files, perform regex search-and-replace across trees, query and modify JSON documents, and inspect git status and diffs, all through structured tools instead of shell commands. Includes safeguards like dry-run previews, atomic multi-file edits, and protection for denied or sensitive paths.MIT