Provides tools for managing Hadoop Distributed File System (HDFS), enabling file operations like listing, reading, writing, deleting files, creating directories, and retrieving file information on HDFS clusters.
HDFS MCP 服务器
这是一个真正的Model Context Protocol (MCP) 服务器,用于管理Hadoop分布式文件系统。它实现了MCP标准,可以与支持MCP的客户端(如Claude Desktop)集成。
项目结构
功能
- 列出HDFS目录中的文件
- 读取HDFS文件内容
- 写入内容到HDFS文件
- 删除HDFS文件或目录
- 创建HDFS目录
- 获取HDFS文件或目录信息
- 测试HDFS连接
安装
构建
运行
配置
服务器使用以下HDFS配置:
- NameService:
haclusterdev
- NameNodes:
n1
,n2
- RPC地址:
- n1:
1.hadoopdev.com:8020
- n2:
2.hadoopdev.com:8020
- n1:
- HTTP地址:
- n1:
1.hadoopdev.com:8090
- n2:
2.hadoopdev.com:8090
- n1:
环境变量配置
可以通过环境变量自定义配置:
MCP 工具
服务器实现了以下MCP工具:
- hdfs_list_files - 列出HDFS目录内容
- hdfs_read_file - 读取HDFS文件内容
- hdfs_write_file - 写入内容到HDFS文件
- hdfs_delete_file - 删除HDFS文件或目录
- hdfs_create_directory - 创建HDFS目录
- hdfs_get_file_info - 获取HDFS文件信息
- hdfs_test_connection - 测试HDFS连接
使用方法
作为MCP服务器运行
- 构建项目:
- 启动MCP服务器:
- 在支持MCP的客户端中配置:
作为独立客户端使用
特性
- 高可用性支持: 支持HDFS HA集群,自动故障转移
- 重试机制: 网络错误时自动重试
- 路径验证: 自动验证和规范化HDFS路径
- 详细日志: 完整的操作日志记录
- 错误处理: 友好的错误信息和处理
- 类型安全: 完整的TypeScript类型定义
开发
许可证
MIT
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that enables interaction with Hadoop Distributed File System, allowing operations like listing, reading, writing, and managing HDFS files and directories.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.Last updated -4TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables enhanced file system operations including reading, writing, copying, moving files with streaming capabilities, directory management, file watching, and change tracking.Last updated -1215TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides secure and intelligent interaction with files and filesystems, offering smart context management and token-efficient operations for working with large files and complex directory structures.Last updated -2144PythonMIT License
- AsecurityAlicenseAqualityA server implementing the Model Context Protocol that provides filesystem operations (read/write, directory management, file movement) through a standardized interface with security controls for allowed directories.Last updated -93TypeScriptMIT License