Skip to content

Commit e8620ff

Browse files
docs: aggiunge architettura C per MCP remoto via SSH, indicata come non consigliata rispetto a Ollama locale o remoto diretto
1 parent 2a67c18 commit e8620ff

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

README.it.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,48 @@ Entrambe le architetture richiedono lo stesso modello `nomic-embed-text` per gar
216216

217217
> **Sicurezza:** Se esponi Ollama remotamente, usa regole firewall, VPN, o reverse proxy con autenticazione.
218218
219+
**Architettura C: MCP Remoto via SSH (non consigliata)**
220+
221+
Questa configurazione esegue l'intero server MCP su una macchina remota, senza nulla in locale. Claude si connette via SSH stdio forwarding.
222+
223+
```
224+
┌────────────────┐ ┌─────────────────────────────────────────┐
225+
│ TUA MACCHINA │ │ SERVER REMOTO │
226+
│ │ │ │
227+
│ Claude │ SSH │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
228+
│ │───────────────────────► │ MCP │─►│ Ollama │─►│ Qdrant │ │
229+
│ │◄────────────────────── │ Server │◄─┤ + nomic │◄─┤ │ │
230+
│ │ stdio │ └─────────┘ └─────────┘ └─────────┘ │
231+
└────────────────┘ └─────────────────────────────────────────┘
232+
```
233+
234+
⚠️ **Non consigliata** perché:
235+
- Aggiunge latenza SSH a ogni richiesta MCP
236+
- Richiede gestione chiavi SSH e connettività
237+
- Debug più complesso in caso di problemi
238+
- Le architetture A o B sono più semplici e affidabili
239+
240+
Se vuoi comunque questa configurazione, configura `.mcp.json`:
241+
242+
```json
243+
{
244+
"mcpServers": {
245+
"ragify": {
246+
"command": "ssh",
247+
"args": [
248+
"-i", "~/.ssh/tua_chiave.pem",
249+
"-o", "StrictHostKeyChecking=no",
250+
"-o", "BatchMode=yes",
251+
"utente@ip-server",
252+
"PATH=$HOME/.local/bin:$PATH QDRANT_URL=http://localhost:6333 OLLAMA_URL=http://localhost:11434 uvx ragify-mcp"
253+
]
254+
}
255+
}
256+
}
257+
```
258+
259+
> **Nota:** `PATH=$HOME/.local/bin:$PATH` è necessario perché SSH non interattivo non carica `.bashrc`.
260+
219261
---
220262

221263
## Componenti

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,48 @@ Both architectures require the same `nomic-embed-text` model to ensure vector co
216216

217217
> **Security:** If exposing Ollama remotely, use firewall rules, VPN, or authenticated reverse proxy.
218218
219+
**Architecture C: Remote MCP via SSH (not recommended)**
220+
221+
This setup runs the entire MCP server on a remote machine, with nothing locally. Claude connects via SSH stdio forwarding.
222+
223+
```
224+
┌────────────────┐ ┌─────────────────────────────────────────┐
225+
│ YOUR MACHINE │ │ REMOTE SERVER │
226+
│ │ │ │
227+
│ Claude │ SSH │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
228+
│ │───────────────────────► │ MCP │─►│ Ollama │─►│ Qdrant │ │
229+
│ │◄────────────────────── │ Server │◄─┤ + nomic │◄─┤ │ │
230+
│ │ stdio │ └─────────┘ └─────────┘ └─────────┘ │
231+
└────────────────┘ └─────────────────────────────────────────┘
232+
```
233+
234+
⚠️ **Not recommended** because:
235+
- Adds SSH latency to every MCP request
236+
- Requires SSH key management and connectivity
237+
- More complex debugging when issues arise
238+
- Architectures A or B are simpler and more reliable
239+
240+
If you still want this setup, configure `.mcp.json`:
241+
242+
```json
243+
{
244+
"mcpServers": {
245+
"ragify": {
246+
"command": "ssh",
247+
"args": [
248+
"-i", "~/.ssh/your_key.pem",
249+
"-o", "StrictHostKeyChecking=no",
250+
"-o", "BatchMode=yes",
251+
"user@your-server-ip",
252+
"PATH=$HOME/.local/bin:$PATH QDRANT_URL=http://localhost:6333 OLLAMA_URL=http://localhost:11434 uvx ragify-mcp"
253+
]
254+
}
255+
}
256+
}
257+
```
258+
259+
> **Note:** `PATH=$HOME/.local/bin:$PATH` is required because non-interactive SSH doesn't load `.bashrc`.
260+
219261
---
220262

221263
## Components

0 commit comments

Comments
 (0)