A minimal MCP (Model Context Protocol) server that exposes SSH server definitions from a TOML config file. Built in Rust, lets AI assistants look up SSH connection details by name or alias.
Communicates via stdio using JSON-RPC 2.0, like all MCP servers.
| Tool | Description |
|---|---|
list_servers |
List all SSH servers with their aliases, host, user, port, and description |
lookup_server |
Look up a server by name or alias (case-insensitive), returns SSH connection details |
Returns all configured SSH servers. No parameters.
Find a server by name or alias.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
query |
string | yes | Server name or alias to look up (case-insensitive) |
Matching behavior:
- Name lookup uses substring matching (e.g., "prod" matches "production-web")
- Alias lookup uses exact matching (e.g., "web" only matches if "web" is a defined alias)
- Rust (edition 2024)
Create the config file:
mkdir -p ~/.config/mcp-server-ssh-listCreate ~/.config/mcp-server-ssh-list/ssh-list.toml:
[[servers]]
name = "Production Web"
aliases = ["prod", "web"]
host = "192.168.1.100"
user = "deploy"
port = 22
description = "Main production web server"
[[servers]]
name = "Staging"
aliases = ["stage"]
host = "192.168.1.200"
description = "Staging environment"Fields user (default: root) and port (default: 22) are optional. A sample config is included in the repo root as ssh-list.toml.
cargo build --releaseThis produces target/release/mcp-server-ssh-list.
For development:
cargo build # debug build
cargo run # run in dev mode
RUST_LOG=debug cargo run # run with debug loggingAdd to your Claude Desktop config (~/.config/Claude/claude_desktop_config.json):
{
"mcpServers": {
"ssh-list": {
"command": "/path/to/mcp-server-ssh-list"
}
}
}src/
main.rs - entry point, reads config, starts stdio transport
config.rs - Config and SshServer structs, TOML deserialization, matching logic
server.rs - MCP tool definitions (list_servers, lookup_server)
MIT