
A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

An MCP server that reads files across many formats and offers AI-powered semantic search over documents within a configured safe directory.
FS-MCP: File Reader & Semantic Search MCP Server is cataloged as an MCP server attributed to boleyn. An MCP server that reads files across many formats and offers AI-powered semantic search over documents within a configured safe directory. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for FS-MCP: File Reader & Semantic Search MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes, it supports Microsoft Office, OpenDocument and PDF formats, converting them to Markdown with caching.
Access is limited to the configured SAFE_DIRECTORY and its subdirectories, with path traversal protection and file size limits.
README.md · a6140257a8f9 · 采集于 2026-11-13 10:23:59 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A powerful MCP (Model Context Protocol) server that provides intelligent file reading and semantic search capabilities
git clone https://github.com/yourusername/fs-mcp.git
cd fs-mcp
Using uv (Recommended):
uv sync
Using pip:
pip install -r requirements.txt # If you have a requirements.txt
# OR install directly
pip install fastmcp>=2.0.0 langchain>=0.3.0 python-dotenv>=1.1.0
Create a .env file in the project root:
# Security Settings
SAFE_DIRECTORY=. # Directory restriction (required)
MAX_FILE_SIZE_MB=100 # File size limit in MB
# Encoding Settings
DEFAULT_ENCODING=utf-8
# AI Embeddings Configuration (for vector search)
OPENAI_EMBEDDINGS_API_KEY=your-api-key
OPENAI_EMBEDDINGS_BASE_URL=http://your-embedding-service/v1
EMBEDDING_MODEL_NAME=BAAI/bge-m3 # Or your preferred model
EMBEDDING_CHUNK_SIZE=1000
python main.py
The server will start on http://localhost:3002 and automatically build the vector index.
Core dependencies are managed in pyproject.toml:
fastmcp>=2.0.0 - MCP server frameworklangchain>=0.3.0 - AI and vector searchpython-dotenv>=1.1.0 - Environment management| Variable | Default | Description |
|---|---|---|
SAFE_DIRECTORY | . | Root directory for file access |
MAX_FILE_SIZE_MB | 100 | Maximum file size limit |
DEFAULT_ENCODING | utf-8 | Default file encoding |
OPENAI_EMBEDDINGS_API_KEY | - | API key for embedding service |
OPENAI_EMBEDDINGS_BASE_URL | - | Embedding service URL |
EMBEDDING_MODEL_NAME | BAAI/bge-m3 | AI model for embeddings |
EMBEDDING_CHUNK_SIZE | 1000 | Text chunk size for processing |
For production deployments, consider:
view_directory_treePurpose: Display directory structure in tree format
view_directory_tree(
directory_path=".", # Target directory
max_depth=3, # Maximum depth
max_entries=300 # Maximum entries to show
)
read_file_contentPurpose: Read file content with line range support
read_file_content(
file_path="example.py", # File path
start_line=1, # Start line (optional)
end_line=50 # End line (optional)
)
search_documentsPurpose: Intelligent semantic search across documents
search_documents(
query="authentication logic", # Search query
search_type="semantic", # semantic/filename/hybrid/extension
file_extensions=".py,.js", # File type filter (optional)
max_results=10 # Maximum results
)
rebuild_document_indexPurpose: Rebuild vector index for search
rebuild_document_index() # No parameters needed
get_document_statsPurpose: Get index statistics and system status
get_document_stats() # Returns comprehensive stats
list_filesPurpose: List files in directory with pattern matching
list_files(
directory_path="./src", # Directory to list
pattern="*.py", # File pattern
include_size=True # Include file sizes
)
preview_filePurpose: Quick preview of file content
preview_file(
file_path="example.py", # File to preview
lines=20 # Number of lines
)
semantic): AI-powered understandingfilename): Fast filename matchingextension): Filter by file typehybrid): Combines semantic + filename.py, .js, .ts, .java, .cpp, .c, .go, .rs, etc..json, .yaml, .toml, .ini, .xml, .env.md, .txt, .rst.html, .css, .scss.csv, .tsv.docx, .xlsx, .pptx.odt, .ods, .odp.pdf (text extraction).doc, .xls (limited support)SAFE_DIRECTORY and subdirectories../ attacksAdd to your Claude Desktop MCP configuration:
{
"mcpServers": {
"fs-mcp": {
"command": "python",
"args": ["main.py"],
"cwd": "/path/to/fs-mcp",
"env": {
"SAFE_DIRECTORY": "/your/project/directory"
}
}
}
}
Connect to http://localhost:3002 using Server-Sent Events (SSE) protocol.
The server exposes standard MCP endpoints that can be integrated with any MCP-compatible client.
fs-mcp/
├── main.py # Main MCP server
├── src/ # Core modules
│ ├── __init__.py # Package initialization
│ ├── file_reader.py # Core file reading logic
│ ├── security_validator.py # Security and validation
│ ├── text_detector.py # Intelligent file detection
│ ├── config_manager.py # Configuration management
│ ├── document_cache.py # Document caching system
│ ├── file_converters.py # Document format converters
│ ├── dir_tree.py # Directory tree generation
│ ├── embedding_config.py # AI embedding configuration
│ ├── codebase_indexer.py # Vector indexing system
│ ├── codebase_search.py # Search engine
│ ├── index_scheduler.py # Index scheduling
│ └── progress_bar.py # Progress display utilities
├── tests/ # Test suite
├── cache/ # Document cache (auto-created)
├── logs/ # Log files (auto-created)
├── pyproject.toml # Project configuration
├── .env.example # Environment template
├── .gitignore # Git ignore rules
└── README.md # This file
# Clone repository
git clone https://github.com/yourusername/fs-mcp.git
cd fs-mcp
# Install with development dependencies
uv sync --group dev
# OR with pip
pip install -e ".[dev]"
# Run all tests
pytest
# Run with coverage
pytest --cov=src
# Run specific test
pytest tests/test_file_reader.py
# Format code
black src/ tests/
# Lint code
flake8 src/ tests/
# Type checking
mypy src/
Monitor logs in real-time:
tail -f logs/mcp_server_$(date +%Y%m%d).log
We welcome contributions! Here's how to get started:
git clone https://github.com/yourusername/fs-mcp.git
cd fs-mcp
git checkout -b feature/your-feature-name
pytest
black src/ tests/
flake8 src/ tests/
This project is licensed under the MIT License - see the LICENSE file for details.
docs/ folder (when available)git clone https://github.com/yourusername/fs-mcp.git
cd fs-mcp
# 推荐使用 uv
uv sync
# 或使用 pip
pip install -r requirements.txt
创建 .env 文件:
# 安全设置
SAFE_DIRECTORY=. # 目录访问限制(必需)
MAX_FILE_SIZE_MB=100 # 文件大小限制(MB)
# 编码设置
DEFAULT_ENCODING=utf-8
# AI嵌入配置(用于向量搜索)
OPENAI_EMBEDDINGS_API_KEY=your-api-key
OPENAI_EMBEDDINGS_BASE_URL=http://your-embedding-service/v1
EMBEDDING_MODEL_NAME=BAAI/bge-m3 # 或您偏好的模型
EMBEDDING_CHUNK_SIZE=1000
python main.py
服务器将在 http://localhost:3002 启动并自动建立向量索引。
详细的工具使用方法请参考英文部分的 MCP Tools 章节。
详细的格式支持请参考英文部分的 Supported Formats 章节。
../ 等路径遍历攻击在 Claude Desktop 的 MCP 配置中添加:
{
"mcpServers": {
"fs-mcp": {
"command": "python",
"args": ["main.py"],
"cwd": "/path/to/fs-mcp",
"env": {
"SAFE_DIRECTORY": "/your/project/directory"
}
}
}
}
# 克隆仓库
git clone https://github.com/yourusername/fs-mcp.git
cd fs-mcp
# 安装开发依赖
uv sync --group dev
# 运行所有测试
pytest
# 运行覆盖率测试
pytest --cov=src
欢迎贡献代码!请参考英文部分的 Contributing 章节了解详细信息。
本项目采用 MIT 许可证 - 详见 LICENSE 文件。
Made with ❤️ for the AI community
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for FS-MCP: File Reader & Semantic Search MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/fs-mcp-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.