{"_id":"@aiglue/mcp-server","name":"@aiglue/mcp-server","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@aiglue/mcp-server","version":"1.1.0","description":"MCP server for AI Glue — real-time context sync across Claude Desktop, Manus, Perplexity, Cursor, and VS Code","type":"module","main":"dist/index.js","bin":{"aiglue-mcp":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsx src/index.ts","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run build"},"keywords":["mcp","ai-glue","context-management","claude","manus","perplexity","cursor","vscode","real-time-sync","hipaa"],"author":{"name":"Ad Vital","email":"hello@aiglue.ai"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Ad-Vital/aiglue-mcp-server.git"},"homepage":"https://aiglue.ai","dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","ws":"^8.18.0","zod":"^3.24.4"},"devDependencies":{"@types/node":"^22.15.3","@types/ws":"^8.18.1","tsx":"^4.19.4","typescript":"^5.8.3","vitest":"^3.1.2"},"engines":{"node":">=18.0.0"},"_id":"@aiglue/mcp-server@1.1.0","gitHead":"485a0ab56d9bf048af12e4a93ebba2d6e62164ab","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/Ad-Vital/aiglue-mcp-server/issues"},"_nodeVersion":"22.13.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-j8kGeqFfY12wGjiP5H5DFy6v0jTmHvEnV1GEuPfumcdtcE+wBZQdmVjP7it7Ef7UaR67hJT8gadPmdVf+/ELkQ==","shasum":"ed4a40e931239ba1ae3a6cd05709d2c5e9c907c1","tarball":"https://registry.npmjs.org/@aiglue/mcp-server/-/mcp-server-1.1.0.tgz","fileCount":14,"unpackedSize":58613,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAqUoinSt24KpfnuBea5leyD0Rpvz54LbhRvXx++n9hiAiEAhDnU6kPq1ExtaKnElsrSW4H+8cSqIJaLxrtDPHV4vRM="}]},"_npmUser":{"name":"ztell","email":"shitel@advital.app"},"directories":{},"maintainers":[{"name":"ztell","email":"shitel@advital.app"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_1.1.0_1774617715436_0.989497854469181"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T13:21:55.353Z","1.1.0":"2026-03-27T13:21:55.568Z","modified":"2026-03-27T13:21:55.850Z"},"maintainers":[{"name":"ztell","email":"shitel@advital.app"}],"description":"MCP server for AI Glue — real-time context sync across Claude Desktop, Manus, Perplexity, Cursor, and VS Code","homepage":"https://aiglue.ai","keywords":["mcp","ai-glue","context-management","claude","manus","perplexity","cursor","vscode","real-time-sync","hipaa"],"repository":{"type":"git","url":"git+https://github.com/Ad-Vital/aiglue-mcp-server.git"},"author":{"name":"Ad Vital","email":"hello@aiglue.ai"},"bugs":{"url":"https://github.com/Ad-Vital/aiglue-mcp-server/issues"},"license":"MIT","readme":"# AI Glue MCP Server\n\nMCP server for [AI Glue](https://aiglue.ai) — real-time context sync across Claude Desktop, Cursor, VS Code, Windsurf, and any MCP-compatible AI tool.\n\n**v1.1.0** adds WebSocket-powered real-time sync: when you update a context entry in the web app or any connected client, all MCP-connected AI tools see the change instantly — no restart, no polling.\n\n## Quick Start\n\n### 1. Get your API key\n\nGo to [AI Glue Settings → API Keys](https://staging.aiglue.ai/settings) and generate a key.\n\n### 2. Configure your AI tool\n\nAdd to your MCP configuration file:\n\n**Claude Desktop** (`claude_desktop_config.json`):\n```json\n{\n  \"mcpServers\": {\n    \"aiglue\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aiglue/mcp-server\"],\n      \"env\": {\n        \"AIGLUE_API_KEY\": \"your-api-key-here\",\n        \"AIGLUE_API_URL\": \"https://staging-api.aiglue.ai\",\n        \"AIGLUE_PLATFORM\": \"claude\"\n      }\n    }\n  }\n}\n```\n\n**Cursor** (`.cursor/mcp.json`):\n```json\n{\n  \"mcpServers\": {\n    \"aiglue\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aiglue/mcp-server\"],\n      \"env\": {\n        \"AIGLUE_API_KEY\": \"your-api-key-here\",\n        \"AIGLUE_API_URL\": \"https://staging-api.aiglue.ai\",\n        \"AIGLUE_PLATFORM\": \"claude\"\n      }\n    }\n  }\n}\n```\n\n**VS Code** (`.vscode/mcp.json`):\n```json\n{\n  \"servers\": {\n    \"aiglue\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aiglue/mcp-server\"],\n      \"env\": {\n        \"AIGLUE_API_KEY\": \"your-api-key-here\",\n        \"AIGLUE_API_URL\": \"https://staging-api.aiglue.ai\",\n        \"AIGLUE_PLATFORM\": \"claude\"\n      }\n    }\n  }\n}\n```\n\n### 3. That's it\n\nYour AI tool now has access to all your context entries. Changes sync in real-time.\n\n## Environment Variables\n\n| Variable | Required | Default | Description |\n|---|---|---|---|\n| `AIGLUE_API_KEY` | Yes | — | API key from AI Glue settings |\n| `AIGLUE_API_URL` | No | `https://staging-api.aiglue.ai` | Backend API URL |\n| `AIGLUE_WS_URL` | No | Derived from API URL | WebSocket URL (auto-derived) |\n| `AIGLUE_PLATFORM` | No | `claude` | Default platform filter |\n\n## Tools (7)\n\n| Tool | Description |\n|---|---|\n| `get_context` | Generate formatted context instructions for a platform |\n| `list_entries` | List entries with optional category/platform/search filters |\n| `get_entry` | Get full details of a specific entry by ID |\n| `create_entry` | Create a new context entry (synced in real-time) |\n| `update_entry` | Update an existing entry (synced in real-time) |\n| `delete_entry` | Delete an entry (synced in real-time) |\n| `sync_status` | Check API health, WebSocket state, and cache status |\n\n## Resources (8)\n\n| Resource URI | Description |\n|---|---|\n| `aiglue://entries` | All context entries formatted for the current platform |\n| `aiglue://entries/style` | Style category entries |\n| `aiglue://entries/personal` | Personal category entries |\n| `aiglue://entries/work` | Work category entries |\n| `aiglue://entries/projects` | Projects category entries |\n| `aiglue://entries/tools` | Tools category entries |\n| `aiglue://entries/corrections` | Corrections category entries |\n| `aiglue://status` | Connection and sync status |\n\nResources automatically update when entries change via WebSocket.\n\n## Real-Time Sync Architecture\n\n```\n┌─────────────────┐     WebSocket      ┌──────────────────┐\n│  AI Glue Web UI  │ ──── push ────────▶│                  │\n│  Chrome Extension│                    │  AI Glue API     │\n│  Other clients   │ ◀── push ─────────│  (FastAPI)       │\n└─────────────────┘                    │                  │\n                                       └────────┬─────────┘\n                                                │ WebSocket\n                                                │ push\n                                       ┌────────▼─────────┐\n                                       │  MCP Server       │\n                                       │  (this package)   │\n                                       │                  │\n                                       │  ┌─────────────┐ │\n                                       │  │ WsSync      │ │\n                                       │  │ (WebSocket  │ │\n                                       │  │  client)    │ │\n                                       │  └──────┬──────┘ │\n                                       │         │        │\n                                       │  ┌──────▼──────┐ │\n                                       │  │ MCP Server  │ │\n                                       │  │ (tools +    │ │\n                                       │  │  resources) │ │\n                                       │  └─────────────┘ │\n                                       └──────────────────┘\n                                                │\n                                                │ stdio\n                                                ▼\n                                       ┌──────────────────┐\n                                       │  Claude Desktop   │\n                                       │  Cursor / VS Code │\n                                       │  Windsurf / etc.  │\n                                       └──────────────────┘\n```\n\n**How it works:**\n\n1. MCP server connects to the API via WebSocket on startup\n2. Authenticates using your API key\n3. Subscribes to the `entries` channel\n4. When any client creates/updates/deletes an entry, the API pushes a notification\n5. MCP server invalidates its cache and notifies the MCP client that resources changed\n6. The AI tool re-reads the updated resources automatically\n\n**Fallback:** If WebSocket disconnects, the server falls back to cache-based reads with a 30-second TTL. It automatically reconnects with exponential backoff.\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Run in development mode\nAIGLUE_API_KEY=your-key pnpm dev\n\n# Run tests\npnpm test\n\n# Build\npnpm build\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-05b89873c146b478e7bcaa3687ddf4c2"}