MCP Filesystem Python
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Filesystem Pythonlist all Python files in the project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-pythonUsage
Run the server:
uv run src/filesystem/server.py /path/to/directoryClaude 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:
Replace the paths with your actual paths
Use forward slashes (`/`) for macOS/Linux and backslashes (`\\`) for Windows
Use absolute paths (not relative paths)
Development
Clone the repository
Create virtual environment and sync requirements,
uv sync
License
Available Tools
3 toolsdelete-fileB
Delete a file or directory
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to delete | |
| recursive | No | Recursively delete directories |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text to search for | |
| file_pattern | No | File pattern to filter search (e.g., *.py for Python files) | * |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file | |
| content | Yes | Content to write | |
| create_dirs | No | Create parent directories if they don't exist |
TDQS
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.
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.
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.
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.
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.
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.
3 tool updates
v0.1.0- First observed
delete-file - First observed
search-files - First observed
write-file
TDQS
Each tool has a clearly distinct purpose: deleting, searching, and writing files. No overlap or ambiguity.
All tool names follow a consistent verb-noun pattern with hyphens (e.g., delete-file, search-files). No mixing of conventions.
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.
Fundamental operations like reading file content or listing directories are missing. Agents cannot perform basic file access, leading to significant gaps.
Maintenance
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
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Browse and manage files in your Moxt AI workspace from any MCP client.
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for accessing curated awesome list documentation
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA secure MCP server enabling read-only access and file search capabilities within a specified directory, while respecting .gitignore patterns.-
- AlicenseNot gradedqualityCmaintenanceAn 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.1MIT
- FlicenseBqualityCmaintenanceA 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-
- AlicenseAqualityDmaintenanceRead-only filesystem MCP server with .gitignore filtering, multi-root support, and cache for efficient file exploration.420MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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