modelcontextprotocol / modelcontextprotocol/servers

Improve Permission Handling in Filesystem MCP Server

Open
#239 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement server-filesystem
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:

  1. User requests to read a file using read_file tool
  2. Operation fails due to lack of permissions
  3. Claude app prompts for system permissions
  4. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.