modelcontextprotocol / modelcontextprotocol/servers

filesystem MCP server doesn't fully support filenames that contain the "NARROW NO-BREAK SPACE" character (U+202F)

Open
#1,597 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug server-filesystem
Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Describe the bug

When using Claude desktop on a Mac together with the filesystem MCP server "@modelcontextprotocol/server-filesystem", Claude is unable to perform operations on files that contain the "NARROW NO-BREAK SPACE" Unicode character (U+202F). For example, in attempting to move such a file to a different directory, Claude reports back: "encountered file access issues that prevented the direct move operation."

Renaming the file (e.g. to replace the "NARROW NO-BREAK SPACE" character with a regular space character resolves the issue.

To Reproduce

My Mac is running Sonoma OS 14.6.1 (23G93).

My claude_desktop_config.json file looks like this:

{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/bserridge/Screenshots"
]
}
}
}

Steps to reproduce the behavior:

  1. Take a screenshot on the Mac; that'll generate a file with a name something like:

Screenshot 2025-04-26 at 9.52.38 AM.png

The filename has several spaces in it, but the last space, right before the "AM", is not the usual "SPACE" character; rather, by default on the Mac when taking a screensho, it's the "NARROW NO-BREAK SPACE" character (U+202F)

  1. Ask Claude to move the file to a subdirectory. For example, the following two prompts reproduce the error:

Can you make a new subdirectory (within Screenshots) called "new"?

followed by:

Could you please move the newest screenshot into the "new" subdirectory?

Expected behavior
A clear and concise description of what you expected to happen.

I would expect the screenshot that I just took to be moved into the "new" subdirectory.

Instead, Claude tries several times, using several different approaches, before giving up and concluding:

"I identified "Screenshot 2025-01-18 at 11.15.43 AM.png" as the newest file based on its filename. I attempted multiple approaches to move it, including escaped paths and programmatic methods. I successfully moved a different file (.DS_Store) to demonstrate that the file system works for files without spaces. The issue appears to be a technical limitation in how files with spaces in their names are handled."

I can then go into the terminal and rename the file, changing only the last "narrow" space to a regular space, e.g.:

mv Screenshot\ 2025-04-26\ at\ 9.46.28 AM.png Screenshot\ 2025-04-26\ at\ 9.46.28\ AM.png

After doing so, I can repeat the prompt and it gets executed with success, suggesting that the issue is in the handling of the "NARROW NO-BREAK SPACE" character.

Additional context
Add any other context about the problem here.

Full Claude interaction / conversation here:

https://claude.ai/share/490e32fe-16c6-4bf3-82bb-f22d60bd015d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the move operation with a filename containing U+202F using the @modelcontextprotocol/server-filesystem package and the provided Claude Desktop configuration. Then inspect the filesystem server's path handling; done means files with narrow no-break spaces can be moved successfully without renaming them.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.