# SSH-MCP Project Git Collaboration Setup ## Project Repository **Repository Location:** proton.obr.sh (NOT photon) - URL: https://git.proton.obr.sh - Reason: photon.obnh.io will be used as a TEST TARGET for SSH-MCP server operations ## Git Configuration for This Project ### Gitea Instance: git.proton.obr.sh - URL: https://git.proton.obr.sh - Internal URL: http://localhost:3000 (from proton.obr.sh server) - Username: olaf - API-KEY: 151b26b25ffa4100ea776b09e2ed72a2dcb0787e ### Repository Name **ssh-mcp-server** (suggested) - Organization: OBNH or olaf - Description: SSH-based MCP server for OBNH/OBR infrastructure management ## Collaboration Workflow ### For Claude Code 1. Create repository on proton.obr.sh via API or UI 2. Initialize git in /home/olaf/proton/ssh-mcp-project/ 3. Commit implementation files 4. Push to proton.obr.sh ### For Agent Zero 1. Access repository via HTTP API: https://git.proton.obr.sh 2. Clone repository to accessible location (e.g., /tmp/ssh-mcp-project/repo/) 3. Make changes and commits 4. Push updates via API or git commands ## Why proton.obr.sh for This Project? 1. **Test Isolation**: photon.obnh.io is a primary target for SSH-MCP operations - We'll use SSH-MCP to manage photon's Docker containers - We'll test file operations on photon - We'll verify infrastructure queries against photon 2. **Development Separation**: proton.obr.sh hosts the development repository - Code is stored on proton - Tests are executed against photon - Clean separation of concerns 3. **Infrastructure Access**: SSH-MCP server can access BOTH - Repository on proton.obr.sh (via ssh_get_file, ssh_exec) - Test target photon.obnh.io (for validation) ## Repository Structure ``` ssh-mcp-server/ ├── README.md ├── docs/ │ ├── ssh-mcp-server-complete.md │ ├── agent-zero-integration-guide.md │ └── gitea-config.md ├── implementation/ │ ├── ssh_mcp_server.py │ ├── http_wrapper.py │ └── requirements.txt ├── tests/ │ ├── test_ssh_tools.py │ └── test_integration.py ├── config/ │ ├── ssh-mcp-server.service │ └── ssh_config └── examples/ └── usage_examples.md ``` ## Creating the Repository ### Via Gitea API (Automated) ```bash curl -X POST https://git.proton.obr.sh/api/v1/user/repos \ -H "Authorization: token 151b26b25ffa4100ea776b09e2ed72a2dcb0787e" \ -H "Content-Type: application/json" \ -d '{ "name": "ssh-mcp-server", "description": "SSH-based MCP server for OBNH/OBR infrastructure management", "private": false, "auto_init": true, "readme": "Default", "default_branch": "main" }' ``` ### Via Gitea UI (Manual) 1. Navigate to https://git.proton.obr.sh 2. Login as olaf 3. Click "+" → "New Repository" 4. Name: ssh-mcp-server 5. Description: SSH-based MCP server for OBNH/OBR infrastructure management 6. Initialize with README: Yes 7. Create Repository ## Initial Commit Workflow ```bash # Create local git repository cd /home/olaf/proton mkdir -p ssh-mcp-project-repo cd ssh-mcp-project-repo # Initialize git git init git config user.name "Claude Code + Agent Zero" git config user.email "ai-agents@obnh.io" # Copy project files cp -r /tmp/ssh-mcp-server.py implementation/ cp -r /tmp/ssh-mcp-http-wrapper.py implementation/ cp /home/olaf/proton/ssh-mcp-server-complete.md docs/ # Create README cat > README.md << 'EOF' # SSH-MCP Server Model Context Protocol (MCP) server providing SSH-based infrastructure access for Claude Code and Agent Zero. ## Features - 7 infrastructure management tools - HTTP/SSE transport for Claude Code - SSH key-based authentication - Systemd service integration ## Deployment - Server: LXC 110 (10.50.0.110) - HTTP API: http://10.50.0.110:8081 - Documentation: docs/ssh-mcp-server-complete.md ## Collaboration This project is collaboratively developed by Claude Code and Agent Zero. EOF # Add and commit git add . git commit -m "Initial commit: SSH-MCP server implementation - SSH-MCP server with 7 tools (ssh_exec, ssh_list_hosts, etc.) - HTTP/SSE transport wrapper for Claude Code integration - Complete documentation and deployment guide - LXC 110 deployment with systemd service Developed collaboratively by Claude Code and Agent Zero. 🤖 Generated with Claude Code + Agent Zero collaboration " # Add remote and push git remote add origin https://olaf:151b26b25ffa4100ea776b09e2ed72a2dcb0787e@git.proton.obr.sh/olaf/ssh-mcp-server.git git branch -M main git push -u origin main ``` ## Agent Zero Access Agent Zero can interact with the repository using: ### 1. Git Commands via SSH-MCP ```bash # Clone repository on proton.obr.sh ssh root@proton.obr.sh "cd /tmp && git clone https://git.proton.obr.sh/olaf/ssh-mcp-server.git" # Make changes and commit ssh root@proton.obr.sh "cd /tmp/ssh-mcp-server && git add . && git commit -m 'Update from Agent Zero'" # Push changes ssh root@proton.obr.sh "cd /tmp/ssh-mcp-server && git push" ``` ### 2. Gitea API ```bash # Get repository info curl -H "Authorization: token 151b26b25ffa4100ea776b09e2ed72a2dcb0787e" \ https://git.proton.obr.sh/api/v1/repos/olaf/ssh-mcp-server # Create issue curl -X POST https://git.proton.obr.sh/api/v1/repos/olaf/ssh-mcp-server/issues \ -H "Authorization: token 151b26b25ffa4100ea776b09e2ed72a2dcb0787e" \ -H "Content-Type: application/json" \ -d '{ "title": "Enhancement: Add tool XYZ", "body": "Agent Zero suggests adding tool XYZ for better infrastructure management" }' ``` ### 3. SSH-MCP Tools Agent Zero can use the deployed SSH-MCP server to: - Read files from the repository: `ssh_get_file` with host="proton", path="/path/to/repo/file" - Execute git commands: `ssh_exec` with host="proton", command="cd /tmp/ssh-mcp-server && git status" - Modify files: `ssh_put_file` with host="proton" ## Progress Tracking Both Claude Code and Agent Zero should: 1. Commit changes with descriptive messages 2. Include "Claude Code" or "Agent Zero" in commit author/message 3. Use issues for tracking enhancements 4. Update documentation with each change ## Security Notes ⚠️ **API Key Security** - This file contains the Gitea API key for proton.obr.sh - Keep this file restricted: `chmod 600` - Never commit to public repositories - Both agents should use the API key responsibly ## Testing Strategy ### Test on photon.obnh.io (PRIMARY TEST TARGET) - Use SSH-MCP to list Docker containers on photon - Use SSH-MCP to read config files from photon - Use SSH-MCP to execute monitoring commands on photon - Verify SSH-MCP operations don't interfere with photon's services ### Test on proton.obr.sh (DEVELOPMENT SERVER) - Clone and manage the repository - Test git operations via SSH-MCP - Verify API access and authentication ### Test on fry.obr.sh (SECONDARY TARGET) - Validate SSH-MCP connectivity - Test LXC operations (as fry will host migrated services) ## Next Steps 1. **Create Repository** (Claude Code or Agent Zero) - Use Gitea API or UI - Name: ssh-mcp-server - Initialize with README 2. **Initial Commit** (Claude Code) - Commit all implementation files - Push to proton.obr.sh 3. **Agent Zero Setup** (Agent Zero) - Clone repository - Verify SSH-MCP access to repository - Make first collaborative commit 4. **Testing** (Both) - Execute test operations on photon.obnh.io - Document results in repository - Create issues for improvements --- **Project Status**: Ready for repository creation and initial commit **Collaboration Model**: Claude Code (development) + Agent Zero (testing & integration) **Repository Host**: proton.obr.sh (git.proton.obr.sh) **Test Target**: photon.obnh.io