Logo di MCP服务器SSH服务器

MCP服务器SSH服务器

Organizzazione
Machine-To-Machine

A secure SSH server for accessing and interacting with MCP (Model Context Protocol) tools installed remotely. This server allows clients to connect to multiple MCP tool providers through a unified…

AutoreMachine-To-Machine
Repositorym2m-mcp-server-ssh-server
LinguaPython
Fork
3
Stelle
11
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    MCP服务器SSH服务器 mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    11 stelle e 3 fork nel repository collegato.

MCP Server SSH Server

PyPI version Python Versions License: MIT

A secure SSH server for accessing and interacting with MCP (Model Context Protocol) tools installed remotely. This server allows clients to connect to multiple MCP tool providers through a unified secure interface.

Features

  • Secure Remote Access: Access MCP tools remotely over SSH
  • Key-Based Authentication: Support for key-based authentication
  • Key Management API: Optional HTTP API for managing SSH keys
  • Server Aggregation: Proxy and merge multiple MCP servers into a unified interface
  • MCP Support: Compatible with MCP capabilities including:
    • Prompts
    • Resources
    • Tools
    • Logging
  • Dynamic Configuration: Configure available MCP servers through a simple JSON configuration

Authentication Flow

Installation

In a uv managed python project, add to dependencies by:

bash
uv add m2m-mcp-server-ssh-server
# For key server functionality, include the optional dependency:
uv add m2m-mcp-server-ssh-server[key-server]

Alternatively, for projects using pip for dependencies:

bash
pip install m2m-mcp-server-ssh-server
# Or with key server functionality
pip install m2m-mcp-server-ssh-server[key-server]

To install directly from the source:

bash
git clone https://github.com/Machine-To-Machine/m2m-mcp-server-ssh-server.git
cd m2m-mcp-server-ssh-server
pip install -e .

To run the server inside your project:

uv run m2m-mcp-server-ssh-server

Common Use Cases

1. Local Development Environment

Quickly set up a local server with your preferred MCP tools:

  1. Create a configuration file (servers_config.json):
json
{
  "mcpServers": {
    "HackerNews": {
      "command": "uvx",
      "args": ["mcp-hn"]
    },
    "major-league-baseball": {
      "command": "uvx",
      "args": ["mcp_mlb_statsapi"]
    }
  }
}
  1. Start the server with the key management API for easier client connection:
bash
uv run m2m-mcp-server-ssh-server --run-key-server
  1. Connect using the client:
bash
uv run m2m-mcp-server-ssh-client --host localhost --port 8022 --use-key-server

2. Remote Hosting (Quick Setup)

To make your MCP tools available remotely:

  1. Install on your server:
bash
uv add m2m-mcp-server-ssh-server[key-server]
  1. Create your configuration file with desired MCP tools

  2. Start the server binding to all interfaces:

bash
uv run m2m-mcp-server-ssh-server --host 0.0.0.0 --run-key-server --key-server-host 0.0.0.0
  1. Connect from client machines:
bash
uv run m2m-mcp-server-ssh-client --host your-server.example.com --port 8022 --use-key-server

For more detailed deployment instructions, see Cloud Deployment Guide.

Usage

Command Line Options

  • --host: SSH server host address to bind to (default: 127.0.0.1)
  • --port: SSH server port to listen on (default: 8022)
  • --authorized-clients: Path to authorized keys file (default: ~/.ssh/authorized_keys)
  • --server-key: Path to server private key file (default: ~/.ssh/m2m_mcp_server_ssh_server)
  • --passphrase: Passphrase for the private key (optional)
  • --servers-config: Path to server configurations JSON (default: servers_config.json)
  • --log-level: Set logging level (default: INFO)
  • --run-key-server: Run the HTTP key management server
  • --key-server-port: Port for the HTTP key management server (default: 8000)
  • --key-server-host: Host for the HTTP key management server (default: 127.0.0.1)
  • --version: Show version information and exit

Security Note: When binding to all interfaces (0.0.0.0), your server will be accessible from any machine that can reach your system. Make sure to use strong authentication and consider additional security measures like firewalls.

Key Management Server

You can optionally run a key management HTTP server alongside the SSH server to simplify client key registration:

bash
uv run m2m-mcp-server-ssh-server --run-key-server

This starts:

  • SSH server on port 8022
  • Key management HTTP server on port 8000 (localhost only by default)

Key Management API

The key management server provides the following endpoints:

  1. POST /register - Register a client's public key

    • Request body: {"client_pub_key": "ssh-rsa AAAA..."}
    • Response: {"status": "success"} or error message
  2. GET /server_pub_key - Get the server's public key

    • Response: {"server_pub_key": "ssh-ed25519 AAAA..."}
  3. GET /health - Check server health status

    • Response: {"status": "healthy"}

Example client key registration:

bash
curl -X POST -H "Content-Type: application/json" \
  -d '{"client_pub_key": "ssh-rsa AAAA..."}' \
  http://localhost:8000/register

Security Considerations

  • Default binding is to localhost (127.0.0.1) for improved security
  • Keys are automatically generated with secure permissions if not provided
  • Default key location is ~/.ssh/m2m_mcp_server_ssh_server
  • Private keys use 0o600 permissions (readable only by owner)
  • Public keys use 0o644 permissions (readable by all, writable by owner)
  • Key server uses rate limiting for API endpoints
  • Input validation protects against malicious inputs

Dependencies

  • anyio (>=4.5.0)
  • asyncssh (>=2.20.0)
  • mcp (>=1.1.3)
  • pydantic (>=2.0.0)
  • aiohttp (>=3.11.16) - Optional, for key server functionality

Development

Setup Development Environment

bash
git clone https://github.com/Machine-To-Machine/m2m-mcp-server-ssh-server.git
cd m2m-mcp-server-ssh-server
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"

Code Quality

bash
# Run linting
uv run ruff check .

# Run formatting check
uv run ruff format --check .

# Run security checks
uv run bandit -r src/

Contributing

We welcome contributions to help expand and improve m2m-mcp-server-ssh-server. Whether you want to add new features, enhance existing functionality, or improve documentation, your input is valuable.

Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements.

Contribution Guidelines

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin feature-name
  5. Submit a pull request

License

MIT License - See LICENSE file for details.

Authors

  • Machine To Machine

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "machine-to-machine-m2m-mcp-server-ssh-server": {
      "command": "uvx",
      "args": [
        "m2m-mcp-server-ssh-server"
      ]
    }
  }
}

Usa MCP MCP服务器SSH服务器 con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso MCP服务器SSH服务器, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi MCP服务器SSH服务器 come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di MCP服务器SSH服务器.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "machine-to-machine-m2m-mcp-server-ssh-server": {
      "command": "npx",
      "args": [
        "-y",
        "m2m-mcp-server-ssh-server"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di MCP服务器SSH服务器, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di MCP服务器SSH服务器.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare MCP服务器SSH服务器 per aiutarmi con questa attività?
MCP服务器SSH服务器
Certo. Ho letto.
Ecco cosa ho trovato con MCP服务器SSH服务器.

Domande frequenti

A cosa serve il server MCP MCP服务器SSH服务器?

MCP服务器SSH服务器 è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare MCP服务器SSH服务器 MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare MCP服务器SSH服务器 con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP MCP服务器SSH服务器 con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando MCP服务器SSH服务器, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego MCP服务器SSH服务器 MCP a TypingMind?

MCP服务器SSH服务器 funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre MCP服务器SSH服务器 MCP in TypingMind?

MCP服务器SSH服务器 mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare MCP服务器SSH服务器 MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se MCP服务器SSH服务器 richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇