Sponsored by Deepsite.site

SSH MCP Server

Created By
RobertBergman9 months ago
Content

SSH MCP Server

The SSH MCP (Management Control Plane) Server is a centralized management system for network devices. It leverages an SSH API to execute commands on network switches and provides advanced features for network monitoring, configuration validation, and reporting.

Features

Device Management

  • Inventory of network devices with metadata (location, role, model, OS version)
  • Grouping of devices by function, location, or custom attributes
  • Device status tracking and availability monitoring

Command Execution

  • Execute show commands on devices via the SSH API
  • Schedule periodic command execution for monitoring
  • Concurrent command execution across multiple devices
  • Command templating with variable substitution

Data Processing

  • Parse command output into structured data
  • Store historical command outputs in the database
  • Compare outputs across devices or time
  • Detect changes in device configurations and states

Reporting

  • Generate reports on device inventory, command outputs, configuration changes
  • Custom report templates with different output formats (HTML, JSON, CSV)
  • Scheduled report generation and distribution

Requirements

  • Python 3.8+
  • PostgreSQL 12+
  • Redis (for task queue)
  • SSH API Service (for device communication)

Installation

  1. Clone the repository:
git clone https://github.com/your-org/ssh-mcp-server.git
cd ssh-mcp-server
  1. Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your configuration settings
  1. Set up the database:
# Create PostgreSQL database
createdb mcp_server

# Run Alembic migrations
alembic upgrade head
  1. Start the server:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

Configuration

The application can be configured through environment variables or the .env file:

  • DATABASE_URL: PostgreSQL connection string
  • REDIS_HOST and REDIS_PORT: Redis connection details
  • SSH_API_URL: URL of the SSH API service
  • SECRET_KEY: Secret key for JWT authentication
  • See .env.example for all available configuration options

API Documentation

When the server is running, API documentation is available at:

Development

Running Tests

pytest

Creating a New Migration

After making changes to the models:

alembic revision --autogenerate -m "Description of changes"
alembic upgrade head

Architecture

The application follows a modular architecture with the following components:

  • API Layer: FastAPI routes for HTTP endpoints
  • Service Layer: Business logic and operations
  • Data Models: Database models using SQLAlchemy
  • Schemas: Pydantic models for request/response validation
  • Background Tasks: Celery workers for asynchronous processing

Security

  • JWT token-based authentication
  • Role-based access control
  • Encrypted storage of device credentials
  • HTTPS for all communications

License

MIT License

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
ChatWiseThe second fastest AI chatbot™
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Amap Maps高德地图官方 MCP Server
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop