Metadata-Version: 2.4
Name: ssh-ide-mcp
Version: 2.0.0
Summary: SSH MCP Server — Connect to remote Linux servers, execute commands, manage files via AI agents
Home-page: https://github.com/orangepyt123456/ssh-ide-mcp
Author: SSH IDE Team
Author-email: 
Keywords: ssh,mcp,remote,sftp,server,linux
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator
Classifier: Topic :: Software Development :: Debuggers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: mcp>=2.0.0
Requires-Dist: paramiko>=2.8.0
Requires-Dist: pydantic>=2.0.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# SSH IDE MCP

**SSH MCP Server** — Connect to remote Linux servers via SSH, execute commands, manage files, run Python/Jupyter code — all through AI agent conversation.

## Features

- 🔌 **SSH Connection** — Key or password auth, persistent sessions
- 📋 **Command Execution** — Run any shell command on remote server
- 📁 **File Operations** — Read, write, edit, delete, list, glob, upload, download
- 🐍 **Python Execution** — Run Python code in any conda environment
- 📓 **Jupyter Notebooks** — Read, edit, execute notebook cells with persistent state
- 🖥️ **Environment Management** — List conda environments, switch Python versions
- 🤖 **Universal MCP** — Works with Reasonix, Cursor, Claude Code, Codex, and any MCP client

## Installation

```bash
pip install ssh-ide-mcp
```

## Quick Start

### 1. Start MCP Server

```bash
ssh-ide-mcp mcp
```

### 2. Configure your AI Agent

**Reasonix** (`.mcp.json` at project root):
```json
{
  "ssh-ide-mcp": {
    "command": "ssh-ide-mcp",
    "args": ["mcp"],
    "env": {}
  }
}
```

**Cursor** (`.cursor/mcp.json`):
```json
{
  "mcpServers": {
    "ssh-ide-mcp": {
      "command": "ssh-ide-mcp",
      "args": ["mcp"]
    }
  }
}
```

**Claude Code** (`~/.claude/settings.json` or `claude.json`):
```json
{
  "mcpServers": {
    "ssh-ide-mcp": {
      "command": "ssh-ide-mcp",
      "args": ["mcp"]
    }
  }
}
```

**Codex CLI** (add to your MCP config):
```json
{
  "ssh-ide-mcp": {
    "command": "ssh-ide-mcp",
    "args": ["mcp"]
  }
}
```

### 3. Connect to your server

Tell your AI agent:

> "SSH connect to 192.168.1.100 as root, password: mypassword, workdir: /home/project"

Or use key auth:

> "SSH connect to 10.0.0.1 as deploy, key: ~/.ssh/id_rsa, workdir: /var/www"

## Available Tools (24 tools)

| Category | Tools |
|----------|-------|
| **Connection** | `ssh_connect`, `ssh_disconnect`, `ssh_connections`, `ssh_save_host`, `ssh_connect_saved`, `ssh_list_hosts` |
| **Command** | `ssh_exec` |
| **Files** | `ssh_read_file`, `ssh_write_file`, `ssh_edit_string`, `ssh_delete_range` |
| **Directory** | `ssh_ls`, `ssh_glob`, `ssh_stat`, `ssh_file_tree` |
| **Transfer** | `ssh_download`, `ssh_upload` |
| **Python** | `ssh_execute_python`, `ssh_list_environments` |
| **Notebook** | `ssh_read_notebook`, `ssh_execute_notebook_cell`, `ssh_edit_notebook_cell`, `ssh_add_notebook_cell`, `ssh_delete_notebook_cell` |

## Example Workflow

```
1️⃣ Connect →  ssh_connect(hostname="...", username="...", password="...", host_alias="my-server")
2️⃣ Explore →  ssh_ls(host_alias="my-server", path="/home/project")
3️⃣ Read    →  ssh_read_file(host_alias="my-server", path="/home/project/config.yml")
4️⃣ Edit    →  ssh_edit_string(host_alias="my-server", path="/home/project/config.yml",
                                 old_string="version: 1", new_string="version: 2")
5️⃣ Execute →  ssh_exec(host_alias="my-server", command="python3 train.py")
6️⃣ Python  →  ssh_execute_python(host_alias="my-server", code="import torch; print(torch.__version__)", python_bin="python3")
7️⃣ Disconnect → ssh_disconnect(host_alias="my-server")
```

## Requirements

- Python 3.9+
- Remote server: SSH access

## Configuration

Host configs saved at `~/.ssh-ide-mcp/config.json`.

## License

MIT
