mcp_ssh_server

ravularajavardhan96/mcp_ssh_server

3.1

If you are the rightful owner of mcp_ssh_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This project is an experimental MCP (Model Context Protocol) server that simulates managing remote servers and running commands over SSH.

ssh-mcp-agent

This project is an experimental MCP (Model Context Protocol) server that simulates managing remote servers and running commands over SSH. It is not fully complete, but demonstrates the basic flow of:

  • Creating a dummy server
  • Creating sessions
  • Running commands
  • Listing command logs

🔧 Setup

Clone and install dependencies:

git clone https://github.com/your-username/ssh-mcp-agent.git
cd ssh-mcp-agent
npm install

▶️ Run the MCP Server

node src/mcpServer.js

The server will run on:

http://localhost:3000

📡 Demo Commands

Since this is unfinished, the following dummy endpoints are available for demonstration:

1. Create a Server

Registers a new server (local/dummy).

curl -X POST http://localhost:3000/createServer \
  -H "Content-Type: application/json" \
  -d '{"name":"demo","host":"127.0.0.1","user":"raj"}'

2. Create a Session

Opens a new session for running commands.

curl -X POST http://localhost:3000/createSession \
  -H "Content-Type: application/json" \
  -d '{"serverId":"server-123","meta":{"purpose":"demo"}}'

3. Run a Command

Runs a simple command (ls -la) in the session.

curl -X POST http://localhost:3000/runCommand \
  -H "Content-Type: application/json" \
  -d '{"sessionId":"session-xyz","command":"ls -la"}'

4. List Logs

Fetch logs for executed commands.

curl -X POST http://localhost:3000/listLogs \
  -H "Content-Type: application/json" \
  -d '{"sessionId":"session-xyz"}'

📌 Notes

  • Currently, this MCP server is simulated (dummy).
  • Future work: real SSH connections, credential encryption, error handling.
  • Useful for showing how Claude MCP integration would work later.