Allows an AI client to read, write, list, search, and manage files on Replit projects via SSH and SFTP.
Also known as mindstone/mcp-servers, mcp-server-replit-ssh, @mindstone/mcp-server-replit-ssh
- Stars
- 14
- Tools
- 9
- Downloads, 30 days
- —
- Latest version
- 0.2.2
- Last commit
- Nov 16, 2026
- License
- —
What is Replit SSH MCP?
Replit SSH allows an AI client to read, write, list, search, and manage files on Replit projects via SSH and SFTP. It exposes 9 tools, such as replit_check_connection, replit_list_files, replit_read_file.
Summary generated from the project's README
About Replit SSH MCP server
Managing files within Replit projects from your local development environment is what this MCP server enables. It allows AI clients to interact with Replit hosts via SSH and SFTP, providing a way to read, write, list, search, and delete files directly from your machine. This is designed for developers using Replit Core or higher who want to bridge their local AI tools with their hosted Replit workspaces.
The server operates locally and connects exclusively to *.replit.dev hosts. It uses local SSH keys for authentication rather than environment variables, and it includes a setup tool to generate Ed25519 key pairs and update your SSH configuration safely. To ensure data integrity, every file write undergoes SHA-256 read-back verification, and the server uses an AST-only evaluator to handle configuration changes without executing shell commands.
Developers can use specific tools like replit_search_files for recursive content searches, replit_read_file for accessing project code, and replit_write_file for atomic updates. The server also provides replit_stat for checking file metadata and replit_check_connection to verify connectivity and latency.
What you can do with it
- 1Inspect project dependenciesAsk the AI to list files and read the package.json to identify project scripts.
- 2Search codebase for specific logicRequest a recursive search through the project files to find specific text or filenames.
- 3Automate SSH environment setupHave the AI generate the necessary SSH keys and configuration blocks for Replit access.
- 4Verify file integrity after writingEnsure that code changes are correctly applied to the remote project using checksums.
Written from the project's README. Every use case is checked against a quote from it.
How to install Replit SSH MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Replit SSH MCP in Claude Code
$ claude mcp add mcp-server-replit-ssh -- npx -y @mindstone/mcp-server-replit-sshInstall Replit SSH MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server-replit-ssh": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-replit-ssh"
]
}
}
}Install Replit SSH MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp-server-replit-ssh": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-replit-ssh"
]
}
}
}Install Replit SSH MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp-server-replit-ssh","type":"stdio","command":"npx","args":["-y","@mindstone/mcp-server-replit-ssh"]}'Install Replit SSH MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp-server-replit-ssh": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-replit-ssh"
]
}
}
}Install Replit SSH MCP in Codex
$ codex mcp add mcp-server-replit-ssh -- npx -y @mindstone/mcp-server-replit-sshInstall Replit SSH MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp-server-replit-ssh] command = "npx" args = ["-y", "@mindstone/mcp-server-replit-ssh"]
Install Replit SSH MCP in Gemini CLI
$ gemini mcp add -s user mcp-server-replit-ssh npx -- -y @mindstone/mcp-server-replit-sshInstall Replit SSH MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp-server-replit-ssh": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-replit-ssh"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @mindstone/mcp-server-replit-ssh 0.2.2 in an isolated container with no network and no keys. It answered and listed 9 tools.
Replit SSH MCP tools 9
Read from the server with tools/listreplit_check_connectionRead-onlyCheck SSH connectivity to a Replit project. Verifies the connection works and reports the working directory, SFTP support, and server information. Use this to validate setup before file operations. Set verbose=true for detailed diagnostics when troubleshooting auth or connection failures.
replit_list_filesRead-onlyList files and directories in a Replit project path. Returns file names, sizes, and types (file/directory). Use "." for root or specify a subdirectory path.
replit_read_fileRead-onlyRead the contents of a file from a Replit project. Returns the file content as text. For binary files, returns base64-encoded content.
replit_search_filesRead-onlySearch a Replit project for files by name substring and/or text content substring (case-insensitive). Recursive from the given path with result caps; returns matching paths and, for content matches, the matching lines. Use this to find where a name, key, or string is used without reading every file.
replit_statRead-onlyGet metadata for a file or directory in a Replit project without reading its contents: type, size, permissions, and modification/access times.
replit_write_fileActionWrite content to a file in a Replit project. Creates parent directories if needed. Uses atomic write (temp file + rename) and verifies the write by reading back. For binary files (images, etc.), pass base64-encoded content with encoding "base64".
replit_moveActionMove or rename a file or directory within a Replit project. Never overwrites: fails if the destination already exists. The destination parent directory must already exist.
replit_delete_fileActionPermanently delete a file from a Replit project (files only, not directories). Deletion is irreversible — there is no trash. Enabled by default; approval gating is the responsibility of the host tool-approval layer.
replit_setup_sshActionSet up SSH keys and configuration for connecting to Replit projects. Generates an Ed25519 key pair, configures ~/.ssh/config, and provides the public key for the user to add to their Replit account. Safe to run multiple times — skips steps already completed.
| replit_check_connection | Check SSH connectivity to a Replit project. Verifies the connection works and reports the working directory, SFTP support, and server information. Use this to validate setup before file operations. Set verbose=true for detailed diagnostics when troubleshooting auth or connection failures. | Read-only |
| replit_list_files | List files and directories in a Replit project path. Returns file names, sizes, and types (file/directory). Use "." for root or specify a subdirectory path. | Read-only |
| replit_read_file | Read the contents of a file from a Replit project. Returns the file content as text. For binary files, returns base64-encoded content. | Read-only |
| replit_search_files | Search a Replit project for files by name substring and/or text content substring (case-insensitive). Recursive from the given path with result caps; returns matching paths and, for content matches, the matching lines. Use this to find where a name, key, or string is used without reading every file. | Read-only |
| replit_stat | Get metadata for a file or directory in a Replit project without reading its contents: type, size, permissions, and modification/access times. | Read-only |
| replit_write_file | Write content to a file in a Replit project. Creates parent directories if needed. Uses atomic write (temp file + rename) and verifies the write by reading back. For binary files (images, etc.), pass base64-encoded content with encoding "base64". | Action |
| replit_move | Move or rename a file or directory within a Replit project. Never overwrites: fails if the destination already exists. The destination parent directory must already exist. | Action |
| replit_delete_file | Permanently delete a file from a Replit project (files only, not directories). Deletion is irreversible — there is no trash. Enabled by default; approval gating is the responsibility of the host tool-approval layer. | Action |
| replit_setup_ssh | Set up SSH keys and configuration for connecting to Replit projects. Generates an Ed25519 key pair, configures ~/.ssh/config, and provides the public key for the user to add to their Replit account. Safe to run multiple times — skips steps already completed. | Action |
Configuration
MCP_REPLIT_SSH_KNOWN_HOSTS_PATHExplicit path to the connector's SSH known-hosts file. Defaults to $MCP_WORKSPACE_PATH/.replit-ssh-known-hosts, then $HOME/.replit-mcp/known_hosts.
MCP_REPLIT_SSH_STRICT_HOST_KEYSet to 1 to require pre-populated known-hosts entries. When unset (default), unknown hosts are recorded on first contact (OpenSSH `accept-new` behaviour); a fingerprint mismatch always fails closed.
REPLIT_SSH_REQUEST_TIMEOUT_MSOptional per-request timeout in milliseconds (default 60000, max 600000).
| Name | Description | |
|---|---|---|
| MCP_REPLIT_SSH_KNOWN_HOSTS_PATH | Explicit path to the connector's SSH known-hosts file. Defaults to $MCP_WORKSPACE_PATH/.replit-ssh-known-hosts, then $HOME/.replit-mcp/known_hosts. | |
| MCP_REPLIT_SSH_STRICT_HOST_KEY | Set to 1 to require pre-populated known-hosts entries. When unset (default), unknown hosts are recorded on first contact (OpenSSH `accept-new` behaviour); a fingerprint mismatch always fails closed. | |
| REPLIT_SSH_REQUEST_TIMEOUT_MS | Optional per-request timeout in milliseconds (default 60000, max 600000). |
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachablePass
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledPass
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHub@mindstone/mcp-server-replit-ssh
Replit SSH MCP server — read, write, list, search, stat, move, and delete files on Replit projects over SSH/SFTP, plus one-shot generation of the local SSH key and ~/.ssh/config block.
Local Replit SSH MCP. Connects from the operator's machine to *.replit.dev hosts only, writes are atomic with SHA-256 read-back, and the ~/.ssh/config rewrite parses via AST rather than Match exec shell evaluation.
Status
- Version: 0.2.2 · npm
- Auth: Local SSH key on disk (
~/.ssh/rebel-replitby default; resolved via~/.ssh/configIdentityFileif set). No env-var-supplied secrets. - Tools: 9 (connection, files, ssh-setup)
- Surface: local-protocol
- Machine-readable:
STATUS.json
Why this exists
Replit ships a hosted "Agent" experience but does not publish an MCP server for the SSH/SFTP surface its Core users get. The community options at the time we built this either shelled out to the system ssh binary (so connection failures surfaced as generic non-zero exit codes) or parsed ~/.ssh/config with the upstream ssh-config@5.1.0 package, which evaluates Match exec "<cmd>" blocks by running them through the shell — that is local code execution against any consumer that reads a user-controlled config file. We wrote our own so that the host application can read, list, and atomically write files on a Replit project from the operator's own machine, with a host allow-list pinned to *.replit.dev, a safe AST-only config evaluator, SHA-256 read-back verification on every write, and a structured recovery contract on every tool error.
Example interaction
"List the files in my Replit project, then read
package.jsonand tell me which scripts are defined."
Tools the host calls:
replit_check_connection— verifies SSH connectivity and SFTP support, returns latency.replit_list_files— lists files and directories at..replit_read_file— readspackage.jsonfrom the project root as UTF-8 text.
Response (trimmed):
{
"ok": true,
"files": [
{ "name": "package.json", "type": "file", "size": 612 },
{ "name": "src", "type": "directory" }
],
"package": {
"scripts": {
"dev": "node src/index.js",
"test": "vitest run"
}
}
}
Requirements
- Node.js 20+
- npm
- A Replit account with SSH access (Replit Core or higher)
- A live
*.replit.devhost from a Replit project (open the project, click SSH → Connect → Connect manually, copy the host and username) - An SSH key registered with Replit at replit.com/account#ssh-keys. Run
replit_setup_sshonce to generate one if you do not already have one.
One-click install
After clicking the button, your host will prompt you to fill: REPLIT_SSH_REQUEST_TIMEOUT_MS.
{
"mcpServers": {
"Replit SSH": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-replit-ssh"
],
"env": {
"REPLIT_SSH_REQUEST_TIMEOUT_MS": "60000"
}
}
}
}
Quick Start
Install & build
cd <path-to-repo>/connectors/replit-ssh
npm install
npm run build
npx (once published)
npx -y @mindstone/mcp-server-replit-ssh
Local
node dist/index.js
Configuration
This server has no required environment variables. Authentication is via the local SSH key resolved through ~/.ssh/config.
Optional environment variables
REPLIT_SSH_REQUEST_TIMEOUT_MS— per-request timeout in milliseconds (default:60000, max600000). Tool-level timeout for SFTP operations; the lower-level TCP/SSH handshake uses a separate 30-second budget.MCP_REPLIT_SSH_STRICT_HOST_KEY— set to1to require pre-populated known-hosts entries. When unset (default), unknown hosts are recorded on first contact (matches OpenSSH'sStrictHostKeyChecking=accept-new); a fingerprint mismatch on a subsequent connect always fails closed regardless of this flag. See the SSH host-key verification entry in Security notes below.MCP_REPLIT_SSH_KNOWN_HOSTS_PATH— explicit path to the connector's SSH known-hosts file. Defaults to$MCP_WORKSPACE_PATH/.replit-ssh-known-hosts, falling back to$HOME/.replit-mcp/known_hosts. The file is created with mode0o600and the parent directory with mode0o700.
Host configuration examples
Claude Desktop / Cursor
{
"mcpServers": {
"ReplitSSH": {
"command": "npx",
"args": ["-y", "@mindstone/mcp-server-replit-ssh"]
}
}
}
Local development (no npm publish needed)
{
"mcpServers": {
"ReplitSSH": {
"command": "node",
"args": ["<path-to-repo>/connectors/replit-ssh/dist/index.js"]
}
}
}
After the host launches the server, run replit_setup_ssh once to generate the local key, then add the printed public key to replit.com/account#ssh-keys.
Tools (9)
Read
replit_check_connection— verify SSH connectivity, working directory, and SFTP support. Setverbose=truefor handshake/auth diagnostics.replit_list_files— list files and directories at a path (relative to the project root). Default path is.. Entry types arefile/directory/symlink(symlinks are reported as links, not followed — consistent withreplit_stat).replit_read_file— read a file (capped at 1 MiB; larger files fail withFILE_TOO_LARGErather than being truncated silently). UTF-8 text by default; binary files (detected via null-byte scan) are returned as base64.replit_search_files— recursive search by file-name substring and/or text-content substring (case-insensitive), with result caps (max_results, default 50) and a depth cap (max_depth, default 4). Content search skips binary files and files over 1 MB. Returns matching paths and, for content matches, up to 5 matching lines per file with line numbers (lineMatchesTruncated: truewhen a file has more).replit_stat— file/directory metadata (type, size, permissions, mtime/atime) without reading contents. Symlinks are reported as typesymlink(vialstat), not followed.
Write
replit_write_file— atomic write viatemp + ext_openssh_renamewith SHA-256 read-back verification. Fails closed if the server doesn't support atomic overwrite and the target already exists (we neverunlink + rename, which opens a data-loss window).replit_move— move or rename a file or directory. Never overwrites: fails withDESTINATION_EXISTSif the destination path is taken. The destination parent directory must already exist.replit_delete_file— permanently delete a file (files only, not directories). Deletion is irreversible on Replit — there is no trash — so the tool carriesdestructiveHint: trueand relies on the host's tool-approval layer as the gate.replit_setup_ssh— generate an Ed25519 key pair at~/.ssh/rebel-replit, write public/private files with mode0600(oricaclsACL on Windows), and append a*.replit.devblock to~/.ssh/config. Idempotent by default; passforce_regenerate=trueto replace the existing key (you will need to re-register the new public key with Replit).
Security notes
- Host allowlist. Only
*.replit.devhosts are accepted, case-insensitive suffix match. Any other host is rejected before the SSH connection is opened. ~/.ssh/mutation surface.replit_setup_sshwrites to the operator's home directory (~/.ssh/rebel-replit,~/.ssh/rebel-replit.pub,~/.ssh/config). Configuration rewrites use a safe AST-only evaluator that skipsMatch execblocks entirely, rather than the upstreamssh-config.compute()which wouldspawnSyncthem through the shell.- Path traversal. SFTP file paths are POSIX-normalized after rejecting absolute paths and any
..segments — relative paths only, no escape from the project root. - Atomic write invariant.
replit_write_filewrites to a randomized temp filename, renames via OpenSSH's POSIX rename extension (ext_openssh_rename), and verifies the final file's SHA-256 against the expected hash. If the server lacks the extension and the target file already exists, the write fails rather than falling back tounlink + rename. - Read-back verification. Every
replit_write_filere-reads the final file and asserts SHA-256 equality before returningverified: true. - SSH host-key verification. Every outbound SSH connection passes an explicit
hostVerifierto ssh2 that pins server fingerprints in a per-user known-hosts file (mode0o600). The default behaviour mirrors OpenSSH'sStrictHostKeyChecking=accept-new: the first time the connector reaches a host, the SHA-256 fingerprint is recorded and a notice is logged to stderr; on subsequent connects, a mismatch fails closed withHOST_KEY_MISMATCH. Pins are keyed by the stable proxy suffix (first DNS label stripped, e.g.riker.replit.dev) because Replit rotates the per-project hostname on every restart — a rotated hostname presenting a different key than the recorded suffix pin fails closed. The stripping stops at three labels: a three-label host pins under its full hostname, and a barereplit.deventry is never consulted as a pin, so no single entry can act as a universal pin for every Replit host. The known-hosts file accepts both native<host> SHA256:…lines and OpenSSHssh-keyscanoutput (<host> <keytype> <base64-key>), and honours@revokedmarkers as an active refusal (HOST_KEY_REVOKED) like OpenSSH does — a revoked key fails closed even if it is also pinned as valid. Operators who need fail-closed first-contact setMCP_REPLIT_SSH_STRICT_HOST_KEY=1and pre-populate the known-hosts file out-of-band (e.g.ssh-keyscan riker.replit.dev > "$MCP_WORKSPACE_PATH/.replit-ssh-known-hosts"from a trusted network). Added in 0.1.2 to close audit findingreplit-ssh-001. - Untrusted-content envelopes. Content from
replit_read_file, directory-entry names fromreplit_list_files, matched paths/lines fromreplit_search_files, and the peer-authored fields fromreplit_check_connection(server version, working directory, and diagnostic event details such as the server banner and keyboard-interactive prompts) are wrapped in<untrusted-content source="…">…</untrusted-content>envelopes per AGENTS.md invariant #6. Hosts must keep the envelopes intact when surfacing tool output to the model. Added in 0.1.2 to close audit findingreplit-ssh-006; check-connection coverage added later. - Delete is irreversible; approval is the host's job.
replit_delete_fileperforms irreversible deletion (Replit has no trash). The tool is enabled by default and carriesdestructiveHint: true— gating belongs to the host's tool-approval layer. Directories are never deleted. - Move never overwrites.
replit_movepre-checks the destination and fails withDESTINATION_EXISTSrather than clobbering an existing file. - Algorithm allow-list. Outbound SSH connections restrict the negotiated KEX/host-key/cipher/HMAC algorithms to curve25519-sha256 + ssh-ed25519/rsa-sha2-* + ChaCha20-Poly1305/AES-GCM + ETM HMACs. Blocks downgrade negotiation to weaker suites if the proxy is ever misconfigured.
Licence
FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08.
Replit SSH MCP questions
How do I add Replit SSH MCP to Claude Code?
Run claude mcp add mcp-server-replit-ssh -- npx -y @mindstone/mcp-server-replit-ssh in your terminal. Add --scope user to make it available in every project.
How do I add Replit SSH MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Replit SSH MCP provide?
It exposes 9 tools, including replit_check_connection, replit_list_files, replit_read_file, replit_search_files, replit_stat.
How do I set up SSH access for Replit?
You can run the replit_setup_ssh tool once to generate an Ed25519 key pair and automatically configure your local SSH config.
Is file writing safe?
Yes, writes are atomic using a temporary file and rename process, followed by a SHA-256 read-back verification to ensure integrity.
Can I search for specific text within my Replit files?
Yes, the replit_search_files tool allows for recursive searching by filename or text content (case-insensitive).