183 lines
5.5 KiB
YAML
183 lines
5.5 KiB
YAML
# MCP-Forge Configuration File
|
|
#
|
|
# Copy this file to config.yaml and customize for your environment:
|
|
# cp config.yaml.example config.yaml
|
|
#
|
|
# All paths can be absolute or relative to the config file location.
|
|
|
|
# ============================================================================
|
|
# Server Configuration
|
|
# ============================================================================
|
|
server:
|
|
# Network binding
|
|
host: localhost
|
|
port: 3000
|
|
|
|
# Podman socket path - UPDATE THIS FOR YOUR SYSTEM
|
|
# Common locations:
|
|
# - Linux (rootless): /run/user/1000/podman/podman.sock
|
|
# - Linux (root): /var/run/podman/podman.sock
|
|
# - macOS: /var/run/docker.sock (if using Podman Desktop)
|
|
podman_socket: /run/user/1000/podman/podman.sock
|
|
|
|
# ============================================================================
|
|
# Security Configuration
|
|
# ============================================================================
|
|
security:
|
|
# Audit log location (will be created if doesn't exist)
|
|
audit_log: ./logs/audit.log
|
|
|
|
# Enforce container resource limits
|
|
enforce_resource_limits: true
|
|
|
|
# Allow containers network access (NOT RECOMMENDED for security)
|
|
allow_network: false
|
|
|
|
# ============================================================================
|
|
# Execution Configuration
|
|
# ============================================================================
|
|
execution:
|
|
# Default backend: "simple" (stateless) or "jupyter" (stateful sessions)
|
|
default_backend: simple
|
|
|
|
# Timeout settings (seconds)
|
|
default_timeout: 300 # 5 minutes
|
|
max_timeout: 1800 # 30 minutes
|
|
|
|
# Memory limits (use k, m, g suffixes)
|
|
default_memory: 512m
|
|
max_memory: 2g
|
|
|
|
# CPU quota (microseconds per 100ms period)
|
|
# 50000 = 50% of one core, 100000 = 100% of one core
|
|
default_cpu_quota: 50000
|
|
max_cpu_quota: 100000
|
|
|
|
# ============================================================================
|
|
# Container Images
|
|
# ============================================================================
|
|
images:
|
|
# Python images (tag or pull from registry)
|
|
python_3_11: mcp-forge/python:3.11
|
|
python_3_12: mcp-forge/python:3.12
|
|
jupyter: mcp-forge/jupyter:latest
|
|
|
|
# Automatically pull images if not found locally
|
|
auto_pull: true
|
|
|
|
# Image pull check interval (seconds, 24 hours = 86400)
|
|
pull_interval: 86400
|
|
|
|
# ============================================================================
|
|
# Session Configuration (for Jupyter backend)
|
|
# ============================================================================
|
|
sessions:
|
|
# Session idle timeout before auto-cleanup (seconds, 1 hour = 3600)
|
|
idle_timeout: 3600
|
|
|
|
# Maximum concurrent sessions
|
|
max_concurrent: 10
|
|
|
|
# Cleanup check interval (seconds, 5 minutes = 300)
|
|
cleanup_interval: 300
|
|
|
|
# ============================================================================
|
|
# Volume Configuration
|
|
# ============================================================================
|
|
volumes:
|
|
# Base directory for session volumes
|
|
base_path: ./volumes
|
|
|
|
# Storage quota per session (use k, m, g suffixes)
|
|
session_quota: 1g
|
|
|
|
# Maximum allowed quota
|
|
max_session_quota: 10g
|
|
|
|
# ============================================================================
|
|
# Environment Builder Configuration
|
|
# ============================================================================
|
|
environment_builder:
|
|
# Enable dynamic environment building with uv
|
|
enabled: true
|
|
|
|
# UV package cache directory
|
|
uv_cache_path: ./cache/uv
|
|
|
|
# Build limits
|
|
max_packages_per_build: 50
|
|
max_build_time: 600 # 10 minutes
|
|
max_image_size: 2147483648 # 2GB in bytes
|
|
max_concurrent_builds: 3
|
|
|
|
# Rate limiting for build requests
|
|
build_rate_limit:
|
|
requests: 10 # Maximum requests
|
|
period: 60 # Per time period (seconds)
|
|
|
|
# Package validation
|
|
package_validation:
|
|
# Use allowlist (if false, all packages allowed except blocklist)
|
|
use_allowlist: true
|
|
|
|
# Path to allowlist file (one package per line)
|
|
allowlist_path: ./config/allowlist.txt
|
|
|
|
# Path to blocklist file (one package per line)
|
|
blocklist_path: ./config/blocklist.txt
|
|
|
|
# Patterns requiring manual approval (regex)
|
|
require_approval_patterns: []
|
|
|
|
# Auto-cleanup configuration (future feature)
|
|
auto_cleanup: {}
|
|
|
|
# Environment templates (future feature)
|
|
templates: {}
|
|
|
|
# ============================================================================
|
|
# MCP Tools Configuration
|
|
# ============================================================================
|
|
# External MCP tool servers to connect to
|
|
#
|
|
# Supports three transport types:
|
|
#
|
|
# 1. stdio (default) - Command-based MCP servers
|
|
# Required: command
|
|
# Optional: args, env
|
|
#
|
|
# 2. http - HTTP-based MCP servers
|
|
# Required: url
|
|
# Optional: headers
|
|
#
|
|
# 3. sse - Server-Sent Events MCP servers
|
|
# Required: url
|
|
# Optional: headers
|
|
#
|
|
mcp_tools: {}
|
|
|
|
# Example configurations:
|
|
#
|
|
# # stdio transport (command-based MCP server)
|
|
# mcp_tools:
|
|
# filesystem:
|
|
# transport: stdio # default, can be omitted
|
|
# command: uvx
|
|
# args: [mcp-server-filesystem, /path/to/workspace]
|
|
# env:
|
|
# SOME_VAR: value
|
|
#
|
|
# # http transport (external HTTP MCP server)
|
|
# remote_api:
|
|
# transport: http
|
|
# url: http://localhost:8006/mcp
|
|
# headers:
|
|
# Authorization: "Bearer your-token-here"
|
|
# X-Custom-Header: "value"
|
|
#
|
|
# # sse transport (Server-Sent Events MCP server)
|
|
# sse_service:
|
|
# transport: sse
|
|
# url: http://localhost:9000/events
|
|
# headers:
|
|
# Authorization: "Bearer your-token-here"
|