modelcontextprotocol / modelcontextprotocol/servers
Improve Permission Handling in Filesystem MCP Server
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 90.5k
- Forks
- 11.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
Improve Permission Handling in Filesystem MCP Server
Issue
When using the Filesystem MCP server with Claude desktop app on macOS, there's a suboptimal user experience around system-level file permissions. Currently, permission prompts are triggered only after a failed file access attempt, leading to a jarring experience where:
- User requests to read a file using
read_filetool - Operation fails due to lack of permissions
- Claude app prompts for system permissions
- User has to retry the operation
Impact
This creates a poor user experience where:
- Operations fail before permissions are established
- Users see error messages before permission prompts
- Multiple permission prompts might appear for different files
- Operations need to be manually retried after granting permissions
Proposed Solution
Add a new check_permissions tool to the Filesystem MCP server that would:
- Allow proactive permission checking before file operations
- Trigger any needed system permission prompts upfront
- Return clear status about which paths are accessible
- Enable better error handling and user guidance
Implementation Details
- New tool:
check_permissions - Input: Array of paths to validate
- Output: Mapping of paths to their permission status
- Validates both MCP server allowed directories and system-level permissions
- Triggers OS permission prompts in a controlled manner
Benefits
- More predictable permission flow
- Better user experience
- Clearer feedback about access status
- Reduced need for error recovery
- Maintains separation of concerns within MCP architecture
Notes
While the ideal fix might involve changes to the Claude desktop app itself, this server-side solution provides a workable improvement within the current architecture.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Filesystem MCP server and its existing read_file operation, then inspect how allowed directories and system-level access are currently checked. Define the check_permissions tool around the stated array-of-paths input and path-status mapping, with completion requiring controlled permission prompts and clear access results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100