mcpssh/.note/interfaces.md

27 lines
1.1 KiB
Markdown

# Interfaces
## SSHSession (src/mcpssh/server.py)
- connect() -> bool
- close() -> None
- execute_command(command: str) -> Dict[str, Any]
- upload_file(local_path: str, remote_path: str, max_size: int = 1GB, on_conflict: str = 'FAIL') -> Dict[str, Any]
- download_file(remote_path: str, local_path: str, max_size: int = 1GB, on_conflict: str = 'FAIL') -> Dict[str, Any]
- list_directory(remote_path: str) -> Dict[str, Any]
- remove_file(remote_path: str) -> Dict[str, Any]
- get_disk_usage(remote_path: str = '.') -> Dict[str, Any]
## SSHServerMCP (src/mcpssh/server.py)
- ssh_connect(params: SSHConnectionParams) -> Dict[str, Any]
- ssh_execute(params: CommandParams) -> Dict[str, Any]
- ssh_disconnect() -> Dict[str, Any]
- scp_upload(params: FileTransferParams) -> Dict[str, Any]
- scp_download(params: FileTransferParams) -> Dict[str, Any]
- scp_listdir(remote_path: str) -> Dict[str, Any]
- scp_remove(remote_path: str) -> Dict[str, Any]
- scp_disk_usage(remote_path: str = '.') -> Dict[str, Any]
## Pydantic Models
- SSHConnectionParams
- CommandParams
- FileTransferParams (new)