feat: Add Docker support and multi-host connection pooling#28
Open
ta5n wants to merge 1 commit intotufantunc:mainfrom
Open
feat: Add Docker support and multi-host connection pooling#28ta5n wants to merge 1 commit intotufantunc:mainfrom
ta5n wants to merge 1 commit intotufantunc:mainfrom
Conversation
This commit introduces significant enhancements to the SSH MCP Server: **Multi-Host Support:** - Implement connection pooling with Map-based connection manager registry - Support dynamic host connections via optional 'host' parameter in exec/sudo-exec - Add 'list-hosts' tool to monitor active SSH connections - Parse host:port format (e.g., "example.com:2222") with fallback to default port - Connection key format: user@host:port for unique identification - Enable parallel command execution across multiple SSH servers - Maintain independent connection state per host **Docker Support:** - Add multi-stage Dockerfile with Node.js 20 Alpine base - Include comprehensive .dockerignore for optimized builds - Provide docker-compose examples for various deployment scenarios - Add Docker MCP Gateway integration example - Include .env.example for secure credential management - Document Docker usage in README with examples **Testing:** - Add list-hosts.test.ts for connection pool monitoring - Add multi-host.test.ts with comprehensive multi-host scenarios - Add manual test script (test-multi-host-manual.js) for integration testing - Include docker-compose.test.yml for test environment setup **Documentation:** - Expand README with Docker Usage and Multi-Host Usage sections - Add CLAUDE_CODE_SETUP.md with detailed Turkish setup guide for Claude Code - Document connection pooling benefits and usage patterns - Provide multiple deployment examples (npx, local build, Docker) **Breaking Changes:** None - fully backward compatible Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Owner
|
This is the feature that i planned to made one day, really happy to see this pr. Now i need some time to carefully read those changes. Thanks for contributing 🎉 |
Author
|
You are welcome! |
|
Great PR, cant wait. |
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.
Add Docker Support and Multi-Host Connection Pooling
Summary
This PR introduces two major features to the SSH MCP Server:
Motivation
Multi-Host Support:
Docker Support:
Changes
Multi-Host Connection Pooling
New Features:
hostparameter inexecandsudo-exectoolslist-hoststool to monitor active connectionshostname:portformat (e.g.,example.com:2222)Implementation Details:
Docker Support:
New Files:
Example Usage:
Testing
New Test Files:
Test Coverage:
Documentation
README.md Updates:
New Documentation:
Benefits
Multi-Host Support
Docker Support
Backward Compatibility
✅ Fully backward compatible - All existing configurations and usage patterns continue to work unchanged.
Suggestion for Maintainer
Docker Hub Publication:
I suggest publishing this MCP server to Docker Hub for easier distribution. Benefits:
Suggested repository: tufantunc/ssh-mcp or docker.io/tufantunc/ssh-mcp
Testing Instructions
Multi-Host Testing
Docker Testing
Related Issues
Addresses user requests for:
Checklist
Screenshots/Examples
Note: The Turkish setup guide (CLAUDE_CODE_SETUP.md) is included for Turkish-speaking users. Consider adding an English version or integrating relevant content into the main README.