Container-MCP
@54rt1n
A podman ubuntu 24.04 container that serves a MCP server; with file, code execution, bash shell, knowledgebase, and more.
Overview
What is Container-MCP?
Container-MCP is a secure, container-based implementation of the Model Context Protocol (MCP) that provides a sandboxed environment for executing code, running commands, accessing files, and performing web operations on behalf of large language models. It exposes these capabilities as standardized tools that AI systems can discover and call.
How to use Container-MCP?
Configure the server via environment variables and run it in development or production mode. Tools are discovered and called by AI systems using the MCP protocol. No explicit installation or invocation commands are documented in the README.
Key features of Container-MCP
- Multi-layered security with container isolation, AppArmor, and Firejail
- MCP protocol with standardized tool discovery and execution
- Domain-specific managers for code, files, web, databases, and more
- Resource limits on CPU, memory, and execution time
- Path traversal prevention and allowed extension restrictions
- Configurable environment with development and production modes
Use cases of Container-MCP
- Execute untrusted bash commands or Python code in a secure sandbox
- Perform safe file operations (read, write, move, delete, patch) in a sandbox
- Scrape web pages or interactively browse websites via Playwright
- Build and query a structured knowledge base with semantic search
- Retrieve stock and cryptocurrency data from Yahoo Finance
- Fetch and aggregate RSS and Atom feeds
FAQ from Container-MCP
What security measures does Container-MCP use?
It uses container isolation via Podman/Docker, AppArmor profiles, Firejail sandboxing, resource limits (CPU, memory, execution time), path traversal prevention, and allowed extension restrictions.
What domain-specific managers are available?
Managers include BashManager, PythonManager, FileManager, WebManager, KnowledgeBaseManager, ListManager, MarketManager (Yahoo Finance), and RssManager.
Does web_browse require additional dependencies?
Yes, web_browse requires Playwright browser binaries. Outside the container, install them with python -m playwright install chromium (or playwright install).
How are knowledge base documents organized?
Documents use a structured URI format (kb://namespace/collection[/subcollection]*/name) and support RDF-style relationships, preferences, references, and metadata management.
Can I configure the environment with environment variables?
Yes, extensive configuration via environment variables is supported, including custom environment and switching between development and production modes.