
mcp in docker
A Dockerized MCP server setup to deploy onto remote development servers
Repository Info
About This Server
A Dockerized MCP server setup to deploy onto remote development servers
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Model Context Protocol Server
A containerized Model Context Protocol (MCP) server that enables communication between LLMs and tools through a standardized protocol. The server provides both REST API and WebSocket interfaces for tool execution and context management.
Features
- Dual runtime environment (Node.js + Python)
- WebSocket support for real-time updates
- REST API endpoints for tool management
- Context persistence and management
- Tool execution isolation
- Easy deployment with Docker
- Support for Python-based tools
Prerequisites
- Docker
- Docker Compose
Setup
- Clone the repository:
git clone <repository-url>
cd eooo-mcp-docker
- Create necessary directories:
mkdir -p tools context data
- Configure environment variables by creating a
.envfile:
NODE_ENV=production
PORT=3000
TOOLS_DIR=/app/tools
CONTEXT_DIR=/app/context
PYTHON_PATH=/usr/local/bin/python
Running the Server
- Build and start the container:
docker-compose up --build
- To run in detached mode:
docker-compose up -d
API Endpoints
REST API
GET /api/tools: List all available toolsPOST /api/execute: Execute a specific toolGET /api/context/:id: Retrieve context by ID
WebSocket API
Connect to ws://localhost:3000 and send/receive JSON messages:
Messages
- Execute Tool:
{
"type": "EXECUTE_TOOL",
"payload": {
"tool": "tool_name.py",
"params": {
"param1": "value1"
}
}
}
- Get Context:
{
"type": "GET_CONTEXT",
"payload": "context_id"
}
Tool Integration
- Place your Python tools in the
toolsdirectory - Tools should accept JSON parameters and return JSON output
- Example tool structure:
import sys
import json
def main(params):
# Process params
result = {"status": "success", "data": {}}
return json.dumps(result)
if __name__ == "__main__":
params = json.loads(sys.argv[1])
print(main(params))
Context Management
- Context files are stored in the
contextdirectory as JSON files - Each context file should have a unique ID
- Context can be accessed via both REST API and WebSocket
Development
To run in development mode with hot reload:
docker-compose up --build
Stopping the Server
docker-compose down
Security Considerations
- Tool execution is isolated within the container
- Input validation is performed on all API endpoints
- Context access can be restricted based on implementation needs
License
[Your License Here]
Quick Start
Clone the repository
git clone https://github.com/eooo-io/mcp-in-dockerInstall dependencies
cd mcp-in-docker
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.