文件访问协议服务器

Axiom MCP Servers 是一个本地文件系统访问协议服务器,提供文件浏览、读取、搜索和元数据获取功能,适用于个人知识助手。

  • by deepanshu-malik
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 deepanshu-malik/axiom-mcp-servers

使用说明

Axiom MCP服务器

Axiom个人知识助理的MCP(模型上下文协议)服务器实现。

服务器状态

服务器 状态 描述
文件系统 ✅ 完成 本地文件访问
GitHub 🔲 第6阶段 GitHub存储库访问
谷歌云端硬盘 🔲 未来 谷歌云端硬盘访问

文件系统服务器(完整)

使用FastMCP访问本地文件系统的完整MCP服务器。

特性

工具:

工具 说明
list_allowed_directories 显示已配置的目录
list_directory 使用可选递归浏览文件
read_file 使用元数据获取文件内容
search_files 按模式和/或内容查找文件
get_file_info 获取文件元数据

资源:

URI 描述
file:///{path} 按绝对路径读取文件

安全:

  • 可配置的允许目录
  • 忽略模式(node_modules、.git、.git等), ____pycache____等等)
  • 支持的扩展白名单
  • 只读访问

快速开始

cd axiom-mcp-servers

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -e ".[dev]"

# Run tests
cd servers/filesystem
python -m pytest test_server.py -v

# Start server
python server.py

配置

编辑 servers/filesystem/config.yaml:

allowed_directories:
  - ~/Documents
  - ~/projects

ignore_patterns:
  - "*/node_modules/*"
  - "*/.git/*"

supported_extensions:
  - .py
  - .md
  - .json

与MCP客户端一起使用

添加到您的MCP客户端配置中(例如,Claude Desktop):

{
  "mcpServers": {
    "filesystem": {
      "command": "python",
      "args": ["/path/to/axiom-mcp-servers/servers/filesystem/server.py"]
    }
  }
}

GitHub服务器(第6阶段)

GitHub存储库访问的占位符。将在第六阶段实施。

计划功能:

  • 列出已配置的存储库
  • 从存储库读取文件
  • 在仓库中搜索代码
  • 获取存储库树结构

项目结构

axiom-mcp-servers/
├── shared/                    # Common utilities
│   ├── base_server.py         # Abstract base class
│   └── utils.py               # File type detection
│
├── servers/
│   ├── filesystem/            # ✅ Complete
│   │   ├── server.py          # MCP server implementation
│   │   ├── config.yaml        # Configuration
│   │   ├── test_server.py     # Unit tests
│   │   └── README.md          # Documentation
│   │
│   ├── github/                # 🔲 Phase 6
│   │   ├── server.py          # Placeholder
│   │   └── config.yaml        # Configuration
│   │
│   └── gdrive/                # 🔲 Future
│       └── README.md          # Placeholder
│
└── tests/
    └── integration/

相关项目

许可证

MIT许可证