MCP服务器SSH服务器 logo

MCP服务器SSH服务器

Organization
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…

PublisherMachine-To-Machine
Repositorym2m-mcp-server-ssh-server
LanguagePython
Forks
3
Stars
11
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP服务器SSH服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    11 stars and 3 forks from the linked repository.

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

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Use MCP服务器SSH服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP服务器SSH服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP服务器SSH服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP服务器SSH服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "machine-to-machine-m2m-mcp-server-ssh-server": {
      "command": "npx",
      "args": [
        "-y",
        "m2m-mcp-server-ssh-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP服务器SSH服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP服务器SSH服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP服务器SSH服务器 to help me with this task?
MCP服务器SSH服务器
Sure. I read it.
Here is what I found using MCP服务器SSH服务器.

Frequently asked questions

What is the MCP服务器SSH服务器 MCP server used for?

MCP服务器SSH服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP服务器SSH服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP服务器SSH服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP服务器SSH服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP服务器SSH服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP服务器SSH服务器 MCP to TypingMind?

MCP服务器SSH服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP服务器SSH服务器 MCP provide in TypingMind?

MCP服务器SSH服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP服务器SSH服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP服务器SSH服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇