Add Deno Docker Environment for MCP Server Execution - #7
Closed
samuraikun wants to merge 10 commits into
Closed
Conversation
Adds Deno configuration files and Docker setup for Deno runtime: - Dockerfile.deno: Official Deno Docker image with security enhancements - docker-compose.deno.yml: Container orchestration configuration - deno.json/deno.lock: Deno project configuration files
- run-inspector-deno.sh: Script for running MCP Inspector with Deno Docker - Makefile: Unified command interface for both Node.js and Deno environments Provides easy-to-use commands for building, running, testing, and debugging the MCP server in both Node.js and Deno environments.
Add comprehensive documentation for Deno Docker implementation: - Installation and setup instructions - Usage instructions for Docker environment - Integration guide for AI assistants - Security and configuration details - Environment variables reference
Modify core source files to ensure compatibility with Deno environment: - Update src/index.ts for Deno server initialization - Adapt S3 resource implementation for Deno runtime - Modify tool implementations for cross-environment operation - Update type definitions for Deno compatibility - Update .gitignore to exclude Deno-specific artifacts
Update Biome linter/formatter configuration to properly handle Deno code: - Add support for Deno-specific syntax - Configure linting rules for cross-environment code - Ensure consistent formatting between Node.js and Deno files
Simplify Docker implementation by merging configurations: - Unified docker-compose.yml with both MinIO and Deno services - Renamed Dockerfile.deno to Dockerfile (single Docker image) - Updated Makefile commands to use standard docker-compose - Simplified run-inspector-deno.sh script for improved workflow This consolidation provides a single Docker configuration for both development and MCP server operation.
There was a problem hiding this comment.
Copilot reviewed 11 out of 16 changed files in this pull request and generated 1 comment.
Files not reviewed (5)
- Dockerfile: Language not supported
- Makefile: Language not supported
- biome.json: Language not supported
- deno.json: Language not supported
- run-inspector-deno.sh: Language not supported
Comments suppressed due to low confidence (1)
README.deno.md:54
- [nitpick] The documentation refers to 'docker-compose.deno.yml' while the diff provides 'docker-compose.yml'. Update the README or file name to ensure consistency and reduce confusion.
docker-compose -f docker-compose.deno.yml up -d
| server.tool( | ||
| tool.name, | ||
| tool.description, | ||
| // @ts-ignore - Convert zod-formatted parameters to the format expected by MCP server |
There was a problem hiding this comment.
[nitpick] Suppressing type checks with @ts-ignore may hide potential type mismatches. Consider explicitly casting tool.parameters to the expected type to improve type safety.
Merge information from README.deno.md into main README.md to provide: - Complete documentation for both Node.js and Deno environments - Enhanced security features explanation - Docker setup instructions - Makefile usage guidance - Updated configuration options - AI assistant integration instructions
Owner
Author
|
I quit supporting Deno below.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Overview
This PR adds support for running the AWS S3 MCP server in a Deno runtime via Docker, significantly enhancing security and deployment flexibility. Users can now run the MCP server with either Node.js or Deno environments.
flowchart LR Client[MCP Client] -->|MCP Protocol| Server[AWS S3 MCP Server] subgraph Container[Docker Container] Server -->|API Calls| S3[AWS S3 Service] Server -->|Local Storage| Deno[(Deno Runtime)] end style Container fill:#61affe,stroke:#333,stroke-width:2px,color:#333 style Client fill:#9063cd,stroke:#333,stroke-width:1px,color:#333 style Server fill:#ffffff,stroke:#333,stroke-width:1px,color:#333 style S3 fill:#f5a623,stroke:#333,stroke-width:1px,color:#333 style Deno fill:#85ea2d,stroke:#333,stroke-width:1px,color:#333🔒 Security Background
MCP servers can present security risks when executed directly on local machines. According to a 2025 security analysis by Equixly, MCP servers frequently contain critical vulnerabilities:
As noted in the article Crashing MCP Server, running MCP servers in Docker containers with Deno provides significant security benefits:
flowchart TD subgraph Security[Security Layers] L1[Docker Container Isolation] --> L2[Non-root User: deno] L2 --> L3[Deno Permission System] L3 --> L4[Network Isolation] end Attacker[Potential Attacker] -.->|Blocked| L1 Attacker -.->|Blocked| L2 Attacker -.->|Blocked| L3 Attacker -.->|Blocked| L4 Host[Host System] -->|Protected| Security style Attacker fill:#e86c60,stroke:#333,stroke-width:2px,color:#333 style Security fill:#61affe,stroke:#333,stroke-width:2px,color:#333 style Host fill:#9063cd,stroke:#333,stroke-width:1px,color:#333 style L1 fill:#85ea2d,stroke:#333,stroke-width:1px,color:#333 style L2 fill:#85ea2d,stroke:#333,stroke-width:1px,color:#333 style L3 fill:#85ea2d,stroke:#333,stroke-width:1px,color:#333 style L4 fill:#85ea2d,stroke:#333,stroke-width:1px,color:#333✨ Key Changes
🐳 Docker Configuration Integration
Unified
docker-compose.ymlwith:Secure Dockerfile implementation:
🛠️ Build and Runtime Process Improvements
Added unified
Makefile:Added
run-inspector-deno.shscript:🔐 Security Features
🧪 Testing
Tested environments:
Run on local with MCP Inspector
🔮 Future Work
📊 Command Usage
gantt title Docker MCP Server Command Flow dateFormat YYYY-MM-DD section Setup make deno-build :setup1, 2025-04-01, 1d make deno-start :setup2, after setup1, 1d section Testing make deno-test :test1, after setup2, 1d section Debugging make deno-inspector :inspect1, after test1, 1d section Cleanup make deno-stop :cleanup1, after inspect1, 1d