Most MCP servers assume one person and one AI: you connect a server to your Claude and it gives your Claude some tools. I wanted the opposite. A few people, each with their own subscription (one on Claude, one on ChatGPT, one on Claude Code), all working on the same project through the same server, and each AI aware of what the others are doing.
That became Coop. This post is about the design decisions behind it, because several of them weren't obvious and I haven't seen them written down elsewhere.
When two people build something together with AI today, each AI works on its own copy of the context. Nobody knows what the other person's AI changed an hour ago. Two AIs happily rewrite the same file in the same afternoon. Sharing one account would "fix" it, but that breaks both Anthropic's and OpenAI's terms and mixes everyone's chats. Moving everyone to API keys means paying twice for something you already pay for.
So the constraint was: everyone keeps their own subscription, and the server never calls an LLM. The server is just the shared room.
The first question with a shared remote server is who is calling. OAuth is the "proper" answer, but it's heavy for the flow I wanted: the project owner sends a teammate a prompt, the teammate pastes it into their AI, done.
Instead, each seat in a project gets a code like coop-k3f9.... The code is both the key and the identity. The connector URL is the same for everyone and has no auth; every tool takes the code as its first argument.
Project "Studio" on Coop.
Join with the code coop-k3f9…
The first tool call is always join(code). It returns everything the AI needs in one response: the project, the team, open tasks, notes, files and, most importantly, what the others changed since this seat last joined.
The trade-off is obvious: if someone pastes their prompt somewhere public, anyone could use it. To soften that, the server notices when the same code is used from two places at once, emails the owner, and lets them rotate it in one click.
A detail that bit me early: one person often has two or three AI chats open on the same project (a Claude chat on the phone, Claude Code on the laptop). If the code identifies the person, those chats look like one.
So join returns an extended code with a chat suffix, coop-k3f9…~a1b2, and asks the AI to use that one from then on. The person is the same; each chat becomes its own "session" in the team's live view, with its own current task and files.
The hardest part of a multi-user MCP server is that MCP is pull-based. The server can't interrupt an AI to say "careful, Lucía's AI just edited billing.py". It can only answer when it's called.
The trick that works: append notices to the result of whatever tool the AI calls next.
const result = await tool(ctx, args);
const notices = pendingNoticesFor(ctx.session); // conflicts, channel messages
if (notices) result.content[0].text += '\n\n' + notices;
return result;
When an AI writes a file, the server records which session touched which path. If another session touches the same path, both get a warning: the one writing now gets it immediately in its own result, and the other gets it queued for its next call, whatever that is. The warning tells the AI to re-read the file before editing again and to coordinate through the team channel.
The same mechanism delivers messages from the team channel: a person types in the web office, and each AI sees it in its next tool result.
People on the team don't read tool logs. They want "Sara's Claude added the map page" in plain language. So there are two small tools the AI is told to call: start_turn at the start of each user message (one sentence of intent) and finish_turn at the end (what was asked, what was done).
Instructions alone weren't enough to make AIs call finish_turn reliably, so after a handful of write actions without a summary, the server adds a gentle reminder to the next result: when you finish replying to this message, call finish_turn. A nudge at the right moment works better than a rule stated once at the start.
Each project gets an isolated box on the server with Linux, Node, Python and git. The AI reads, writes and runs commands there through tools, and every version is a git commit signed with the person's name. Git itself runs inside the box, not on the host, because the repository config is user-controlled and git config can execute things.
For people who prefer working locally, there's a Claude Code plugin that reports sessions (repository, branch, files touched) to the same office, so local and remote work show up side by side.
A smaller lesson from this week. The server started with Spanish tool names, because I'm Spanish and built it for my own team first. When it went into MCP directories, everyone saw entrar and guardar_version, which isn't great for an English-speaking audience.
Clients like Claude and ChatGPT cache the tool list, so renaming tools breaks every connected AI until it refreshes. The fix was a small shim before the MCP transport: if a tools/call arrives with an old name, rewrite the name and the argument keys to the new ones, then let the SDK handle it normally.
const NEW_NAME = { entrar: 'join', editar: 'edit_file', guardar_version: 'save_version' /* … */ };
const NEW_ARG = { codigo: 'code', ruta: 'path', cambios: 'changes' /* … */ };
function upgradeOldCall(msg) {
if (msg?.method !== 'tools/call' || !NEW_NAME[msg.params?.name]) return msg;
const args = Object.fromEntries(
Object.entries(msg.params.arguments || {}).map(([k, v]) => [NEW_ARG[k] || k, v])
);
return { ...msg, params: { ...msg.params, name: NEW_NAME[msg.params.name], arguments: args } };
}
Internally everything kept its old names (activity logs, stats), so only the public face changed. Old clients keep working, new ones see English.
If you want to try it, the connector URL is https://coopwork.ai/mcp, it's listed in the official MCP registry as ai.coopwork/coop, and the first project is free. I'm happy to answer questions about any of the design choices above in the comments.
原文来源:dev.to