remote-fs-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
remote-fs-mcp
Give any AI access to your computer's files and terminal, from anywhere.
Run this MCP server on your PC, a VPS, or in Docker. Then connect Claude, Cursor, VS Code, or your own agent to it. The AI can read, write, edit and search files, and run terminal commands on that machine. That works even when you're only using a browser or your phone.
Features
Files and folders: read, write, edit, list, search, copy, move and delete
Terminal: run commands, plus start long-running processes like dev servers and watch their output
Fast: stateless HTTP; uses ripgrep for search when it's installed
Secure: token auth, every file locked to one folder, read-only and no-commands modes
Works everywhere: Windows, macOS and Linux, Docker, VPS, or your PC through a tunnel
Any MCP client: Claude (web, desktop and Code), Cursor, VS Code, or your own code
Related MCP server: High-Performance File System MCP Server
Quick start
1. Install
git clone https://github.com/RaheesAhmed/remote-fs-mcp.git
cd remote-fs-mcpThen install:
uv sync2. Configure
Copy the example config:
cp .env.example .env # Windows: copy .env.example .envOpen .env and set at least these two values:
MCP_FS_TOKEN=put-a-long-random-string-here
MCP_FS_ROOT=D:\projects # the folder the AI is allowed to work inGenerate a strong token with:
python -c "import secrets; print(secrets.token_urlsafe(32))"3. Run
uv run remote-fs-mcpThe server is now running at http://localhost:8765/mcp.
Check that it's up by opening http://localhost:8765/health.
Use it from anywhere (browser or phone)
Your PC has to be reachable from the internet. Pick one of these options.
Option A: Tunnel from your PC (easiest)
Use ngrok or cloudflared. Add these lines to .env:
MCP_FS_ALLOWED_HOSTS=*.ngrok-free.app # cloudflared: *.trycloudflare.com
MCP_FS_ALLOWED_ORIGINS=https://claude.ai
MCP_FS_URL_TOKEN=trueStart the server, then start the tunnel in a second terminal:
remote-fs-mcp
ngrok http 8765 # or: cloudflared tunnel --url http://localhost:8765Your server URL is the address ngrok gives you, for example https://abc123.ngrok-free.app.
Option B: VPS with your own domain
Run the server on the VPS with
MCP_FS_HOST=127.0.0.1.Put Caddy in front of it for free HTTPS. A ready config is in
deploy/Caddyfile.Set
MCP_FS_ALLOWED_HOSTS=mcp.yourdomain.com.Optional: run it as a background service with
deploy/remote-fs-mcp.service.
Option C: Docker (safest)
Commands run inside the container, not directly on your machine.
cp .env.example .env
mkdir workspace
docker compose up -d --buildPut the files you want the AI to work on in ./workspace.
Connect your AI
In every example below:
Replace
https://YOUR-URLwith your server address (local:http://localhost:8765).Replace
YOUR_TOKENwith yourMCP_FS_TOKEN.
Claude (web and mobile)
Go to Settings → Connectors → Add custom connector.
Paste this URL:
https://YOUR-URL/YOUR_TOKENLeave the auth settings empty.
This needs MCP_FS_URL_TOKEN=true in .env, as shown in Option A.
Claude Code
claude mcp add --transport http remote-fs https://YOUR-URL/mcp \
--header "Authorization: Bearer YOUR_TOKEN"Cursor
Add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"remote-fs": {
"url": "https://YOUR-URL/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}VS Code / GitHub Copilot
Add this to .vscode/mcp.json:
{
"servers": {
"remote-fs": {
"type": "http",
"url": "https://YOUR-URL/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}Claude Desktop (and other apps that only support local commands)
{
"mcpServers": {
"remote-fs": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://YOUR-URL/mcp",
"--header", "Authorization: Bearer YOUR_TOKEN"]
}
}
}Same computer, no network
{
"mcpServers": {
"remote-fs": {
"command": "remote-fs-mcp",
"args": ["--stdio", "--root", "/path/to/project"]
}
}
}Your own Python code
import asyncio
from fastmcp import Client
async def main():
async with Client("https://YOUR-URL/mcp", auth="YOUR_TOKEN") as ai:
result = await ai.call_tool("run_command", {"command": "dir"})
print(result.structured_content["stdout"])
asyncio.run(main())Any language (plain HTTP)
curl -s https://YOUR-URL/mcp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_directory","arguments":{"path":"."}}}'Usage
Once connected, talk to your AI normally. It picks the right tools on its own.
Example prompts:
"Show me what's in my project folder."
"Find every file that uses
fetchUserand rename it togetUser.""Read
src/app.pyand fix the bug on line 40.""Create a new Next.js app in a folder called
my-site.""Run
npm install, then start the dev server and tell me when it's ready.""Run the tests and fix whatever fails."
"Check git status and commit my changes with a good message."
"Zip the
reportsfolder."
All paths are relative to MCP_FS_ROOT, so src/app.py means <root>/src/app.py.
Tools
Files and folders
Tool | What it does |
| Read a file, or a range of lines ( |
| Read up to 50 files in one call. |
| Create or overwrite a file. Modes: |
| Find and replace exact text in a file and get back a diff. Supports |
| List a folder. Use |
| Size, type, permissions and dates. |
| Create a folder, including any missing parents. |
| Copy a file or a whole folder. |
| Move or rename a file or folder. |
| Delete a file or folder. A folder that isn't empty needs |
Search
Tool | What it does |
| Find files by name, e.g. |
| Search inside files, as plain text or regex, with optional context lines. |
Terminal
Tool | What it does |
| Run a command and wait for it to finish. Returns output and exit code. Has a timeout. |
| Start something that keeps running (dev server, watcher) and return its id. |
| Read new output from a running process. |
| Type into a running process, e.g. to answer a prompt. |
| Stop a process and everything it started. |
| Show the processes that are running. |
Info
Tool | What it does |
| Root folder, OS, shell, and which features are enabled. |
Configuration
All settings go in .env.
Setting | Default | What it does |
| auto-generated | Access token. |
| – | Several tokens, comma separated, so each AI gets its own. |
| current folder | The only folder the file tools can access. |
|
| Allow reading only. Hides all write, delete and command tools. |
|
| Turn the terminal tools on or off. |
|
| Turn deleting on or off. |
| – | Files the AI can never touch, e.g. |
|
| Allow access to dotfiles. |
| – | Your public domain. Wildcards work, e.g. |
| – | Allowed web origins, e.g. |
|
| Accept the token in the URL: |
|
| Address to listen on. |
|
| Port. |
| bash / cmd.exe | Shell used for commands, e.g. |
|
| Default command timeout in seconds. |
|
| Longest timeout a command can ask for. |
|
| Maximum size of each tool response. |
|
| Maximum background processes at once. |
Command-line flags (these override .env):
remote-fs-mcp --root D:\projects --port 9000
remote-fs-mcp --read-only # AI can only look, not change anything
remote-fs-mcp --no-commands # files only, no terminal
remote-fs-mcp --stdio # local use, no networkSecurity
⚠️ This gives an AI real control over a computer. Treat your token like a password.
Every request needs your token. Requests without it are rejected.
File tools only work inside
MCP_FS_ROOT. Paths using../, other drives, and symlinks that point outside are all blocked.Terminal commands are not limited to the root folder. They can do anything your user account can do. If others might use the server, run it in Docker or a VM, or use
--no-commands.Always use HTTPS on the internet. Tunnels and Caddy give you HTTPS automatically.
If you use
MCP_FS_URL_TOKEN, the URL itself is the password. Don't share it. If it leaks, changeMCP_FS_TOKENand restart.Your token is hidden from the commands the AI runs.
Use
MCP_FS_DENY_GLOBSto protect secrets like.envfiles and keys.
Troubleshooting
Error | Fix |
| Add your domain to |
| Add the site to |
| The token is missing or wrong. |
| Set |
Search is slow | Install ripgrep: |
AI can't find my files | Check |
Development
pip install -e ".[dev]"
python tests/test_e2e.pyThe tests start a real server and check every tool, the auth, and the sandbox.
License
MIT. Use it, change it, ship it.
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server to run your Atako AI agents: chat, projects, files, integrations and channels.
A full backend your AI coding agent can set up over MCP
Related MCP Servers
- AlicenseAqualityCmaintenanceAn open MCP server that gives any AI agent SSH access to remote Linux/Unix machines — shell commands, file read/write, and SFTP transfers.11MIT
- AlicenseAqualityDmaintenanceA secure, Dockerized MCP server enabling AI assistants to perform file and directory CRUD operations like read, write, edit, search, and manage local files via natural language.11MIT
- AlicenseNot gradedqualityAmaintenanceTurns any Linux server into an AI-agent-accessible machine over HTTPS, allowing MCP clients like ChatGPT, Claude, and Grok to securely control files, run shell commands, inspect system state, query SQLite, and work with git behind a bearer token.74 npm4MIT
- AlicenseNot gradedqualityCmaintenanceGives MCP-compatible AI clients a controlled bridge to local files, processes, search, and document utilities, including reading/writing and moving files, text block editing, directory listing, content search, starting and managing terminal processes, and PDF/Excel/DOCX/image handling. It serves these tools over MCP Streamable HTTP at a configurable endpoint, with optional Bearer-token authentication and read-only or restricted-directory modes for safer remote exposure.1MIT