{"_id":"@cochatai/mcp-cochat","_rev":"6-9fc12599873d31070293fb65fed09139","name":"@cochatai/mcp-cochat","dist-tags":{"latest":"0.5.2"},"versions":{"0.2.0":{"name":"@cochatai/mcp-cochat","version":"0.2.0","keywords":["mcp","cochat","plans","collaboration","opencode","cursor","claude-code","codex"],"author":{"name":"CoChatAI"},"license":"MIT","_id":"@cochatai/mcp-cochat@0.2.0","maintainers":[{"name":"cochat","email":"marcel@cochat.ai"}],"homepage":"https://github.com/CoChatAI/mcp-cochat#readme","bugs":{"url":"https://github.com/CoChatAI/mcp-cochat/issues"},"bin":{"mcp-cochat":"dist/index.js"},"dist":{"shasum":"d0f5585def2361e2cf7526a2ed50894aa1362c4e","tarball":"https://registry.npmjs.org/@cochatai/mcp-cochat/-/mcp-cochat-0.2.0.tgz","fileCount":123,"integrity":"sha512-VCjP/ko5lPEEtbZ0kJLQbrx2eVdHaOwQNonw+8VMdtQd42jrD8VGQnkqDuGodUFcTENiJiA1qYpyciL7mgEXVg==","signatures":[{"sig":"MEUCIQC2pEmDCi161kBndN3hLy7q9nf0XDC9szm+W9xijhP2mgIgOWg9ie35ZVuAVRgDFKwGBTNSm+4Aj8VdF2crTI8dlr4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":293737},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"2f429c15c2e02597bcb2d56627245dd876ea57c2","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","start":"node dist/index.js","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"cochat","email":"marcel@cochat.ai"},"repository":{"url":"git+https://github.com/CoChatAI/mcp-cochat.git","type":"git"},"_npmVersion":"10.8.2","description":"CoChat MCP server to connect plans and content to CoChat conversations","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.7.3","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-cochat_0.2.0_1770921295249_0.6360361944667383","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@cochatai/mcp-cochat","version":"0.3.0","keywords":["mcp","cochat","plans","collaboration","opencode","cursor","claude-code","codex"],"author":{"name":"CoChatAI"},"license":"MIT","_id":"@cochatai/mcp-cochat@0.3.0","maintainers":[{"name":"cochat","email":"marcel@cochat.ai"}],"homepage":"https://github.com/CoChatAI/mcp-cochat#readme","bugs":{"url":"https://github.com/CoChatAI/mcp-cochat/issues"},"bin":{"mcp-cochat":"dist/index.js"},"dist":{"shasum":"e45982aaa738161942d855b4079d4db934289037","tarball":"https://registry.npmjs.org/@cochatai/mcp-cochat/-/mcp-cochat-0.3.0.tgz","fileCount":123,"integrity":"sha512-tqYio0n6zSHTLeaVD49B8emfhQI1M+TB4vk8v/tO6Fto2M7wfrvTJfy9ckV7bK+XYuOeSInzUKnByBKKlpN5ew==","signatures":[{"sig":"MEUCIQCJkwVYNcqk0QT/76CnXmk9V9jkvQX1+0UkXZeRIMhYwwIgY/F+CR57zbwVFe2scdcBE0a/WYZ7M8/UnAsg4hHL8Dw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":293681},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"3ac667df6a3aba0bd56e233cdc7de865d37a9db4","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","start":"node dist/index.js","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"cochat","email":"marcel@cochat.ai"},"repository":{"url":"git+https://github.com/CoChatAI/mcp-cochat.git","type":"git"},"_npmVersion":"10.8.2","description":"CoChat MCP server to connect plans and content to CoChat conversations","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.7.3","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-cochat_0.3.0_1770922495257_0.48807645180327364","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@cochatai/mcp-cochat","version":"0.4.0","keywords":["mcp","cochat","plans","collaboration","opencode","cursor","claude-code","codex"],"author":{"name":"CoChatAI"},"license":"MIT","_id":"@cochatai/mcp-cochat@0.4.0","maintainers":[{"name":"cochat","email":"marcel@cochat.ai"}],"homepage":"https://github.com/CoChatAI/mcp-cochat#readme","bugs":{"url":"https://github.com/CoChatAI/mcp-cochat/issues"},"bin":{"mcp-cochat":"dist/index.js"},"dist":{"shasum":"13af74396dd4685ee76382bdfbb4b2f508e4eae8","tarball":"https://registry.npmjs.org/@cochatai/mcp-cochat/-/mcp-cochat-0.4.0.tgz","fileCount":131,"integrity":"sha512-PMWA0rAUk7sf/Y+mPCvuxhE5qoL5LOJPFgW/dcvkGOLd/gls7Yz+Rv5VhSU46AfrNz1p30EZnS4KilrzXMrYaA==","signatures":[{"sig":"MEUCIQDAb26cPlE7LguQCucAStZ9rtwYqqfypgvcJ0l584cJYQIgOnl2eSDhemWGqg+iMpEUKamBXLY+CGAqkBBHmV33Coo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":331107},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"68c33ad925f6f34ea84af74dcf9c0eaa4529ff12","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","start":"node dist/index.js","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"cochat","email":"marcel@cochat.ai"},"repository":{"url":"git+https://github.com/CoChatAI/mcp-cochat.git","type":"git"},"_npmVersion":"10.8.2","description":"CoChat MCP server to connect plans and content to CoChat conversations","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.7.3","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-cochat_0.4.0_1770932856512_0.9758862463313815","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@cochatai/mcp-cochat","version":"0.5.0","keywords":["mcp","cochat","plans","collaboration","opencode","cursor","claude-code","codex"],"author":{"name":"CoChatAI"},"license":"MIT","_id":"@cochatai/mcp-cochat@0.5.0","maintainers":[{"name":"cochat","email":"marcel@cochat.ai"}],"homepage":"https://github.com/CoChatAI/mcp-cochat#readme","bugs":{"url":"https://github.com/CoChatAI/mcp-cochat/issues"},"bin":{"mcp-cochat":"dist/index.js"},"dist":{"shasum":"47fda095ecbdf7d463d83bdc81f0d2543c9ccedd","tarball":"https://registry.npmjs.org/@cochatai/mcp-cochat/-/mcp-cochat-0.5.0.tgz","fileCount":135,"integrity":"sha512-Y+rA8Kx8FI4vHOhgB1ARu7kqp9d1BDjWzg8/H2rjpr8cLVa7k2Jz47DlN0I7aezrv3eIAWWm+Ie4HEvvW+zr6Q==","signatures":[{"sig":"MEUCIQDG8PzF8RhrP5Binmu7iFyoD6mj4GLuBs0FpAUL2N1FAQIgMKqIUtt2YhmZsCUGJRqlPpWNOjEPKhoHMvY3LR4tFpc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":345864},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"57e66ce5d02b48ee6a4161d663f585972b41c99d","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","start":"node dist/index.js","test:watch":"vitest","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"cochat","email":"marcel@cochat.ai"},"repository":{"url":"git+https://github.com/CoChatAI/mcp-cochat.git","type":"git"},"_npmVersion":"10.8.2","description":"CoChat MCP server to connect plans and content to CoChat conversations","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.7.3","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-cochat_0.5.0_1770936490847_0.585437478074647","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@cochatai/mcp-cochat","version":"0.5.1","keywords":["mcp","cochat","plans","collaboration","opencode","cursor","claude-code","codex"],"author":{"name":"CoChatAI"},"license":"MIT","_id":"@cochatai/mcp-cochat@0.5.1","maintainers":[{"name":"cochat","email":"marcel@cochat.ai"}],"homepage":"https://github.com/CoChatAI/mcp-cochat#readme","bugs":{"url":"https://github.com/CoChatAI/mcp-cochat/issues"},"bin":{"mcp-cochat":"dist/index.js"},"dist":{"shasum":"915529607fab71701038ff5f37f8bad47f5f7dbb","tarball":"https://registry.npmjs.org/@cochatai/mcp-cochat/-/mcp-cochat-0.5.1.tgz","fileCount":135,"integrity":"sha512-7myQs6XwSgQ+1Dpeq59I7RnzfKKqgv/lYEKvzlTunYaW24ualkZ2oCt/HFtEEVMaZBsZhkcTREX75bNdLHmk0w==","signatures":[{"sig":"MEUCIB9mgtdMt7GvmrSqutqYFLgj/BMB6vsixFaidFwHi+dvAiEAkpDRTUkDSCwVuTOa0M0Eo7zHRCkC8s8S46QehklimQY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":362415},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"d8bf2115b4bad470a9bc9c23a209ef7e35608ada","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","start":"node dist/index.js","test:watch":"vitest","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"cochat","email":"marcel@cochat.ai"},"repository":{"url":"git+https://github.com/CoChatAI/mcp-cochat.git","type":"git"},"_npmVersion":"10.8.2","description":"CoChat MCP server to connect plans and content to CoChat conversations","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.24.2","@modelcontextprotocol/sdk":"^1.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.7.3","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-cochat_0.5.1_1770938436920_0.8753551330894851","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"name":"@cochatai/mcp-cochat","version":"0.5.2","description":"CoChat MCP server to connect plans and content to CoChat conversations","type":"module","main":"dist/index.js","bin":{"mcp-cochat":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch","start":"node dist/index.js","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run build && npm test"},"keywords":["mcp","cochat","plans","collaboration","opencode","cursor","claude-code","codex"],"author":{"name":"CoChatAI"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/CoChatAI/mcp-cochat.git"},"homepage":"https://github.com/CoChatAI/mcp-cochat#readme","bugs":{"url":"https://github.com/CoChatAI/mcp-cochat/issues"},"publishConfig":{"access":"public"},"dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","zod":"^3.24.2"},"devDependencies":{"@types/node":"^22.13.1","typescript":"^5.7.3","vitest":"^4.0.18"},"engines":{"node":">=18.0.0"},"_id":"@cochatai/mcp-cochat@0.5.2","gitHead":"eeffee4b2f6ed0647bbc76886fba43cc5f19a826","types":"./dist/index.d.ts","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-it8GgFnn7X+/Rat4DyZMuw8H6avaEwJfY9rdJlDI1HSeR7Y4TvIurX5w4DTOjRZxFx2UeO1NhrMx7EJMXzA3Kg==","shasum":"de71c922fe8bb433c98d2c2da1a861a84462140c","tarball":"https://registry.npmjs.org/@cochatai/mcp-cochat/-/mcp-cochat-0.5.2.tgz","fileCount":135,"unpackedSize":362421,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDUa6aeQTAsGWOHhPOPXBs9hWB45mXd+EVH/vwkkrE32AiEAioVhyqrlYcnKQ6EdtfRFOYigArT0LIACTSCz7gUak5o="}]},"_npmUser":{"name":"cochat","email":"marcel@cochat.ai"},"directories":{},"maintainers":[{"name":"cochat","email":"marcel@cochat.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-cochat_0.5.2_1770938865584_0.7791905209320551"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-12T18:34:55.156Z","modified":"2026-02-12T23:27:45.883Z","0.2.0":"2026-02-12T18:34:55.481Z","0.3.0":"2026-02-12T18:54:55.390Z","0.4.0":"2026-02-12T21:47:36.689Z","0.5.0":"2026-02-12T22:48:11.024Z","0.5.1":"2026-02-12T23:20:37.139Z","0.5.2":"2026-02-12T23:27:45.742Z"},"bugs":{"url":"https://github.com/CoChatAI/mcp-cochat/issues"},"author":{"name":"CoChatAI"},"license":"MIT","homepage":"https://github.com/CoChatAI/mcp-cochat#readme","keywords":["mcp","cochat","plans","collaboration","opencode","cursor","claude-code","codex"],"repository":{"type":"git","url":"git+https://github.com/CoChatAI/mcp-cochat.git"},"description":"CoChat MCP server to connect plans and content to CoChat conversations","maintainers":[{"name":"cochat","email":"marcel@cochat.ai"}],"readme":"# CoChat MCP\n**Share plans. Get feedback. Ship faster.**\n\nMCP server that connects your coding agent to [CoChat](https://cochat.ai) so your team and other AI models can review what you're building, without leaving your terminal.\n\n## The Problem\n\nAI coding agents (Claude Code, OpenCode, Cursor, Codex) are powerful -- but they work in silos:\n\n- **Your team can't see what the agent is building.** When Claude Code creates an implementation plan, it lives in your local session. Engineers can't review it, comment on it, or catch issues until you manually copy it somewhere.\n- **Other models can't review it either.** Maybe you want GPT-5.3 to critique your Claude plan, or Gemini to check the architecture. Today that means copy-pasting between chat windows.\n- **Knowledge doesn't persist.** Design decisions, architecture choices, and important context are trapped in individual chat sessions. Next week, nobody remembers why you chose PostgreSQL over MongoDB.\n\n**This MCP server connects the two worlds.**\n\n## How It Works\n\n```\n Your Coding Agent                    CoChat (Team + AI Workspace)\n ──────────────────                   ────────────────────────────\n                                     \n You: \"Build a user dashboard\"       \n       │                              \n       ▼                              \n Claude creates plan ─────────────▶  Plan appears as collaborative\n (auto-shared via MCP)                chat thread in project folder\n                                            │\n                                      ┌─────┼──────────┐\n                                      ▼     ▼          ▼\n                                    Alice  GPT-5.3    Gemini\n                                    reviews reviews   checks\n                                    tasks   arch.     security\n                                      │     │          │\n                                      └─────┼──────────┘\n                                            ▼\n Agent pulls feedback ◀──────────────  \"Use refresh token rotation\"\n and adapts the plan                   \"Add rate limiting to auth\"\n       │                              \n       ▼                              \n Agent saves decisions ──────────────▶ Project memories stored\n as project memories                   (searchable by any model/person)\n       │                              \n       ▼                              \n Next session: any agent  ◀────────── Memories available in all\n recalls past decisions                CoChat conversations too\n```\n\n### The Feedback Loop\n\n1. **You code** -- your agent creates an implementation plan\n2. **Everyone sees it** -- the plan appears in CoChat as a collaborative thread. Engineers, GPT-5.3, Gemini -- anyone with access can review it\n3. **Multi-perspective review** -- humans catch product issues, a different model spots architectural blind spots, another flags security concerns\n4. **You pull it back** -- your agent fetches all feedback and adapts\n5. **Knowledge compounds** -- design decisions get saved as project memories, searchable by any person or model in any future session\n\nThis means your Claude Code session isn't a black box. Your team stays in sync, other models provide second opinions, and decisions persist across sessions -- without standups, Slack threads, or PRs-as-documentation.\n\n### What You Get\n\n- **Plans** -- Implementation plans shared as collaborative chats. Engineers and AI models review and comment. Pull feedback back into your coding session.\n- **Cross-model review** -- Have GPT-5.3 review your Claude plan, or vice versa. CoChat supports multiple AI models, so you get diverse perspectives on the same plan.\n- **Project Memories** -- Semantic memory that persists across sessions and models. \"Why did we pick PostgreSQL?\" is answerable by anyone, in any tool.\n- **Ask** -- Query your project's knowledge base from your terminal. Get answers grounded in your team's actual decisions.\n- **Automations** -- Trigger CoChat automations (scheduled tasks, workflows) without switching context.\n- **Auto-scoping** -- Everything is automatically organized by project (detected from git remote or directory name). No manual setup.\n\n## Quick Start\n\n### 1. Get a CoChat API Key\n\nSign up at [app.cochat.ai](https://app.cochat.ai) (or use your self-hosted instance), then go to **Settings > Account > API Key**.\n\n### 2. Add to Your Coding Agent\n\n<details>\n<summary><strong>Claude Code</strong></summary>\n\n```bash\nclaude mcp add cochat \\\n  -e COCHAT_URL=\"https://app.cochat.ai\" \\\n  -e COCHAT_API_KEY=\"your-api-key\" \\\n  -- npx @cochatai/mcp-cochat\n```\n\nOr via JSON:\n\n```bash\nclaude mcp add-json cochat '{\n  \"type\": \"stdio\",\n  \"command\": \"npx\",\n  \"args\": [\"@cochatai/mcp-cochat\"],\n  \"env\": {\n    \"COCHAT_URL\": \"https://app.cochat.ai\",\n    \"COCHAT_API_KEY\": \"your-api-key\"\n  }\n}'\n```\n\nPrompts become slash commands: `/mcp__cochat__plans-share`, `/mcp__cochat__memories-recall`, `/mcp__cochat__ask`, etc.\n\n</details>\n\n<details>\n<summary><strong>OpenCode</strong></summary>\n\nAdd to your `opencode.json` (project root or `~/.config/opencode/config.json` for global):\n\n```jsonc\n{\n  \"mcp\": {\n    \"cochat\": {\n      \"type\": \"local\",\n      \"command\": [\"npx\", \"@cochatai/mcp-cochat\"],\n      \"environment\": {\n        \"COCHAT_URL\": \"https://app.cochat.ai\",\n        \"COCHAT_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nSlash commands: `/cochat:plans-share:mcp`, `/cochat:plans-pull:mcp`, `/cochat:memories-recall:mcp`, `/cochat:ask:mcp`, etc.\n\n</details>\n\n<details>\n<summary><strong>Cursor</strong></summary>\n\nAdd to `.cursor/mcp.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"cochat\": {\n      \"command\": \"npx\",\n      \"args\": [\"@cochatai/mcp-cochat\"],\n      \"env\": {\n        \"COCHAT_URL\": \"https://app.cochat.ai\",\n        \"COCHAT_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nTools are available in Agent mode. Use `@cochat` to reference the MCP in chat.\n\n</details>\n\n<details>\n<summary><strong>Codex CLI</strong></summary>\n\nAdd to `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.cochat]\ncommand = \"npx\"\nargs = [\"@cochatai/mcp-cochat\"]\n\n[mcp_servers.cochat.env]\nCOCHAT_URL = \"https://app.cochat.ai\"\nCOCHAT_API_KEY = \"your-api-key\"\n```\n\nOr via CLI:\n\n```bash\ncodex mcp add cochat \\\n  -e COCHAT_URL=\"https://app.cochat.ai\" \\\n  -e COCHAT_API_KEY=\"your-api-key\" \\\n  -- npx @cochatai/mcp-cochat\n```\n\n</details>\n\n<details>\n<summary><strong>Kilo Code</strong></summary>\n\nAdd the MCP server via Kilo Code's settings. Use the standard MCP config format:\n\n```json\n{\n  \"cochat\": {\n    \"command\": \"npx\",\n    \"args\": [\"@cochatai/mcp-cochat\"],\n    \"env\": {\n      \"COCHAT_URL\": \"https://app.cochat.ai\",\n      \"COCHAT_API_KEY\": \"your-api-key\"\n    }\n  }\n}\n```\n\n</details>\n\n### 3. Start Using It\n\nPlans are shared automatically when your agent creates them. You can also use slash commands:\n\n```\n> Plan a user authentication system with JWT\n\nClaude creates plan and auto-shares to CoChat...\n\n  Plan \"JWT Authentication System\" shared successfully.\n  Chat URL: https://app.cochat.ai/c/abc123\n  Project: your-org/your-repo\n  Collaboration is enabled with write access via link.\n```\n\nNow in CoChat, your team and other AI models can review it:\n- Alice (engineer) comments: \"Use refresh token rotation for better security\"\n- GPT-5.3 (via CoChat) reviews and flags: \"Consider rate limiting the token endpoint\"\n- Bob marks \"Create login endpoint\" as completed\n\nBack in your terminal:\n\n```\n> Pull feedback on the plan\n\nAgent fetches from CoChat...\n\n  Alice suggested using refresh token rotation.\n  GPT-5.3 flagged: add rate limiting to the token endpoint.\n  Bob marked \"Create login endpoint\" as completed.\n  3 new feedback messages since you shared.\n\n> Save the decision about refresh token rotation as a memory\n\n  Memory added. Available in all CoChat conversations for this project.\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `COCHAT_URL` | Yes | URL of your CoChat instance (e.g., `https://app.cochat.ai`) |\n| `COCHAT_API_KEY` | Yes | Your CoChat API key. Generate one in CoChat: Settings > Account > API Key |\n| `COCHAT_AUTO_SHARE` | No | Controls automatic sharing behavior (see below) |\n| `COCHAT_LOG_LEVEL` | No | Log verbosity: `debug`, `info` (default), `warn`, `error` |\n\n### Auto-Share Behavior (`COCHAT_AUTO_SHARE`)\n\nControls how proactively the agent shares plans and saves memories:\n\n| Value | Plans | Memories | Description |\n|-------|-------|----------|-------------|\n| `off` (default) | Agent suggests sharing, waits for you | On request only | You stay in control. Agent says \"Want me to share this plan?\" after creating one. |\n| `plan` | Shared automatically | On request only | Plans are pushed to CoChat as soon as they're created. Good for teams that always want visibility. |\n| `all` | Shared automatically | Saved automatically | Full automation. Plans are shared and design decisions are saved as project memories without asking. |\n\nExample -- add to your MCP config to enable automatic plan sharing:\n\n```json\n\"env\": {\n  \"COCHAT_URL\": \"https://app.cochat.ai\",\n  \"COCHAT_API_KEY\": \"your-api-key\",\n  \"COCHAT_AUTO_SHARE\": \"plan\"\n}\n```\n\n### Elicitation (Interactive Setup)\n\nIf environment variables are not set and your MCP client supports [elicitation](https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation), the server will prompt you for your CoChat URL and API key on first use. The config is persisted to `~/.config/mcp-cochat/config.json`.\n\n### Local State\n\nThe server stores project mappings and tracked plans in `~/.config/mcp-cochat/store.json`. This maps your local project directories to CoChat folders so plans and memories are scoped correctly.\n\n### Project Detection\n\nThe server identifies your project automatically:\n\n1. **Git remote** -- parses `git remote get-url origin` (e.g., `anomalyco/my-project`)\n2. **MCP roots** -- uses the client-reported project directory if available\n3. **Directory name** -- falls back to `parent/folder` (e.g., `playground/tictactoe`)\n\nNo manual project setup needed. The CoChat folder is created lazily on first use.\n\n## Tools\n\n### Plans\n\n| Tool | Description |\n|------|-------------|\n| `plans_share` | Share an implementation plan as a collaborative chat in CoChat. Auto-called when the agent creates a plan. |\n| `plans_pull` | Fetch the latest plan state and engineer feedback from CoChat. |\n| `plans_update` | Push an updated plan to an existing CoChat chat thread. |\n| `plans_list` | List all shared plans grouped by project, with feedback counts. |\n\n### Projects\n\n| Tool | Description |\n|------|-------------|\n| `projects_add` | Add a CoChat project for the current codebase. Auto-detects name from git remote. |\n| `projects_get` | Get the current project's metadata, system prompt, and file count. |\n| `projects_set_context` | Set the project system prompt, injected into all CoChat chats for this project. |\n\n### Memories\n\n| Tool | Description |\n|------|-------------|\n| `memories_query` | Semantic search project memories, ranked by relevance. |\n| `memories_add` | Store a design decision or important context as a project memory. |\n| `memories_list` | List all recent memories for the current project. |\n| `memories_delete` | Delete a specific memory by ID. |\n\n### Automations\n\n| Tool | Description |\n|------|-------------|\n| `automations_list` | List automations for the current project. |\n| `automations_trigger` | Manually trigger an automation by ID. |\n| `automations_runs` | Get recent run history for an automation. |\n\n### Ask\n\n| Tool | Description |\n|------|-------------|\n| `cochat_ask` | Ask CoChat a question. Gets an AI answer using the project's knowledge base and memories. |\n\n## Prompts (Slash Commands)\n\n| Prompt | Description |\n|--------|-------------|\n| `plans-share` | Share the current plan with the team. Instructs the AI to include the full design context. |\n| `plans-pull` | Pull and summarize feedback from the most recent shared plan. |\n| `memories-recall` | Search project memories for context relevant to the current task. |\n| `memories-save` | Save important decisions from the conversation as project memories. |\n| `automations-run` | List and run a project automation. |\n| `ask` | Ask CoChat a question about the project. |\n\nHow these appear depends on your client:\n\n| Client | Format | Example |\n|--------|--------|---------|\n| OpenCode | `/server:prompt:mcp` | `/cochat:plans-share:mcp` |\n| Claude Code | `/mcp__server__prompt` | `/mcp__cochat__plans-share` |\n| Cursor | Varies | Available in agent mode |\n| Codex CLI | Tool-based | Accessible via tools |\n| Kilo Code | Varies | Accessible via MCP |\n\n## Resources\n\n| URI Pattern | Description |\n|-------------|-------------|\n| `cochat://plan/{chat_id}` | Current state of a shared plan. Clients with MCP resource subscriptions get change notifications (polled every 10s). |\n\n## Development\n\n### Building from Source\n\n```bash\ngit clone https://github.com/CoChatAI/mcp-cochat.git\ncd mcp-cochat\nnpm install\nnpm run build\nnpm test\n```\n\n### Running Tests\n\n```bash\nnpm test           # Run once\nnpm run test:watch # Watch mode\n```\n\n### Using a Local Build\n\nPoint your MCP client to the local build instead of npx:\n\n**OpenCode:**\n```jsonc\n{\n  \"mcp\": {\n    \"cochat\": {\n      \"type\": \"local\",\n      \"command\": [\"node\", \"/path/to/mcp-cochat/dist/index.js\"],\n      \"environment\": {\n        \"COCHAT_URL\": \"https://app.cochat.ai\",\n        \"COCHAT_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\n**Claude Code:**\n```bash\nclaude mcp add cochat \\\n  -e COCHAT_URL=\"https://app.cochat.ai\" \\\n  -e COCHAT_API_KEY=\"your-api-key\" \\\n  -- node /path/to/mcp-cochat/dist/index.js\n```\n\n### Debugging\n\nThe server logs to stderr (MCP uses stdout for JSON-RPC). Set `COCHAT_LOG_LEVEL=debug` for verbose output including all API requests.\n\nIn Claude Code, stderr logs appear in `~/.claude/logs/`. In OpenCode, they appear in the terminal.\n\n### Project Structure\n\n```\nsrc/\n├── index.ts                    # Entry point (stdio transport)\n├── server.ts                   # MCP server (tool/prompt/resource registration)\n├── cochat-client.ts            # HTTP client for CoChat REST API\n├── config.ts                   # Configuration and local state management\n├── project.ts                  # Git remote detection, project name resolution\n├── logger.ts                   # Stderr logger (debug/info/warn/error)\n├── plan-format.ts              # Plan <-> markdown serialization\n├── schemas.ts                  # Shared Zod schemas\n├── zod-to-json-schema.ts       # Lightweight Zod to JSON Schema converter\n├── tools/\n│   ├── plans-share.ts          # Share plan as collaborative chat\n│   ├── plans-pull.ts           # Fetch plan state + feedback\n│   ├── plans-update.ts         # Push updated plan\n│   ├── plans-list.ts           # List tracked plans by project\n│   ├── projects-add.ts         # Find/create project folder\n│   ├── projects-get.ts         # Get project metadata\n│   ├── projects-set-context.ts # Set project system prompt\n│   ├── memories-query.ts       # Semantic search memories\n│   ├── memories-add.ts         # Add project memory\n│   ├── memories-list.ts        # List project memories\n│   ├── memories-delete.ts      # Delete memory\n│   ├── automations-list.ts     # List project automations\n│   ├── automations-trigger.ts  # Trigger automation\n│   ├── automations-runs.ts     # Get automation run history\n│   └── cochat-ask.ts           # Ask CoChat a question\n└── resources/\n    └── plan-resource.ts        # Subscribable plan resources\n```\n\n## Compatibility\n\n| Feature | OpenCode | Claude Code | Codex CLI | Cursor | Kilo Code |\n|---------|----------|-------------|-----------|--------|-----------|\n| Tools (16) | Yes | Yes | Yes | Yes | Yes |\n| Prompts (6) | Yes | Yes | Varies | Varies | Varies |\n| Resources | Yes | Yes | Varies | Varies | Varies |\n| Resource Subscriptions | Yes | Likely | Unlikely | Unlikely | Unlikely |\n| Elicitation | Varies | Varies | Unlikely | Unlikely | Unlikely |\n\nAll 16 tools work across every MCP-compatible client. Prompts and resources depend on the client's MCP spec support.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}