FileMCP
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., "@FileMCPcreate a new file called hello.txt with the content 'Hello World'"
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.
FileMCP
FileMCP is a small Model Context Protocol (MCP) file server for AI Agents.
The server exposes simple file operations under an AgentFiles folder.
What It Does
FileMCP exposes these MCP tools:
createFileTool: creates a new file underAgentFilesand refuses to silently overwrite an existing file.overwriteFileTool: writes or replaces a file underAgentFiles.createDirectoryTool: creates a directory underAgentFiles.readFileTool: reads a UTF-8 text file fromAgentFiles.listDirectoryTool: lists files and folders underAgentFiles.
All five tools validate sandbox paths before accessing the filesystem. They reject
absolute paths, .. components, Windows device names and alternate data streams,
symbolic links, junctions, and hard-linked files. File creation uses an exclusive
write so concurrent requests cannot silently replace an existing file. Failed
operations return MCP's isError: true flag.
Related MCP server: files-mcp-ts
Requirements
Node.js 20+
npm
Install FileMCP
Once published to npm, install it from your agent project's root directory:
npm install @chey.dev/filemcpUse With An Agent
Launch the installed executable as a stdio MCP server from your agent project:
npx --no-install filemcpnpx runs a package's executable. --no-install prevents it from installing a
missing package, so install FileMCP with the command above first.
The npm package is named @chey.dev/filemcp; its executable is named filemcp.
Configure your agent's MCP client to launch that command with its working directory
set to the project whose AgentFiles sandbox you intend to use. No compilation is
needed.
Connect From A Node.js App
Use the connection helper instead of repeating MCP client and stdio setup:
import { connectFileMcp } from "@chey.dev/filemcp/client";
const mcp = await connectFileMcp({ cwd: process.cwd() });
try {
const { tools } = await mcp.listTools();
console.log(tools.map((tool) => tool.name));
} finally {
await mcp.close();
}The helper starts FileMCP and returns a connected MCP SDK client. No separate server command or MCP client installation is needed. Importing the helper alone does not start the server.
cwd must name an existing directory; it defaults to the current working
directory. Relative paths resolve from that directory. Files belong to
AgentFiles beneath the selected directory, not beneath FileMCP's installation.
Use the returned client's listTools() and callTool() methods in your existing
agent tool-calling logic. The helper does not call an AI model or translate AI
requests. Always await mcp.close() when finished to stop the child server.
If connecting fails, the helper attempts transport cleanup and rejects with the
original error.
File Operations
File operations are relative to an AgentFiles folder in the server's startup
working directory. This location is captured once and does not change if the
process later changes its working directory.
Asking the agent to read file.txt actually reads AgentFiles/file.txt.
Same with writes.
The server creates AgentFiles automatically. Use . to list its root. Create
nested directories before writing files into them. Overwrites are allowed only
through overwriteFileTool; requesting a new file never overwrites existing data.
Security Boundary
These checks constrain paths supplied to this server's tools; they are not an operating-system sandbox. A hostile local process that can modify sandbox directories concurrently can race filesystem checks. Keep the sandbox and its parent directory under trusted control. For isolation from other local processes, run under a restricted OS account or in a container with only the intended sandbox mounted writable. Other filesystem or shell tools available to your agent are not restricted by this server.
Project Files
server.js: creates the MCP server, registers tools, and starts stdio transport.client.js: connects Node.js applications to the server over stdio.tools.js: implements sandboxed filesystem tools.toolSchemas.js: defines tool descriptions and Zod schemas.
Available Tools
5 toolscreateDirectoryToolB
Creates a directory with the specified name. The directory will be created inside the 'AgentFiles' directory.
Inputs: dirName (required). Returns: text
createFileToolC
Creates a file with the specified name and content.
Inputs: content (required), fileName (required). Returns: text
listDirectoryToolB
Lists files and folders in a directory under 'AgentFiles'.
Inputs: dirPath (required). Returns: text
overwriteFileToolB
Overwrites a file with the specified name and content under 'AgentFiles'.
Inputs: content (required), fileName (required). Returns: text
readFileToolA
Reads a file from the 'AgentFiles' directory and returns its contents as text.
Inputs: filePath (required). Returns: text
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 5 tools
createFileTool and overwriteFileTool both write name+content to a file and their descriptions do not clarify behavior when the file already exists, creating a mild risk of misselection. The other three tools (createDirectoryTool, readFileTool, listDirectoryTool) are clearly distinct in purpose, so overlap is limited to one pair.
All tools follow a strict verb_noun pattern in camelCase with the same 'Tool' suffix (createFileTool, overwriteFileTool, createDirectoryTool, readFileTool, listDirectoryTool). The naming is highly predictable and self-documenting.
Five tools is well-scoped for a sandboxed file-operation server: create file, overwrite file, create directory, read file, and list directory. Each tool covers a distinct capability and none feels redundant or excessive.
The surface covers create, read, list, and overwrite, but there is no delete operation for files or directories, and no move/rename or metadata/existence check. These are notable gaps for a file-management domain, though agents can partially work around the missing overwrite-as-update behavior.
Maintenance
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
Zero-install remote MCP server for proof-of-existence file attestation.
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
Related MCP Servers
- AlicenseAqualityAmaintenanceFilesystem MCP server for AI assistants. Search, read, edit, and manage local files in directories you choose.6142,827 npm32MIT
- FlicenseBqualityDmaintenanceA lightweight MCP server for basic file operations, enabling reading, writing, and listing files securely via the Model Context Protocol.31-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides secure access to local file system operations.MIT
- FlicenseCqualityDmaintenanceAn MCP server for reading files from the local filesystem. Currently supports listing files in directories on the Desktop.3-