Sectional MCP Panel Documentation
Overview
The Sectional MCP Panel is a comprehensive management service designed to orchestrate and monitor multiple server processes organized into logical sections. It provides a centralized control panel for starting, stopping, and monitoring servers, with support for containerization and resource management.
Architecture
The Sectional MCP Panel is built with a modular architecture consisting of the following components:
- Database Layer: Handles persistence of panel configuration, sections, servers, tasks, and audit logs
- Configuration System: Manages hierarchical configuration with inheritance (global → section → server)
- Runtime Engine: Manages container lifecycle using Docker
- Orchestration Engine: Coordinates operations across servers and sections
- API Layer: Provides RESTful endpoints for all operations
- Web UI: Offers a user-friendly interface for management
Installation
Prerequisites
- Docker and Docker Compose
- Access to Docker socket for container management
Using Docker Compose
-
Clone the repository:
git clone https://github.com/your-org/mcp-panel.git cd mcp-panel -
Configure the application:
mkdir -p config data cp config/default_config.json config/ -
Start the application:
docker-compose up -d -
Access the UI:
http://localhost:8000/ui
Manual Installation
-
Clone the repository:
git clone https://github.com/your-org/mcp-panel.git cd mcp-panel -
Create a virtual environment:
python -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Configure the application:
mkdir -p config data cp config/default_config.json config/ -
Start the application:
./start.sh
Configuration
The Sectional MCP Panel uses a JSON-based configuration system with a hierarchical structure:
- Global Defaults: Applied to all servers
- Section Settings: Override global defaults for servers in a section
- Server Settings: Override section and global settings for a specific server
Configuration Schema
{
"configSchemaVersion": "1.0.0",
"panelName": "Sectional MCP Panel",
"globalDefaults": {
"settings": {
"environmentVars": {},
"resourceLimits": {},
"runtimeOptions": {},
"securityContext": {}
}
},
"sections": [
{
"sectionName": "Example Section",
"description": "Description",
"settings": {},
"servers": [
{
"serverName": "Example Server",
"description": "Description",
"runtimeDefinition": {
"type": "docker_image",
"command": "image:tag",
"args": [],
"ports": []
},
"settings": {}
}
]
}
]
}
API Reference
The Sectional MCP Panel provides a RESTful API for all operations.
Panel Endpoints
GET /api/v1/panel: Get panel configurationPUT /api/v1/panel: Update panel configurationGET /api/v1/panel/schema: Get configuration schemaGET /api/v1/panel/health: Health check
Section Endpoints
GET /api/v1/sections: Get all sectionsGET /api/v1/sections/{section_id}: Get section by IDPOST /api/v1/sections: Create a new sectionPUT /api/v1/sections/{section_id}: Update a sectionDELETE /api/v1/sections/{section_id}: Delete a sectionPOST /api/v1/sections/{section_id}/{action}: Perform action on section (start, stop, restart)
Server Endpoints
GET /api/v1/servers: Get all serversGET /api/v1/servers/{server_id}: Get server by IDPOST /api/v1/servers: Create a new serverPUT /api/v1/servers/{server_id}: Update a serverDELETE /api/v1/servers/{server_id}: Delete a serverPOST /api/v1/servers/{server_id}/{action}: Perform action on server (start, stop, restart)
Task Endpoints
GET /api/v1/tasks: Get all tasksGET /api/v1/tasks/{task_id}: Get task by ID
User Interface
The Sectional MCP Panel provides a web-based user interface for managing sections and servers. The UI is accessible at http://localhost:8000/ui and includes the following features:
- Dashboard with overview of all sections and servers
- Section management (add, edit, delete)
- Server management (add, edit, delete, start, stop, restart)
- Task monitoring
- Panel configuration
Runtime Types
The Sectional MCP Panel supports the following runtime types:
docker_image: Run a Docker container from an imagenpx_command: Run an NPX command in a Node.js container
Security Considerations
- The Sectional MCP Panel requires access to the Docker socket, which has security implications
- In production environments, consider implementing authentication and authorization
- Restrict access to the API and UI using network controls
- Use secure environment variables for sensitive information
Troubleshooting
Common Issues
- Docker not available: Ensure Docker is installed and the Docker socket is accessible
- Permission denied: Ensure the user running the application has permission to access the Docker socket
- Database errors: Check that the data directory is writable
- Configuration errors: Validate your configuration against the schema
Logs
Logs are written to stdout/stderr and can be viewed using:
docker-compose logs -f
Development
Project Structure
mcp_panel_project/
├── config/ # Configuration files
├── data/ # Database and state files
├── src/ # Source code
│ ├── api/ # API endpoints
│ ├── config/ # Configuration system
│ ├── database/ # Database models and operations
│ ├── orchestration/ # Orchestration engine
│ ├── runtime/ # Runtime engine
│ └── ui/ # Web UI
├── tests/ # Test scripts
├── Dockerfile # Docker build file
├── docker-compose.yml # Docker Compose configuration
├── requirements.txt # Python dependencies
└── start.sh # Startup script
Running Tests
cd mcp_panel_project
python -m tests.test_database
python -m tests.test_config
python -m tests.test_runtime
python -m tests.test_orchestration
python -m tests.test_api
License
This project is licensed under the MIT License - see the LICENSE file for details.
