Skip to main content
Glama
Ggowda2004

file_reader_mcp

file_reader_mcp

An MCP (Model Context Protocol) server for reading and discovering files from the local filesystem.

Current capabilities

This project now provides three MCP tools:

  • list_files — Lists files and folders in a given directory

    • Folders are shown with a trailing /

    • Results are sorted alphabetically

    • Access is restricted to paths under the allowed workspace

  • read_file — Reads the contents of a text file

    • Returns the full file content as a string

    • Supports files inside the allowed workspace only

  • search_files — Searches for files by keyword within a directory tree

    • Returns matching file paths

    • Helps quickly locate relevant files

Implementation notes

  • The file access layer has been updated to use pathlib instead of os for a more modern and readable path handling approach.

  • Access is still restricted to a safe allowed root for security.

Related MCP server: filesystem-mcp

Requirements

  • Python 3.10+

  • uv (recommended) or pip

Setup

uv sync

Running the server

uv run python src/server.py

The server uses stdio transport and is meant to be configured as an MCP server in Cursor or another MCP-compatible client.

Project structure

file_reader_mcp/
├── src/
│   ├── file_access.py  # Pathlib-based file access helpers
│   └── server.py       # MCP server exposing list_files, read_file, and search_files
├── test/
│   └── test_os.py      # Local tests for directory listing
└── pyproject.toml

Available Tools

3 tools
list_filesD
ParametersJSON Schema
NameRequiredDescriptionDefault
directoryNo.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

read_fileD
ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

search_filesD
ParametersJSON Schema
NameRequiredDescriptionDefault
keywordYes
directoryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

TDQS

C2.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: listing files, reading file contents, and searching for files. No overlap or ambiguity.

Naming Consistency4/5

All tools follow a verb_noun pattern, but read_file uses singular 'file' while list_files and search_files use plural 'files'. This minor inconsistency prevents a perfect score.

Tool Count5/5

Three tools is well-scoped for a file reader server. Each tool serves a core need without redundancy or bloat.

Completeness5/5

For a read-only file server, the surface covers listing, reading, and searching—all essential operations. No obvious gaps for the stated purpose.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

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/Ggowda2004/FIle_reader_MCP_tool'

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