Token导航 LogoToken导航TokenDH.com
MCP Powershell System logo
开发工具stdio官方级别未说明来源级核验

MCP Powershell System

MCP Server

MCP增强管理系统是一个企业级的容器化解决方案,用于管理模型上下文协议服务器,提供生命周期管理、实时监控、高级配置管理和搜索功能。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
PowerShell配置管理Docker容器化

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

AlmightyTopher

提供方

AlmightyTopher

最后核验

2026/5/17 20:22

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run -it --name mcp-enhanced \

详细介绍

MCP增强型管理系统

🚀 与Docker集成的企业级模型上下文协议(MCP)服务器管理

](https://www.docker.com/) ![PowerShell](https://docs.microsoft.com/en-us/powershell/) ](https://nodejs.org/) ![Python](https://www.python.org/)

📋 概述

MCP增强型管理系统是一个全面的容器化解决方案,用于管理具有企业级功能的模型上下文协议服务器,包括:

  • 5个PowerShell模块 用于完整的MCP生命周期管理
  • 170+测试 跨合同、单位和绩效类别
  • Docker集成 使用多语言示例服务器
  • 实时监控 通过健康检查和绩效指标
  • 高级配置管理 使用模式验证
  • 搜索功能 支持正则表达式和数据分析

🏗️ 建筑

mcp-enhanced-system/
├── 📦 Docker Container (PowerShell 7.4 + Ubuntu 22.04)
├── 🔧 5 Core PowerShell Modules
│   ├── McpManager       - Instance lifecycle management
│   ├── McpConfiguration - Settings and profile management
│   ├── McpDiagnostics   - System health and troubleshooting
│   ├── McpMonitoring    - Real-time performance tracking
│   └── McpData          - Search, analytics, and preferences
├── 🧪 Example Servers (Node.js + Python)
├── 📊 Comprehensive Test Suite (170+ tests)
└── 📋 Enterprise Deployment Scripts

🚀 快速开始

先决条件

  • 码头工人 (使用Docker Compose)
  • PowerShell 7.4+ (用于地方发展)
  • Node.js 18+Python 3.10+ (例如服务器)

安装和启动

1.使用Docker(推荐)

# Clone or extract the project
cd mcp-enhanced-system

# Build and start the system
docker-compose up -d

# Or run directly
docker run -it --name mcp-enhanced \
  -p 3000-3010:3000-3010 \
  -p 8080:8080 \
  mcp-enhanced:latest

2.使用Docker Build

# Build the image
docker build -t mcp-enhanced:latest .

# Run interactively
docker run -it mcp-enhanced:latest

# Run with port mapping for example servers
docker run -p 3000-3010:3000-3010 -p 8080:8080 mcp-enhanced:latest

3.使用预构建脚本

# Automated deployment and testing
./deploy-and-test.sh

# Just deployment
./deploy-and-test.sh --deploy-only

# With monitoring
./deploy-and-test.sh --monitor

🎯 核心命令

容器管理

# Start the enhanced MCP console
docker run -it mcp-enhanced:latest

# Run system tests
docker run --rm mcp-enhanced:latest ./test-mcp.sh

# Run performance validation
docker run --rm mcp-enhanced:latest pwsh -File "./tests/Performance/Validate-McpPerformance.ps1"

# Access container shell
docker exec -it mcp-enhanced pwsh

PowerShell模块使用情况

# Initialize a new MCP session
$session = Initialize-McpSession -UserId "admin" -TimeoutMinutes 60

# Connect to an MCP instance
$instanceConfig = @{
    Name = "My MCP Server"
    BaseUrl = "http://localhost:3000"
    ContainerName = "mcp-server-container"
}
$instance = Manage-McpInstance -Action "Connect" -InstanceConfig $instanceConfig

# List all connected instances
$instances = Manage-McpInstance -Action "List"

# Start real-time monitoring
Start-McpMonitoring -InstanceId $instance.InstanceId -IntervalSeconds 30

# Run diagnostics
$diagnostics = Start-McpDiagnostics -InstanceId $instance.InstanceId -TestType "All"

# Search MCP data
$results = Search-McpData -Query "error" -DataType "Logs" -TimeRange "Last24Hours"

# Create configuration profile
$configData = @{
    GlobalSettings = @{
        DefaultTimeout = 30
        MaxRetries = 3
        HealthCheckInterval = 60
    }
}
$profile = Manage-McpConfiguration -Action "Create" -Name "Production Config" -ConfigurationData $configData

🔧 配置

环境变量

变量默认值描述
MCP_DATA_DIR/app/mcp/data数据目录路径
MCP_LOG_LEVELInfo日志记录级别(调试、信息、警告、错误)
MCP_AUTO_STARTfalse容器启动时自动启动实例
DOCKER_HOSTunix:///var/run/docker.sockDocker守护进程连接

卷装载

# Persistent data storage
docker run -v mcp-data:/app/mcp/data mcp-enhanced:latest

# Development mode (source code editing)
docker run -v "$(pwd):/app/mcp" mcp-enhanced:latest

# Docker socket access (for container management)
docker run -v /var/run/docker.sock:/var/run/docker.sock mcp-enhanced:latest

🧪 示例服务器

Node.js Express服务器

# Start the Node.js example server
cd examples/node-server
npm install && npm start

# Available endpoints:
# GET  /health      - Health check
# GET  /metrics     - Performance metrics
# POST /config      - Configuration updates
# GET  /mcp/status  - MCP protocol status

Python Flask服务器

# Start the Python example server
cd examples/python-server
pip install -r requirements.txt && python app.py

# Available endpoints:
# GET  /health       - System health with psutil metrics
# GET  /metrics      - Detailed performance data
# POST /mcp/execute  - Execute MCP commands
# GET  /mcp/tools    - Available MCP tools

📊 测试与验证

运行所有测试

# Inside container
pwsh -File "./tests/Run-AllTests.ps1" -TestType "All"

# From host
docker run --rm mcp-enhanced:latest pwsh -File "./tests/Run-AllTests.ps1"

测试类别

# Contract tests (must fail before implementation)
Invoke-Pester "./tests/powershell/contract/" -Verbose

# Unit tests (component-level validation)
Invoke-Pester "./tests/Unit/" -Verbose

# Performance tests (load and response time)
./tests/Performance/Validate-McpPerformance.ps1 -LoadLevel "Heavy"

测试结果

  • 170+测试 所有类别
  • 合同测试 确保正确的API合同
  • 单元测试 验证各个组件
  • 性能测试 验证可扩展性要求
  • 集成测试 确认端到端工作流

🔍 监测和诊断

实时监控

# Start comprehensive monitoring
Start-McpMonitoring -TestSuite "All" -ShowProgress -IntervalSeconds 30

# Monitor specific instance
Start-McpMonitoring -InstanceId "abc123" -MetricTypes @("CPU", "Memory", "Response")

# Health checks
Manage-McpInstance -Action "Health" -InstanceId "abc123"

诊断工具

# Full system diagnostics
Start-McpDiagnostics -TestType "All" -ShowProgress

# Network connectivity tests
Start-McpDiagnostics -TestType "Network" -TargetUrl "http://localhost:3000"

# Container status checks
Start-McpDiagnostics -TestType "Container" -ContainerName "mcp-server"

🔐 安全与最佳实践

集装箱安全

  • 非root用户 尽可能执行
  • 最小基础图像 (Ubuntu 22.04 LTS)
  • 安全扫描 集成到构建过程中
  • 秘密管理 通过环境变量

网络安全

  • 端口隔离 具有可配置的范围
  • TLS/SSL支持 用于生产部署
  • 认证 通过可配置的配置文件
  • 访问日志记录 审计合规性

🚨 故障排除

常见问题

容器无法启动

# Check Docker daemon
docker info

# Verify image integrity
docker images | grep mcp-enhanced

# Check logs
docker logs mcp-enhanced

模块加载错误

# Verify module paths
Get-Module -ListAvailable

# Force reload modules
Get-Module Mcp* | Remove-Module -Force
Import-Module ./scripts/powershell/modules/McpManager/McpManager.psd1

端口冲突

# Check port usage
netstat -tulpn | grep :3000

# Use different ports
docker run -p 3100-3110:3000-3010 mcp-enhanced:latest

性能问题

# Check system resources
Start-McpDiagnostics -TestType "Performance"

# Validate configuration
Manage-McpConfiguration -Action "Validate" -ProfileId "current"

# Monitor resource usage
Start-McpMonitoring -MetricTypes @("CPU", "Memory", "Disk", "Network")

📚 高级用法

自定义配置文件

# Create production profile
$prodConfig = @{
    GlobalSettings = @{
        DefaultTimeout = 60
        MaxRetries = 5
        HealthCheckInterval = 30
        LogLevel = "Warning"
    }
    InstanceSettings = @{
        AutoRestart = $true
        MaxMemoryMB = 2048
        ScaleThreshold = 80
    }
    UserPreferences = @{
        Theme = "Dark"
        AutoSave = $true
        ShowProgress = $false
    }
}

$profile = Manage-McpConfiguration -Action "Create" -Name "Production" -ConfigurationData $prodConfig
Manage-McpConfiguration -Action "Apply" -ProfileId $profile.ProfileId

批量操作

# Connect multiple instances
$configs = @(
    @{ Name="Server1"; BaseUrl="http://localhost:3001"; ContainerName="mcp1" },
    @{ Name="Server2"; BaseUrl="http://localhost:3002"; ContainerName="mcp2" },
    @{ Name="Server3"; BaseUrl="http://localhost:3003"; ContainerName="mcp3" }
)

foreach ($config in $configs) {
    Manage-McpInstance -Action "Connect" -InstanceConfig $config
}

# Batch health checks
$instances = Manage-McpInstance -Action "List"
$instances | ForEach-Object {
    Manage-McpInstance -Action "Health" -InstanceId $_.InstanceId
}

与CI/CD集成

# Example GitHub Actions workflow
name: MCP System Test
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Build Docker Image
      run: docker build -t mcp-enhanced:test .
    - name: Run Tests
      run: docker run --rm mcp-enhanced:test ./test-mcp.sh
    - name: Performance Validation
      run: docker run --rm mcp-enhanced:test pwsh -File "./tests/Performance/Validate-McpPerformance.ps1"

🤝 贡献

该系统遵循企业开发实践:

  1. 模块化设计 -每个模块都有单一的职责
  2. 测试驱动开发 -所有功能都必须经过测试
  3. 文档 -全面的内联和外部文档
  4. PowerShell标准 -遵循公认的动词-名词惯例
  5. Docker最佳实践 -多阶段构建,最少层次

📄 许可证

企业模型上下文协议管理系统-内部使用

🆘 支持

有关技术支持和问题:

  1. 检查诊断:运行 Start-McpDiagnostics -TestType "All"
  2. 审核日志:检查 /app/mcp/data/logs/ 目录
  3. 性能问题:使用 Start-McpMonitoring 用于实时度量
  4. 配置:验证 Manage-McpConfiguration -Action "Validate"

______________________________________________________________________

🎉 您的MCP增强型管理系统已准备好进行企业部署!

从开始 docker run -it mcp-enhanced:latest 探索强大的管理能力。

目录标签

目录标签

PowerShell配置管理Docker容器化本地部署企业级管理实时监控搜索功能

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

运行时(runtime,运行环境)

Docker

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP