{"id":32518401,"url":"https://github.com/ptonelli/mcp-shell","last_synced_at":"2026-05-07T09:33:56.362Z","repository":{"id":300793032,"uuid":"1006928627","full_name":"ptonelli/mcp-shell","owner":"ptonelli","description":"a set of mcp tools to host on your own server with a shell and a few python helpers","archived":false,"fork":false,"pushed_at":"2026-02-04T22:24:34.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-04T23:43:30.076Z","etag":null,"topics":["git","mcp-server","python3","shell"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ptonelli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-23T07:53:59.000Z","updated_at":"2026-02-04T22:24:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"98bf2bbd-ee0a-46bd-bfee-c515b6ecfdf3","html_url":"https://github.com/ptonelli/mcp-shell","commit_stats":null,"previous_names":["ptonelli/mcp-python","ptonelli/mcp-shell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ptonelli/mcp-shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptonelli%2Fmcp-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptonelli%2Fmcp-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptonelli%2Fmcp-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptonelli%2Fmcp-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptonelli","download_url":"https://codeload.github.com/ptonelli/mcp-shell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptonelli%2Fmcp-shell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32731540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","mcp-server","python3","shell"],"created_at":"2025-10-28T03:31:20.429Z","updated_at":"2026-05-07T09:33:56.357Z","avatar_url":"https://github.com/ptonelli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Shell Server\n\nA Model Context Protocol (MCP) server that provides shell execution and file system operations with **multi-conversation support** for LibreChat.\n\n## ✨ New: Multi-Conversation Support\n\nThis version now supports proper session isolation per conversation when used with LibreChat. Each conversation gets its own working directory state, preventing conflicts between parallel conversations.\n\n### How it works\n\nThe server now uses LibreChat's conversation ID (available via PR #9095) to create isolated sessions:\n- Uses `{{LIBRECHAT_BODY_CONVERSATIONID}}` header to get unique conversation ID\n- Each conversation maintains its own working directory state\n- No more conflicts between parallel conversations in LibreChat\n\n### LibreChat Configuration\n\nAdd this to your `librechat.yaml`:\n\n### LibreChat Configuration\n\nAdd this to your `librechat.yaml`. The `X-Conversation-ID` header is crucial for isolating file system states between different chats.\n\n```yaml\nmcpServers:\n  mcp-shell:\n    type: streamable-http\n    url: http://mcp-shell:8000/mcp\n    headers:\n      # 🎯 KEY: This enables per-conversation isolation\n      X-Conversation-ID: \"{{LIBRECHAT_BODY_CONVERSATIONID}}\"\n      # Optional: User context for logging\n      X-User-ID: \"{{LIBRECHAT_USER_ID}}\"\n    \n    serverInstructions: |\n      Shell execution server with per-conversation working directories.\n      Each conversation maintains its own isolated file system state.\n      Capabilities: shell execution, file reading/writing, git cloning.\n```\n\n### Docker Compose Example\n\nAdd this service to your `docker-compose.yml`:\n\n```yaml\nservices:\n  mcp-shell:\n    container_name: mcp-shell\n    image: mcp-shell:latest\n    build: .\n    environment:\n      - WORKDIR=/home/projects\n      - HOST=0.0.0.0\n      - PORT=8000\n      - MCP_LOG_COMMANDS=1\n    volumes:\n      - ./projects:/home/projects\n```\n\n### Debug Mode\n\nSet `MCP_LOG_COMMANDS=1` to enable debug logging that shows:\n- Context object inspection (all available attributes)\n- Session ID resolution logic  \n- Conversation ID detection from headers\n- Working directory assignments\n\nTo run locally with debug logging:\n```bash\nMCP_LOG_COMMANDS=1 python server.py\n```\n\n## Features\n- **Session Isolation**: Each LibreChat conversation gets its own working directory.\n- **File Operations**: Read, write, list files with path security checks.\n- **Shell Execution**: Run shell commands (supports Python venvs detection).\n- **Git Support**: Clone repositories and switch context automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptonelli%2Fmcp-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptonelli%2Fmcp-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptonelli%2Fmcp-shell/lists"}