auth-ssh-mcp
v4.0.3
Published
MCP Server for SSH credential management - connects to auth-ssh backend
Maintainers
Readme
auth-ssh-mcp
MCP (Model Context Protocol) Server for SSH credential management. Connects to AuthSSH backend service.
Quick Start
- Visit www.authssh.com to register an account
- Get your API Key from the dashboard
- Configure the MCP server (see Configuration below)
Features
- SSH Command Execution: Execute commands on remote servers
- SFTP Operations: List directories, read/write files
- Smart Upload: Automatically handles large files (up to 500MB) via streaming upload
- Secure: Uses API Key authentication
Installation
npm install -g auth-ssh-mcp
# or use directly with npx
npx auth-ssh-mcpConfiguration
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| MCP_SERVER_URL | Yes | AuthSSH backend service URL (default: https://www.authssh.com, or your self-hosted instance) |
| MCP_API_KEY | Yes | API Key (starts with sk_), get it from your AuthSSH service dashboard |
Note: You can use the official service at www.authssh.com or deploy your own AuthSSH backend instance.
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"auth-ssh": {
"command": "npx",
"args": ["auth-ssh-mcp"],
"env": {
"MCP_SERVER_URL": "https://www.authssh.com",
"MCP_API_KEY": "sk_your_api_key_here"
}
}
}
}Replace
MCP_SERVER_URLwith your self-hosted instance URL if not using the official service.
Claude Code Configuration
Add to your Claude Code MCP settings:
{
"mcpServers": {
"auth-ssh": {
"command": "npx",
"args": ["auth-ssh-mcp"],
"env": {
"MCP_SERVER_URL": "https://www.authssh.com",
"MCP_API_KEY": "sk_your_api_key_here"
}
}
}
}Available Tools
list_credentials
List all SSH credentials configured for the current user.
No parameters requiredssh_exec
Execute a command on a remote server.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| credentialId | string (UUID) | Yes | SSH credential ID |
| command | string | Yes | Command to execute |
| timeout | number | No | Timeout in seconds (default: 60, max: 300) |
sftp_list
List files and directories in a remote path.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| credentialId | string (UUID) | Yes | SSH credential ID |
| path | string | No | Directory path (default: ~) |
| showHidden | boolean | No | Show hidden files (default: false) |
sftp_read
Read a text file from the remote server.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| credentialId | string (UUID) | Yes | SSH credential ID |
| path | string | Yes | File path |
| maxSize | number | No | Max bytes to read (default: 1MB) |
sftp_write
Write content to a file on the remote server. Automatically uses streaming upload for files larger than 1MB.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| credentialId | string (UUID) | Yes | SSH credential ID |
| path | string | Yes | File path |
| content | string | Yes | File content |
| mode | number | No | File permissions (default: 0o644) |
Upload Limits:
- Files ≤ 1MB: Uses JSON API
- Files > 1MB: Uses streaming upload (up to 500MB)
Development
# Install dependencies
pnpm install
# Build
pnpm build
# Development with watch mode
pnpm dev
# Type check
pnpm typecheckHow It Works
┌─────────────────┐ stdio ┌─────────────────┐
│ MCP Client │ ◄────────────► │ auth-ssh-mcp │
│ (Claude Desktop │ │ (this CLI) │
│ / Claude Code) │ └────────┬────────┘
└─────────────────┘ │
│ HTTP
▼
┌─────────────────┐
│ AuthSSH │
│ Backend │
└────────┬────────┘
│
│ SSH/SFTP
▼
┌─────────────────┐
│ Remote Servers │
└─────────────────┘License
MIT
