Cover image
Try Now
2025-03-12

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    5 (1)
    Avatar
    user_ogNTzEbO
    2025-04-16

    As a dedicated user of ssh-mcp-server, I can confidently say that this tool is a game-changer for secure, efficient server management. RobertBergman has done an excellent job creating a user-friendly and reliable application. It's incredibly versatile and streamlined my workflow, making complex tasks much simpler. Highly recommend checking it out on GitHub!