Skip to main content
Glama
gary109

MCP Filesystem Python

by gary109

MCP Filesystem Python

A Model Context Protocol (MCP) server that provides secure, read-only access to files in a specified directory.

Features

  • Exposes files as MCP resources using `file://` URI scheme

  • Provides file search capabilities through MCP tools

  • Respects .gitignore patterns

  • Security features including path traversal protection

  • MIME type detection

Related MCP server: mcp-file-lens

Installation

Using UV:

uv add mcp-filesystem-python

Usage

Run the server:

uv run src/filesystem/server.py /path/to/directory

Claude Desktop Integration

Configuration Examples

Example configurations for Claude Desktop can be found in the `examples` directory:

  • `examples/claude_desktop_config.json`: Example for macOS/Linux

  • `examples/claude_desktop_config_windows.json`: Example for Windows

These files should be placed at:

  • macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`

  • Windows: `%AppData%\Claude\claude_desktop_config.json`

Make sure to:

  1. Replace the paths with your actual paths

  2. Use forward slashes (`/`) for macOS/Linux and backslashes (`\\`) for Windows

  3. Use absolute paths (not relative paths)

Development

  1. Clone the repository

  2. Create virtual environment and sync requirements, uv sync

License

MIT

Available Tools

3 tools
delete-fileB

Delete a file or directory

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath to delete
recursiveNoRecursively delete directories

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavior. It only states 'delete' without mentioning irreversibility, error conditions (e.g., missing path), or side effects like deleting non-empty directories. The recursive parameter is in schema but not highlighted as a risk.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no extraneous words. Perfectly concise for the information it conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Minimal description for a destructive operation. Lacks return value (though no output schema), error handling, and usage context. The tool is simple but could benefit from stating permanence or potential need for confirmation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (both 'Path to delete' and 'Recursively delete directories' are documented). The description adds no additional parameter context beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action ('delete') and the resource ('file or directory'). It distinguishes from siblings (search-files, write-file) by being the only deletion tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use versus alternatives. While the purpose is clear, there is no mention of prerequisites, fallbacks, or when not to use (e.g., for reverting changes).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search-filesA

Search for files containing specific text

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesText to search for
file_patternNoFile pattern to filter search (e.g., *.py for Python files)*

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states the basic function but omits important details like search scope (recursive?), case sensitivity, performance implications, or that it searches file contents (not names). The agent has limited behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that gets the point across. However, it could be slightly more detailed without losing conciseness (e.g., 'within a directory').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with two parameters and no output schema. The description gives the core purpose but misses details like default path (current directory), behavior with no match, and whether it searches file names or contents. It's adequate but has gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear parameter descriptions for 'query' and 'file_pattern'. The description adds no additional meaning beyond the schema, so baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for files by content ('containing specific text'). The verb 'Search' and resource 'files' are specific, and it distinguishes from siblings (delete-file, write-file) which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context that the tool finds files by text content. While it doesn't explicitly state when not to use it, the narrow focus and distinct sibling names make the appropriate usage clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

write-fileB

Write content to a file

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file
contentYesContent to write
create_dirsNoCreate parent directories if they don't exist

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits. It does not mention whether the file is overwritten or appended, nor any side effects like requiring permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise at one sentence, but perhaps too minimal. It earns its place but lacks useful detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, but description does not clarify return values or success indicators. The tool is simple but could benefit from mentioning output/behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters are described in the schema (100% coverage). The description adds no additional meaning beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Write content to a file' clearly states the verb and resource, making the purpose immediately obvious. It distinguishes from siblings delete-file and search-files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, or any prerequisites/exclusions. The description provides no context for appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observeddelete-file
    • First observedsearch-files
    • First observedwrite-file

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: deleting, searching, and writing files. No overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb-noun pattern with hyphens (e.g., delete-file, search-files). No mixing of conventions.

Tool Count3/5

With only 3 tools, the server is on the lower end of the ideal range. While each tool is distinct, the count feels thin for a filesystem server.

Completeness2/5

Fundamental operations like reading file content or listing directories are missing. Agents cannot perform basic file access, leading to significant gaps.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that provides a flexible lens into directory structures and files, enabling LLM clients to efficiently navigate and understand codebases with minimal noise. It offers secure, gitignore-aware file access with tools like directory listing, file reading, and grep-like search.
    1
    MIT
  • F
    license
    B
    quality
    C
    maintenance
    A read-only MCP server that exposes a local code workspace to AI clients via stdio, providing file browsing and text search capabilities with path safety rules.
    1
    -
  • A
    license
    A
    quality
    D
    maintenance
    Read-only filesystem MCP server with .gitignore filtering, multi-root support, and cache for efficient file exploration.
    4
    20
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gary109/mcp-filesystem-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server