local-mcp
Click on "Install 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., "@local-mcpshow me the contents of README.md"
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.
local-mcp
A lightweight, stdio-based MCP (Model Context Protocol) server for local file system operations. Designed to run as a subprocess for AI assistants (Claude, Cursor, Chatbox, etc.) that support the MCP protocol.
Features
Read/Write/Edit files with cache (FIFO, max 10) & atomic writes (temp + rename); head+tail simultaneous reading shows start/end with omitted middle
Search files with smart scoring (glob → grep fallback)
Move/Rename files and directories
List directories with iterative tree view (stack-safe, no recursion)
Execute shell commands (bat bypass for Windows, b64 mode for complex commands)
Batch operations with atomic rollback &
$prevresult referencingBlock-level code manipulation (by function name or line range, with dry-run)
Bookmark system for path aliases (in-memory cache, persisted to JSON)
All tool parameters include descriptions to help AI assistants call them correctly — no more guessing.
Related MCP server: Universal MCP Server
Available Tools
Tool | Description |
| Read file, optional head/tail line limit (both = head + |
| File search by name (glob) or content (grep), exclude/ext filter |
| List directory; tree view ( |
| Execute shell command; timeout, cwd, base64-encoded cmd modes |
| Move or rename file/directory |
| Run multiple ops sequentially; atomic rollback, |
| Unified: read, write, edit, append, delete, info, mkdir, move |
| Read/replace/insert/delete code blocks by line range or function name |
| Persistent path aliases (add/get/list/delete) |
Installation
npm installUsage
As an MCP server
Configure your AI assistant to spawn local-mcp as a subprocess:
{
"mcpServers": {
"local-mcp": {
"command": "node",
"args": ["path/to/local-mcp.mjs"]
}
}
}Configuration via environment variables
Variable | Default | Description |
|
| Working directory root |
|
| Data directory (bookmarks, temp files) |
|
| Default directory for tree/ls commands |
Security
All file operations are restricted to
MCP_WORKSPACEand its subdirectoriesShell execution writes to a temp file and immediately deletes it
Bookmark data stored in
MCP_DATA
Optimizations
Area | Detail |
Code size | ~16 KB, deduplicated temp-file write / cache patterns into shared helpers |
Parameter docs | All 9 tools × 50 parameter descriptions — AI assistants know exactly what to pass |
Tree view | Iterative (stack-based) instead of recursive — safe for deep directory trees |
Search | Cross-platform pure-JS grep (no Windows |
Cache | Read cache with mtime invalidation, FIFO eviction at 10 entries |
Bookmarks | In-memory cache avoids redundant disk reads on every lookup |
Edit | Exact match fast-path + fuzzy line-trim fallback, minimal normalization passes |
Dependencies
glob— file pattern matchingdiff— unified diff generation
Only 2 runtime dependencies, no frameworks. Total install size ~6 MB.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/fan-67/local-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server