OpenCOOP MCP Server
OpenCOOP MCP Server enables real-time team collaboration on one shared project folder, with MCP tools for file access, search, locking, auditing, and team management.
Read, create/overwrite, and make targeted search-and-replace edits to project files.
List files/directories, search files by glob, grep contents by regex, and view directory trees.
Acquire, release, list, and check file locks to prevent concurrent edit conflicts.
View recent team changes, project statistics, and currently online members.
Invite members with read/write/admin permissions, list team members, and revoke access.
Operate within the README’s security model: local trusted access, remote token/permission enforcement, sandbox path protections, and auditable changes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenCOOP MCP Server Lock src/index.js so I can edit it before anyone else"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenCOOP
Real-time team collaboration for OpenCode — a whole team on the same project.
Getting Started • Documentation • Contributing
What is OpenCOOP?
Turn any device into a shared coding server. Your whole team codes together on ONE project — from anywhere in the world.
OpenCOOP is an OpenCode plugin that lets multiple developers (each with their own AI assistant) work simultaneously on the same project folder hosted on one machine.
How It Works (Simple!)
YOUR LAPTOP (HOST) TEAMMATE'S LAPTOP (REMOTE)
┌──────────────────┐ ┌──────────────────┐
│ Your Project │ │ Teammate's │
│ /home/you/app │◄──── INTERNET ───│ OpenCode + AI │
│ │ (via tunnel) │ │
│ OpenCOOP Server │ │ OpenCOOP Plugin │
│ Port 31313 │ │ (proxies to you)│
└──────────────────┘ └──────────────────┘
▲ │
│ ▼
│ Teammate's AI reads/writes
│ YOUR files in real-time!
│
Every change is LOGGED:
✅ Who changed what file
✅ Full diff (red/green view)
✅ TimestampReal-World Example
You have a project on your laptop at
/home/you/my-appYou open OpenCOOP web UI → select HOST → pick your folder → click Generate Invite Link
You send the link to your teammate (e.g.,
https://abc123.tinyfi.sh/ui/invite/xyz)Teammate installs the plugin, pastes your link, clicks Connect
Now teammate's AI can read, write, and edit YOUR project files as if they were local!
You both see every change in the Changes page with who made it and a visual diff
No Git push/pull. No screen sharing. No "send me the file". Just code together live.
Key Concepts
Concept | Explanation |
HOST | The one device that holds the real project files. Shares them over the internet via a secure tunnel. |
REMOTE | Any other device that connects to the host. Their AI works on the host's files as if local. |
Invite Link | A secure URL the host generates. Contains the tunnel address + access token. Share it with teammates. |
Change Tracking | Every file read/write/edit is logged with the user's name, timestamp, and full diff. |
File Locking | Prevent two people from editing the same file at the same time (avoids conflicts). |
Coming Soon 🚀
Admin Dashboard: Manage team members, permissions, and access
Conflict Resolution: Smart merge when two users edit the same lines
Teams of dozens work simultaneously with full audit trails. ("Up to 50" is the design budget we test against, not an enforced seat limit — invites have no per-team cap.)
Related MCP server: io.github.saicharanrajoju/letswork
Features
Feature | Description |
🔗 Shared MCP Server | Multiple OpenCode instances share the same project |
👥 Team Scale | Real-time collaboration with dozens of members; no seat limit in code |
📝 Change Tracking | Every file modification is logged with user attribution |
📸 Auto Snapshots | Every write/edit saves the previous version (last 20 per file, 2MB cap, binaries skipped) |
↩️ One-Click Rollback | Restore any file from Changes page, or let the AI undo its own mistakes via |
🤖 AI Self-Healing |
|
💾 Project-Local History | All history lives in |
🔒 File Locking | Prevents conflicts when multiple users edit the same file |
🌐 Web Dashboard | Beautiful UI for configuration and monitoring |
🔑 Invite System | Secure token-based team member invitations |
🛡️ Sandbox Security | Path traversal protection, symlink blocking, absolute path blocking, |
🌍 Remote Access | SSH tunnel (tinyfi.sh) — works behind NAT, firewall, or VPN |
📊 Statistics | View changes per user, recent activity, and more |
🔄 Auto-Recovery | Tunnel auto-reconnects, server auto-restarts on failure |
🔐 Authenticated Remote Access | Every tunnel/LAN request requires a token; local stays frictionless. Read/write/admin permissions enforced per call |
🛡️ Hardened by Default | Binds to 127.0.0.1, strict CORS + Host allowlist + CSRF guard, rate limiting, security event log, instant revocation |
Security
OpenCOOP takes the shared-workspace boundary seriously (see SECURITY.md):
Local = trusted, Remote = token. Your own OpenCode and browser connect over loopback and need no token. Anyone arriving through the public tunnel (or LAN when enabled) must present a valid token.
Invite redemption issues member tokens (30 days). Permissions (
read,write,admin) are enforced for every MCP tool call and API request, and re-checked against the team database on each request — revoking a member cuts access immediately.The tunnel can never impersonate local. The SSH tunnel connects to a local edge proxy that stamps public traffic with a per-process secret; the server refuses to treat stamped traffic as local even though it arrives from
127.0.0.1.The admin token never leaves the host (localhost/admin views only).
The server binds
127.0.0.1by default; LAN exposure is opt-in via Settings and still requires tokens for non-local callers.
Found a vulnerability? Please follow the private reporting process in SECURITY.md. We credit responsible researchers.
Installation
Install via npm (Recommended)
npm install -g @opencoop/opencode-pluginThen add to your ~/.config/opencode/opencode.json:
OpenCode V1 (plugin key):
{
"plugin": ["@opencoop/opencode-plugin"],
"mcp": {
"opencoop": {
"type": "remote",
"url": "http://localhost:31313/sse",
"enabled": true
}
}
}OpenCode V2 (plugins key — same package, both generations supported):
{
"plugins": ["@opencoop/opencode-plugin"]
}OpenCOOP ships dual V1 + V2 entry points: one package works on both OpenCode generations. On V2 the plugin registers its tools through the Promise plugin API; no MCP block is needed.
Install from GitHub
git clone https://github.com/Pajand/opencoop.git
cd opencoop
npm install
npm run build
npm linkThen add to your ~/.config/opencode/opencode.json:
{
"plugin": ["opencoop"],
"mcp": {
"opencoop": {
"type": "remote",
"url": "http://localhost:31313/sse",
"enabled": true
}
}
}Quick Start
Install the plugin (
npm install -g @opencoop/opencode-plugin)Restart OpenCode
Open
http://localhost:31313/uiin your browserSelect HOST mode (project owner) or REMOTE mode (team member)
Usage
HOST Mode (Project Owner)
Select HOST mode in the web UI
Choose your project folder
Click Generate Invite Link
Share the link with your team
The invite link uses an automatic SSH tunnel via tinyfi.sh (https://xxx.tinyfi.sh), so team members can connect even behind NAT, firewall, or VPN.
REMOTE Mode (Team Member)
Install the plugin on your machine
Add the MCP config to your
opencode.jsonRestart OpenCode
Open
http://localhost:31313/uiSelect REMOTE mode
Paste the host's invite link
Click Connect — done.
Your local server now proxies every tool call to the host over its tunnel, so your AI reads/writes the HOST's project folder live.
Automatic SSH Tunnel (Zero Setup)
When HOST mode is active, OpenCOOP automatically:
Opens an SSH reverse tunnel to
tinyfi.shForwards traffic to
http://localhost:31313Uses the public
https://xxx.tinyfi.shURL in all invite links
Requirements: Node.js 18+, OpenCode, and an SSH client (preinstalled on virtually all systems).
MCP Tools
Once connected, your AI has access to 15 tools:
Tool | Description |
| Read file contents from the shared project |
| Create or overwrite files |
| Make targeted edits using search & replace |
| List directory contents |
| Search files by glob pattern |
| Search file contents with regex |
| Get folder structure overview |
| Acquire exclusive lock before editing |
| Release lock after editing |
| View recent changes by team members |
| View project statistics |
| See who is currently connected |
| Generate invite link for new members |
| List all team members |
| Revoke a member's access |
| START HERE — AI calls this first; teaches the rules + confirmation question |
| List saved previous versions of a file |
| Undo a mistake: restore a file (just path = undo last change) |
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Team Members (any size) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Member A │ │ Member B │ │ Member C │ │ Member N │ │
│ │ OpenCode │ │ OpenCode │ │ OpenCode │ │ OpenCode │ │
│ │ + MCP │ │ + MCP │ │ + MCP │ │ + MCP │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ └──────────────┴──────────────┴──────────────┘ │
│ │ │
│ SSH Tunnel (tinyfi.sh) │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ OpenCOOP MCP Server │ │
│ │ • SSE Transport (Server-Sent Events) │ │
│ │ • File Locking (prevent edit conflicts) │ │
│ │ • Change Tracking (user attribution) │ │
│ │ • Sandbox Security (path validation) │ │
│ │ • Web Dashboard (configuration UI) │ │
│ └──────────────────────────┬─────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Shared Project Folder │ │
│ │ • Symlink protection │ │
│ │ • Absolute path blocking │ │
│ │ • Path traversal prevention │ │
│ └────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘AI Agent Instructions
If you are an AI agent reading this, follow these exact steps to install and configure OpenCOOP:
Step 1: Install
which opencode || echo "OpenCode not found - user needs to install it first"
npm install -g @opencoop/opencode-pluginStep 2: Configure
Add the plugin to ~/.config/opencode/opencode.json:
{
"plugin": ["@opencoop/opencode-plugin"],
"mcp": {
"opencoop": {
"type": "remote",
"url": "http://localhost:31313/sse",
"enabled": true
}
}
}Step 3: Verify
npm list -g @opencoop/opencode-pluginStep 4: Access Web UI
http://localhost:31313/uiDiagnostics
# 1. Is OpenCode installed?
which opencode || echo "NOT IN PATH"
# 2. Is the plugin installed?
npm ls -g @opencoop/opencode-plugin 2>&1
# 3. Is the HTTP server up?
curl -s --max-time 3 http://localhost:31313/health || echo "SERVER DOWN"
# 4. Does SSE work (not HTML)?
curl -s -o /dev/null -w '%{http_code} %{content_type}\n' --max-time 3 -H 'Accept: text/event-stream' http://localhost:31313/ssePlatform Notes
Termux (Android):
OpenCode binary is usually at
$PREFIX/bin/opencodeor$HOME/.opencode/bin/opencode.If
which opencodefails, add to PATH:export PATH="$HOME/.opencode/bin:$PATH"
Windows:
Config path:
%USERPROFILE%\.config\opencode\opencode.jsonPlugin cache:
%USERPROFILE%\.cache\opencode\packages\@opencoop
Mac:
Homebrew:
/opt/homebrew/bin/opencodecurl script:
~/.opencode/bin/opencode
Troubleshooting
Plugin recognized by OpenCode but UI not loading / MCP not starting
Plugin version too old: Must be
1.16.0or newer. Check withnpm ls -g @opencoop/opencode-plugin.Stale plugin cache: Clear and restart:
rm -rf ~/.cache/opencode/packages/@opencoopPort 31313 already in use: Check with
lsof -i :31313orss -ltnp | grep 31313.
MCP stays red / won't connect
Make sure the OpenCode web UI (or TUI) is open — the plugin server only starts when OpenCode loads the plugin.
Verify the server:
curl http://localhost:31313/healthVerify SSE:
curl -N -H 'Accept: text/event-stream' http://localhost:31313/sseMake sure your MCP
urlends with/sse(not/mcp).
Invite link shows local IP instead of tunnel URL
Fully restart OpenCode after install/update — the plugin code loads only at startup.
Wait a few seconds on first run — the SSH tunnel connects to tinyfi.sh.
Mode must be HOST and saved — click Save after selecting HOST.
Check the badge: green = links use the tunnel; red = shows the exact error.
Tools fail or return errors
Open the web UI (http://localhost:31313/ui), select HOST or REMOTE mode and configure your project folder. Tools need a configured workspace before they can read/write files.
Support the project
OpenCOOP is built and maintained by one developer, with no company behind it. If it saves your team time, a star is the whole marketing budget:
A star also gets us into the awesome-opencode catalog, which is how most people find OpenCode plugins. It takes ten seconds and it genuinely moves the project.
Other ways to help, if a star feels cheap:
Report a bug — especially security issues; the last one (unauthenticated MCP transport) came from a user and is now documented in SECURITY.md.
Tell one person who runs OpenCode with a team.
Write about it — a post, a gist, a comment. Anything that links back here.
Contributing
Contributions are welcome! Please read the contributing guidelines first.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
OpenCOOP Non-Commercial License — Free for non-commercial use, commercial use requires permission.
See LICENSE file for details.
Author
Made with ❤️ for the OpenCode community
Available Tools
20 toolscheck_lockB
Check if a specific file is currently locked.
Inputs: path (required).
directory_treeB
Get a tree view of the project directory structure.
Inputs: path, exclude, max_depth.
edit_fileB
Make a targeted edit to a file using search and replace.
Inputs: path (required), search (required), replace (required), replace_all.
grep_contentC
Search file contents using regex pattern.
Inputs: pattern (required), path, include.
invite_memberB
Generate an invite link for a new team member.
Inputs: email (required), permissions (required), expires_in_days.
list_filesB
List files and directories in the shared project.
Inputs: path, recursive.
list_locksA
List all currently active file locks in the project.
Inputs: no named parameters.
list_membersA
List all team members and their permissions.
Inputs: no named parameters.
list_snapshotsA
List saved previous versions of a shared-project file. Use before rollback_file to pick a version.
Inputs: limit, file_path.
lock_fileB
Acquire an exclusive lock on a file before editing.
Inputs: path (required), reason.
opencoop_guideA
START HERE — call FIRST in every new conversation BEFORE any file work. Explains the shared project and behavior rules.
Inputs: no named parameters.
read_fileB
Read the contents of a file in the shared project.
Inputs: path (required), end_line, start_line.
revoke_accessC
Revoke a team member's access.
Inputs: user_id (required), reason.
rollback_fileA
UNDO YOUR MISTAKE: restore a shared-project file to a previous version. Pass ONLY path to undo the last change. For a specific version: list_snapshots first, then pass path + snapshot_id. SAFE: current state is snapshotted first, so rollback is reversible.
Inputs: path (required), change_id, snapshot_id.
search_filesC
Search for files matching a glob pattern.
Inputs: pattern (required), max_results.
unlock_fileA
Release a lock on a file after editing. Reports the truth about whether the lock was actually released.
Inputs: path (required).
view_changesB
View recent changes made by all team members.
Inputs: limit, user_id, file_path.
view_statsB
View statistics about the project.
Inputs: no named parameters.
who_is_onlineB
See which team members are currently connected.
Inputs: no named parameters.
write_fileB
Create or overwrite a file in the shared project.
Inputs: path (required), content (required), create_dirs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a distinct action or resource: file CRUD, lock management, snapshot rollback, project views, team administration, and a guide. Related tools like check_lock vs. list_locks and list_members vs. who_is_online have clearly separated scopes. No two tools appear to do the same thing.
Most names follow a predictable verb_noun snake_case pattern (read_file, lock_file, list_snapshots, invite_member). There are a few minor deviations such as who_is_online, directory_tree, and opencoop_guide, but the set remains readable and mostly consistent.
At 20 tools, the set is on the heavier side but each tool maps to a meaningful collaboration operation. File operations, locking, snapshots, team management, and project visibility all justify their own tools. It is slightly expansive but not bloated.
The file lifecycle covers read, write, edit, list, and search, plus robust lock and rollback support. However, obvious file operations such as delete and move/rename are missing, and there is no explicit snapshot creation or diff operation. These are notable gaps in an otherwise broad collaboration surface.
Maintenance
Related MCP Connectors
The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.
Shared workspace where Claude, ChatGPT, Codex and Grok share files, tasks, decisions and handoffs.
A real-time, multiplayer filesystem for agents and humans: shared files, live edits, history.
One shared project for a team's coding agents: decisions, a task board and handoffs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables multiple AI agents like Claude and Codex to coordinate on the same project through shared tasks, file locks, and a real-time dashboard, preventing conflicts and streamlining collaborative development.2 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables two developers using Claude Code to collaborate in real time on the same codebase, with file locking, guest write approvals, and secure session joining. It connects host and guest Claude Code sessions to a shared project with tools for file operations, locks, and notifications.MIT
- AlicenseNot gradedqualityBmaintenanceEnables separate Claude Code sessions across a team to see teammates' live presence, warn before editing a file someone else is editing, route shared-contract changes to the developers whose code depends on them, and produce structured handoffs when a session ends.261 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables multiple coding agents to collaborate in a shared workspace with roles, messaging, concurrent file editing, task graphs, and live awareness of each other.MIT