Filesystem MCP server data privacy: does file content leave the allowed directories?
The filesystem MCP server has no enterprise edition and no SSO, and it returns file data to whichever client connects to it. Whether file content leaves the allowed directories therefore depends on the client application and the model provider it sends content to, not on the server. Content that a tool call returns, such as the complete text returned by read_text_file, becomes part of what the connected client holds, and the client decides what happens next. The server has no retention setting of its own, so a security reviewer should treat the server as the point where file data enters the session and the client as the point where it may be stored or transmitted.
A security reviewer has to answer two questions before approval: what file content reaches the model, and what retention controls apply after it does. Start by listing which directories are passed on the command line as allowed directories, since the server README describes these as the only paths it may touch. Then test which tools return full content, including read_text_file, read_media_file (which returns base64 data with a MIME type) and read_multiple_files. Confirm with the client vendor whether tool results are kept in conversation history, written to logs, or sent to the model provider, and ask the model provider which retention and training terms apply to that traffic. Do not assume any of these answers from the server documentation alone.
Files in allowed directories are also exposed as MCP resources through the file://{+path} template, so the client application decides whether to attach a file to the model's context or show it to a user. The README says resources/list returns nothing because the server never enumerates the disk, and resource reads carry a cache hint of ttlMs: 0 with cacheScope: private. Note that copy_file copies a file without its content passing through the conversation, which can reduce exposure for some workflows. The server logs its effective allowed directories to stderr at startup and whenever they change, which gives reviewers a record of scope, but it does not record what content was sent. Confirm the client's audit and retention options directly with its vendor before approving use with sensitive directories.
Data privacy capabilities of the filesystem MCP server
This table compares each data privacy behavior of the filesystem MCP server against three questions: whether the server does it by default, whether the outcome depends on the connected client, or whether a separate component is needed. Read it as a map of where file data can travel and where a reviewer must ask the client or model provider for evidence. The main takeaway is that the server returns file content to whatever client connects, and the README documents no retention settings, so retention is decided outside the server.
| Capability | Built in | Depends on client | Outside component needed |
|---|---|---|---|
| Returning full text file contents | Read tools such as read_text_file return the complete file to the connecting client | Whether the content is kept in the conversation, shown to a user or sent to the model provider | Client-side permission prompts or content controls, if the organization requires them |
| Returning base64 media blocks | read_media_file returns base64-encoded data with its MIME type | Whether the client renders, stores or forwards the media to a model | Client or proxy inspection if media files are sensitive |
| Exposing files as MCP resources | Files in allowed directories are available through the file:// resource template | Whether the client attaches a resource to model context or shows it to the user | Client settings that require user approval before attaching resources |
| Directory listing and metadata | list_directory, list_directory_with_sizes and search return names, sizes and matches within allowed directories | Whether listings are sent to the model or kept in logs on the client side | Restricting which directories are allowed at launch |
| Copying without content entering the conversation | copy_file copies a file without its content passing through the conversation | Whether the client records tool calls and arguments in its own history | Not documented as an enforced control |
| Startup logging of allowed directories | Effective allowed directories are written to stderr at startup and when they change | Where the client captures stderr and how long it keeps it | Log collection and retention on the host |
| Documented retention settings | Not provided by the server README | Retention follows the client and the model provider | Request retention terms and settings from the client vendor and the model provider |
Which file data the client receives: content, media and metadata
Every file a read tool opens is disclosed to the connected client in full. The filesystem MCP server's read_text_file tool returns a file's complete contents to the client, and read_media_file returns the file as a base64-encoded block with its MIME type. Nothing in the server trims or summarizes that content before it leaves. Once an AI client calls one of these tools against a path inside an allowed directory, the whole file is part of the data the client receives, whatever the user intended to ask about. Reviewers should treat each allowed directory as a body of data the connected client can read in its entirety, and should check which files sit there before approving the server, including credentials, exports, .env files and customer records that may have been saved beside working code.
Metadata and names are disclosed too, even when no file body is read. list_directory and list_directory_with_sizes return file and folder names, and the sized variant adds sizes, so a client can map a directory tree without opening anything. The search capability returns matching file paths, which can reveal sensitive naming conventions such as client or patient identifiers in file names. Confirm with the server's README which tools are enabled in your build and whether you can exclude the listing or search tools for a given deployment. If file names are themselves sensitive, the directory layout needs to be cleaned up before the server is pointed at it, because the server does not filter names by content.
Resources are a separate path with its own behavior. Files in allowed directories are exposed through the file://{+path} template, so the client application decides whether to attach a file to the model's context or show it to the user. The README says resources/list returns nothing because the server never enumerates the disk, and resource reads carry a cache hint of ttlMs: 0 with cacheScope: private. Reviewers should confirm how their client handles attachments and whether users can pull files into a prompt without a tool call. The Filesystem MCP Server README is the primary reference for these shapes and should be checked against the version you deploy.
How resources and tool results differ in what the model sees
Tools are the main way a connected client asks the server for file data. When the model calls a read tool, the server sends the result back to the client, and the client places that result in the conversation. According to the server README, read_text_file returns a file's complete contents, and read_media_file returns a base64-encoded block with its MIME type. Both results reach the connecting client in full.
- Full text returns: read_text_file sends the whole file, not a excerpt chosen by the server.
- Binary content returns encoded: read_media_file sends base64 data with a MIME type, which the client may decode or forward.
- Multi-file reads widen exposure: read_multiple_files returns several files in one call, so one request can move many documents.
- Listing reveals metadata: list_directory_with_sizes returns names and sizes for entries inside allowed directories.
- Writes and edits return confirmation, not the whole file by design: confirm with the vendor and your own tests what each write tool echoes back.
Check which tools your configuration exposes and whether a read result can be kept in the client's history. Test one read tool with a sensitive test file and inspect what appears in the conversation.
Files inside allowed directories are also exposed as MCP resources through the file://{+path} template. A resource is not sent to the model automatically. According to the server README, a client application can decide whether to attach a resource to the model's context or show it to the user. The decision belongs to the client, so the server's behavior alone does not determine what the model sees.
- Client decides attachment: the host application chooses whether a resource enters the model context or only appears in the interface.
- No disk enumeration: according to the README, resources/list returns nothing because the server never enumerates the disk, so a client cannot browse a full resource catalog from the server.
- Reads are addressed by path: a client must request a specific file:// path to read it.
- Caching is private: resource reads carry a cache hint of ttlMs 0 with cacheScope private, which tells clients not to share cached content.
- Client behavior varies: confirm how each client you approve handles resource attachment and whether it asks the user first.
Confirm with the client vendor whether resources are attached automatically or only on user action. Then test that a resource read does not enter model context without the approval you expect.
copy_file is the one file operation that the README describes as keeping content out of the conversation. It copies a file within the allowed directories, and according to the README the file's content does not pass through the conversation. This matters for reviewers who want to move data between locations without placing it in the model's context.
- Content stays out of the conversation: according to the README, the copy does not route file content through the chat.
- Still within allowed directories: the copy works only inside directories the server was started with.
- Write permission still applies: copy_file changes the filesystem, so it is a write action even though content is not returned.
- Other tools differ: move_file and edit_file are not described the same way, so do not assume they share this behavior.
- Audit the destination: a copy can place sensitive data in a new location that the client or other users can reach.
Ask whether copy_file is needed for your workflows and remove it from the exposed tool set if it is not. Verify the README statement against the version you deploy.
No channel above determines how long file data is kept. The server README documents no retention settings, and it logs only its effective allowed directories to stderr at startup and when they change. Once file content reaches the client, retention and onward use depend on the client application and the model provider.
- Server documents no retention setting: the README lists none, so there is no server-side control to set.
- Startup log covers directories: the server writes its effective allowed directories to stderr, which is not a record of file content.
- Client history stores results: tool results and attached resources may persist in the client's conversation history.
- Provider terms govern model data: the model provider's data handling and retention terms apply to content sent to the model.
- Local MCP servers carry host access: the MCP security best practices page notes that local servers may have direct access to the user's system and are attractive targets for attack.
Request the client and model provider's written retention terms for your plan, and confirm whether conversation history can be disabled or deleted by administrators.
Where file data travels from disk to model provider
The path starts in the allowed directories on the user's machine, passes through the filesystem server, and then reaches the MCP client application, which decides whether file content is attached to the model's context or shown to the user. The server boundary stops at the client: once content is sent to the model provider, retention is set by the client and provider, not by the server. Check the server's allowed directories first, then confirm the client's and provider's retention terms before approving use with sensitive files.
File content moves from allowed directories through the server to the client, then to the model provider.
Why retention depends on the client and model provider, not the server
The filesystem MCP server reads and returns file content, but it documents no retention settings of its own. What happens to that content after it reaches the client is decided by the client application and the model provider behind it, so each of those owners needs to be questioned directly.
No documented server retention
The server README documents no retention settings, so the server itself offers no configurable period for keeping file content it returned. Ask your engineering team to confirm that the deployed version writes no cache, index or copy of returned file content to disk, and that its only persistent output is the startup log. Test this by reading a sensitive file in a staging directory and checking what remains on the host afterward.
Server READMEClient caching and transcripts
Tools such as read_text_file return a file's complete contents to the connecting client, and that content can enter the conversation history the client keeps. Resource reads carry a cache hint of ttlMs: 0 with cacheScope: private, which limits caching on the server's side of the exchange but does not govern what the client stores. Ask each client vendor where transcripts, tool results and attachments are kept, for how long, and whether users or admins can delete them.
Model provider terms govern prompts
Once file content is attached to a prompt, it is sent to the model provider configured in the client, and that provider's terms determine handling, logging and training use. The filesystem server has no say in those terms. Confirm which provider and which account tier your staff use, whether zero data retention or equivalent terms apply to that tier, and where processing happens relative to your data residency obligations.
MCP security practicesStderr log as the only server record
The server logs its effective allowed directories to stderr at startup and whenever they change, and the README describes no other server-side record of reads. That log shows which directories were exposed, not which files a model opened or which content was returned. Ask whether your client captures stderr, where it is written, and who can read it, then decide whether that record is enough for your audit requirements or whether the client's own logs must fill the gap.
How the allowed-directory boundary limits what is returned
The allowed-directory boundary decides which parts of a disk the filesystem MCP server may touch at all, and it is the first control a reviewer should verify. The server README says it may only touch the directories passed on the command line, and it describes that method as the recommended one because it works on every protocol version. In practice, the @modelcontextprotocol/server-filesystem launch arguments define the perimeter, so a reviewer should read the exact directories listed in the client configuration and confirm that nothing broader, such as a home directory or a volume root, was added for convenience. The server logs its effective allowed directories to stderr at startup and whenever they change, which gives the reviewer a log line to check after each configuration change.
The MCP security best practices page describes local MCP servers as running on the user's machine, with possibly direct access to the user's system, and as attractive targets for attackers. That framing matters for data privacy because a local server inherits the user's file permissions within whatever directories it is granted. The boundary limits scope but not what is inside it. Once a file sits in an allowed directory, a tool such as read_text_file returns its complete contents to the connected client, and read_media_file returns the content as a base64-encoded block with its MIME type. A secret in a .env file or a customer export inside an allowed folder reaches the client just as a design document does. Reviewers should therefore ask which folders contain regulated or credential-bearing files and keep them out of the grant, not assume the server filters content.
How the privacy answer changes by data sensitivity and client
Files that contain personal data, such as patient records, customer statements or employee files, reach the client in full when a tool such as read_text_file runs against them. The server does not filter or redact content, so the privacy question moves to the client application and the model provider that receives the conversation. Confirm with the client vendor whether prompts and tool results are retained, for how long, and whether they are used for training, and get the answer in writing for the plan your staff will use. Ask the model provider whether it will sign a data processing agreement and what it commits to for transfers outside your region, since GDPR and HIPAA obligations attach to that flow.
- Full content leaves the machine: Any allowed file that a client reads is sent in full to the connected application, which may forward it to a model.
- Directory scoping limits reach, not content: Restricting allowed directories keeps out-of-scope files away from the server, but cannot remove personal data from files inside the allowed folders.
- Retention sits outside the server: The server documents no retention settings, so the retention period is whatever the client and provider apply.
- Business associate and DPA terms: Confirm whether the model provider will sign terms covering the data you send, and under what plan.
- Logs may contain identifiers: Check whether the client records tool results or file paths in its own logs and who can read them.
Before approval, ask the client and provider to state retention, training use, sub-processors and transfer locations for the exact plan, and keep the written answers with the approval record.
Source trees often hold .env files, deployment manifests, private keys and tokens embedded in configuration. A filesystem server with read access returns those files as plain text when a client asks, so a secret in an allowed directory is a secret the connected client can see. Directory scoping helps by keeping secret-heavy folders such as home directories, SSH configuration and cloud credential stores outside the allowed list. It cannot tell a secret from ordinary code inside the directories you did allow, so secret handling is also a repository hygiene task.
- Secrets in allowed folders are readable: Any file inside an allowed directory can be returned in full, including credentials stored in plain text.
- Exclude credential locations explicitly: Keep the allowed directories to project folders and out of home directories and credential stores.
- Use secret scanning before exposure: Run a scanner over the working tree and rotate anything found before an agent is pointed at it.
- Write tools widen the risk: Tools such as
write_fileandedit_filecan change configuration files, so review what the client may modify. - Check where code context is sent: Confirm whether the client uploads code to a hosted model and whether that provider retains it.
Ask the client vendor which files are sent to the model during a session and whether any context is cached, and confirm the answers against your own repositories.
Public documents, such as published policies, product documentation and marketing material, carry the lowest privacy risk because the content is already available outside the company. The remaining concerns are less about confidentiality and more about integrity, since a client that can write files could alter documents that others rely on. Some public collections still include drafts, unreleased versions and internal annotations, so the content may be less public than the folder name suggests. The privacy answer is simpler here, but it still depends on the client and provider handling conversation data.
- Check for drafts and internal notes: Review folders labeled public for unreleased or internal material before scoping them in.
- Read-only access fits this context: A read-only configuration removes the write tools from consideration for collections that must not change.
- Metadata still reaches the client: Tools such as
list_directory_with_sizesreturn file names, sizes and structure, which can reveal project names or release timing. - Resources expose files to the application: Files inside allowed directories are available as resources that the client can attach to context or show to a user.
- Retention terms still apply: Even public content creates prompt and response logs at the client and provider.
Confirm which folders are truly public and whether the client's logs of tool results are acceptable for that content.
When the client and model run inside your own network, the data-flow question changes from where data goes to what the local components keep. The filesystem server itself runs as a local Node.js process and reads files on the machine where it is launched, so it does not send content to a vendor by design. The remaining exposure is in the client application, any logging it writes, and the model endpoint it calls. Confirm that each component is configured with no outbound calls you did not intend, and verify this in your own environment rather than relying on the server's documentation alone.
- Local process, local reads: The server reads files on the host where it runs, so content stays on that host unless the client forwards it.
- Client and model endpoint decide egress: Check the client's telemetry settings and the model endpoint address, since either can send content off the network.
- Stderr logs record allowed directories: The server logs its effective allowed directories at startup and when they change, so collect and protect those logs.
- Resource caching is private: Resource reads carry a private cache scope and a zero time-to-live hint, which limits sharing between clients.
- Copy operations avoid the conversation:
copy_filecopies a file without its content passing through the conversation, which can reduce exposure for sensitive files.
Test egress with network monitoring during a session and confirm the client and model settings with the vendor for your specific build.
Order of work before approving file access for AI clients
This sequence confirms what the filesystem MCP server can reach, what the connected client may keep, and what a tool call actually returns before any staff member points an AI client at real company files. It ends with a dated decision record tied to the client version.
Inventory directories that hold sensitive content
The security or data owner lists every folder that could be passed to the server and marks which ones hold regulated records, credentials, customer files, source code or personal data. Include config folders, home directories and synced cloud drives, since a folder added later is easy to miss. The step is done when each candidate directory has an owner and a sensitivity label that the review team has signed off on.
Set allowed directories narrowly
The engineer who configures the server passes only the directories the use case needs as command-line arguments, which the server README names as its recommended method for limiting access. Sensitive folders stay off the list, and the team avoids broad parents that would include them indirectly. The step is complete when the proposed list is written down and each entry traces back to the inventory.
Confirm retention and training terms in writing
The procurement or privacy reviewer asks the client vendor and the model provider in writing how prompts, tool results and file contents are retained, whether they are used for training, and which settings control those choices. The server README documents no retention settings, so these answers come from the client and provider contracts or documentation. The step is done when the reviewer holds dated written answers for each client plan in use.
Verify the startup log shows intended directories
After the server starts, the administrator checks the stderr output, which the server writes with its effective allowed directories at startup and whenever they change. The list must match the approved list exactly, with no extra paths and no missing ones. The step is complete when a captured log entry matches the approved list and is stored with the change record.
Test tool returns in a non-production folder
The tester creates a non-production folder containing dummy files that mimic the sensitive categories, then asks the client to call read tools such as read_text_file and list_directory. The tester confirms that full file contents come back to the client, that media reads return base64 data with a MIME type, and that copy_file moves content without it passing through the conversation. The step is done when the tester has recorded what each tool returned and whether the client displayed or attached it.
Check how the client handles resources
Because files inside allowed directories are also exposed as resources through the file template, the tester checks whether the client attaches resources to model context automatically or only on user action. The tester also confirms resources/list returns nothing, as the README describes. The step is complete when the client's behavior for attaching and caching resources is documented with a screenshot or log excerpt.
Record the decision with the client version
The approver writes down the allowed directories, the retention and training answers, the log evidence, the test results and the exact client and server versions in use. The record names the owner who must re-review when the client updates or the allowed list changes. The step is done when the record is filed and linked from the access request, so the approval can be traced and repeated.
Evidence a privacy reviewer asks for and where it comes from
This table lists the evidence a privacy reviewer usually requests for the filesystem MCP server and identifies where each item comes from, either the server's documented behavior or the client and model provider. Read the owner column first, because the server documents some items and leaves retention and provider handling to other parties. The main takeaway is that the server can show what it exposes, but it cannot produce retention terms on its own.
| Evidence item | Source in the tool or vendor | Owner |
|---|---|---|
| Allowed directory list | Directories passed on the command line, logged to stderr at startup and on change | Server administrator |
| Server startup log | Effective allowed directories written to stderr at startup and whenever they change | Server administrator |
| Tool output description | README lists tools such as read_text_file returning full file contents to the connected client | Server maintainers (documented in README) |
| Resource caching behavior | Resource reads carry ttlMs of 0 and cacheScope of private; resources/list returns nothing | Server maintainers (documented in README) |
| Client retention terms | Not documented by the server; confirm the client's stored transcripts and logs with its vendor | Client application vendor |
| Model provider data handling terms | Not documented by the server; confirm with the provider receiving file content in context | Model provider |
| Local machine risk posture | MCP security best practices describe local servers as having direct system access and being attractive targets | Server operator and security team |
Questions buyers ask before approving the filesystem MCP server
Does the filesystem MCP server send file content to the model?
The server itself returns file content to the connected client, and the client decides whether that content reaches the model. Per the server README, tools such as read_text_file return a file's complete contents to the connecting client, and read_media_file returns a base64-encoded block with its MIME type. Files inside allowed directories are also exposed as MCP resources through the file://{+path} template, so the client application can attach one to the model's context or show it to the user. Whether a file reaches the model therefore depends on what the staff member or the agent asks for and what the client does with the result. Ask the client vendor to document which tool results are added to the model context by default and whether users can review them before they are sent.
Does copy_file expose file content in the conversation?
According to the server README, copy_file copies a file without its content passing through the conversation. That is the documented behavior, and it applies to the server's own operation. It does not mean the file is invisible to the client, because the client may still be given the path, the directory listing or the file's metadata in other tool results. Before approving the tool, confirm that the agent cannot read the copied file through another tool such as read_text_file or read_multiple_files within the same allowed directories. Testing this in your own environment with a non-sensitive test file is the most reliable check.
Does the filesystem MCP server store file data?
The server README documents logging of its effective allowed directories to stderr at startup and whenever they change, and it does not describe a store of file contents kept by the server. Resource reads carry a cache hint of ttlMs: 0 with cacheScope: private, which tells the client not to cache them for reuse. The server README documents no retention settings for file data, so anything kept after a session is a matter for the client application, its logs and the model provider. Confirm with your own review whether any client you approve writes tool results to local history, transcripts or telemetry, and where those records are placed on the machine.
Who sets data retention for file content read through MCP?
Retention is set by the client application and the model provider, not by the filesystem server. The server has no retention setting to configure, so the policies that matter are the client's local history and logging options and the model provider's data handling terms for prompts and outputs. Ask each client vendor which settings control local transcript storage, whether an admin can enforce them centrally, and what the provider's terms say about retention of inputs and outputs for your plan. For regulated data, record those answers as the retention evidence for the approval, because the MCP server cannot supply them.
What does it cost to review and configure the filesystem MCP server?
The server package is published on npm as @modelcontextprotocol/server-filesystem and the researched facts do not supply a license fee or price for it, so confirm that with the source you use. Costs come from the client subscription, the model provider's plan, and the effort to set allowed directories, test the tool list and document the decision. Effort rises with the number of directories, the number of clients and the sensitivity of the data. Ask any implementation partner for a fixed-scope written quote that lists the directories tested, the clients covered, the retest of the setup and the evidence delivered. DeployOpen plans and delivers this work only under a written scope, and it provides a quote from that scope rather than a published price list.
Can our team configure the filesystem MCP server without outside help?
Many teams can, provided someone with systems and security skills owns the decision. The main configuration step is passing the allowed directories on the command line, which the server README describes as the recommended method that works on every protocol version. The harder work is checking what the client does with returned file content, confirming the retention settings, and testing that the tool list matches the approved scope. Internal teams should prepare a short test plan with non-sensitive files, a record of each client version tested and a review of the logs written at startup. If the approval also needs an independent security test, DeployOpen runs AI agent rollout security reviews that test tool and file permissions, data exposure and credential handling, then delivers a findings report and a retest.
Why is the MCP security guidance relevant to file data exposure?
The MCP security best practices page says local MCP servers run on a user's machine, may have direct access to the user's system, and are attractive targets for attack. For file data, this means the server acts with the access of the user who launched it, so a file the user can open may also be reachable by the agent. Treat the allowed directories as the boundary you approve, and check whether sensitive folders such as credential stores, exports or personal directories sit inside it. Review the guidance with your security team before approving any client that connects to the server.
How DeployOpen tests file exposure before rollout
DeployOpen approaches filesystem MCP server data privacy by mapping which file content, metadata and resources reach the connected client before any staff member relies on the setup. The work is fixed-scope, agreed in writing, and produces evidence that security and compliance reviewers can check.
How we scope
- Agree in writing which allowed directories, tools and client applications are in scope for the file data review
- Confirm which file types, folders and sensitive locations the client expects the AI client to be able to open
- Record which client application, model provider and retention settings the client's reviewers need to examine
- Define whether the review covers a read-only configuration, a read-write configuration, or both
How we build
- Set up a test environment in the client's own infrastructure that mirrors the intended directory layout
- Place labeled test files that stand in for sensitive content and trace which tool results and resource reads return them
- Check whether copy_file, move_file and similar operations move content through the conversation or stay on disk
- Review startup logs of allowed directories and confirm that changes to those directories are recorded
How we hand over
- Deliver a written findings report listing each file path, tool and resource that exposed content to the client
- Document recommended directory limits, read-only settings and client-side controls with the reason for each
- Map retention questions to the client and model provider, with a list of items the client must confirm with each vendor
- Retest the agreed fixes and record the results in the final report
How we support
- Engagements are fixed-scope, and ongoing support is available as a retainer
- Retainers can cover re-testing after the filesystem server, the client or the model provider changes its behavior
- Evidence can be prepared for the client's own AI security questionnaire or internal review board
- Changes to allowed directories can be re-reviewed before staff are given access to new folders

