- MCP SSH/SFTP 服务器
MCP SSH/SFTP 服务器
Content
MCP SSH/SFTP 服务器
English | 简体中文
这是一个基于 Model Context Protocol (MCP) 实现的 SSH 和 SFTP 服务器集合,提供了远程服务器操作和文件传输的功能。
项目结构
.
├── ssh-server/ # SSH服务器实现
└── sftp-server/ # SFTP服务器实现
功能特性
SSH 服务器
SSH服务器提供远程命令执行功能,支持:
- 连接到远程SSH服务器
- 执行远程命令并获取结果
- 自动断开连接和资源清理
SFTP 服务器
SFTP服务器提供文件传输相关功能,支持:
- 列出远程目录内容
- 上传本地文件到远程服务器
- 从远程服务器下载文件
- 自动重试连接机制
- 详细的调试日志
可用工具
SSH 工具
execute_ssh_command
执行远程SSH命令
- 参数:
- host: SSH服务器地址
- port: SSH端口
- username: 用户名
- password: 密码
- command: 要执行的命令
SFTP 工具
list_directory
列出远程目录内容
- 参数:
- host: SFTP服务器地址
- port: SFTP端口
- username: 用户名
- password: 密码
- remotePath: 要列出内容的远程目录路径
upload_file
上传文件到远程服务器
- 参数:
- host: SFTP服务器地址
- port: SFTP端口
- username: 用户名
- password: 密码
- localPath: 本地文件路径
- remotePath: 远程目标路径
download_file
从远程服务器下载文件
- 参数:
- host: SFTP服务器地址
- port: SFTP端口
- username: 用户名
- password: 密码
- remotePath: 远程文件路径
- localPath: 本地保存路径
错误处理
两个服务器都实现了完善的错误处理机制:
- 连接超时处理
- 自动重试机制(SFTP服务器)
- 详细的错误信息输出
- 资源自动清理
安全说明
- 所有密码信息都只在内存中临时使用,不会被持久化存储
- 每次操作后都会自动断开连接
- 支持连接超时机制,避免资源占用
调试功能
SFTP服务器提供了详细的调试日志输出,包括:
- 连接状态日志
- 操作执行过程日志
- 错误详情日志
注意事项
- 使用前请确保有正确的服务器访问权限
- 建议在使用前测试连接参数
- 对于大文件传输,请注意网络状况和超时设置
- 所有密码信息请妥善保管,避免泄露
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
Tavily Mcp
Amap Maps高德地图官方 MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.