@aiglue/mcp-server
v1.1.0
Published
MCP server for AI Glue — real-time context sync across Claude Desktop, Manus, Perplexity, Cursor, and VS Code
Downloads
37
Maintainers
Readme
AI Glue MCP Server
MCP server for AI Glue — real-time context sync across Claude Desktop, Cursor, VS Code, Windsurf, and any MCP-compatible AI tool.
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.
Quick Start
1. Get your API key
Go to AI Glue Settings → API Keys and generate a key.
2. Configure your AI tool
Add to your MCP configuration file:
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"aiglue": {
"command": "npx",
"args": ["-y", "@aiglue/mcp-server"],
"env": {
"AIGLUE_API_KEY": "your-api-key-here",
"AIGLUE_API_URL": "https://staging-api.aiglue.ai",
"AIGLUE_PLATFORM": "claude"
}
}
}
}Cursor (.cursor/mcp.json):
{
"mcpServers": {
"aiglue": {
"command": "npx",
"args": ["-y", "@aiglue/mcp-server"],
"env": {
"AIGLUE_API_KEY": "your-api-key-here",
"AIGLUE_API_URL": "https://staging-api.aiglue.ai",
"AIGLUE_PLATFORM": "claude"
}
}
}
}VS Code (.vscode/mcp.json):
{
"servers": {
"aiglue": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@aiglue/mcp-server"],
"env": {
"AIGLUE_API_KEY": "your-api-key-here",
"AIGLUE_API_URL": "https://staging-api.aiglue.ai",
"AIGLUE_PLATFORM": "claude"
}
}
}
}3. That's it
Your AI tool now has access to all your context entries. Changes sync in real-time.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
| AIGLUE_API_KEY | Yes | — | API key from AI Glue settings |
| AIGLUE_API_URL | No | https://staging-api.aiglue.ai | Backend API URL |
| AIGLUE_WS_URL | No | Derived from API URL | WebSocket URL (auto-derived) |
| AIGLUE_PLATFORM | No | claude | Default platform filter |
Tools (7)
| Tool | Description |
|---|---|
| get_context | Generate formatted context instructions for a platform |
| list_entries | List entries with optional category/platform/search filters |
| get_entry | Get full details of a specific entry by ID |
| create_entry | Create a new context entry (synced in real-time) |
| update_entry | Update an existing entry (synced in real-time) |
| delete_entry | Delete an entry (synced in real-time) |
| sync_status | Check API health, WebSocket state, and cache status |
Resources (8)
| Resource URI | Description |
|---|---|
| aiglue://entries | All context entries formatted for the current platform |
| aiglue://entries/style | Style category entries |
| aiglue://entries/personal | Personal category entries |
| aiglue://entries/work | Work category entries |
| aiglue://entries/projects | Projects category entries |
| aiglue://entries/tools | Tools category entries |
| aiglue://entries/corrections | Corrections category entries |
| aiglue://status | Connection and sync status |
Resources automatically update when entries change via WebSocket.
Real-Time Sync Architecture
┌─────────────────┐ WebSocket ┌──────────────────┐
│ AI Glue Web UI │ ──── push ────────▶│ │
│ Chrome Extension│ │ AI Glue API │
│ Other clients │ ◀── push ─────────│ (FastAPI) │
└─────────────────┘ │ │
└────────┬─────────┘
│ WebSocket
│ push
┌────────▼─────────┐
│ MCP Server │
│ (this package) │
│ │
│ ┌─────────────┐ │
│ │ WsSync │ │
│ │ (WebSocket │ │
│ │ client) │ │
│ └──────┬──────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ MCP Server │ │
│ │ (tools + │ │
│ │ resources) │ │
│ └─────────────┘ │
└──────────────────┘
│
│ stdio
▼
┌──────────────────┐
│ Claude Desktop │
│ Cursor / VS Code │
│ Windsurf / etc. │
└──────────────────┘How it works:
- MCP server connects to the API via WebSocket on startup
- Authenticates using your API key
- Subscribes to the
entrieschannel - When any client creates/updates/deletes an entry, the API pushes a notification
- MCP server invalidates its cache and notifies the MCP client that resources changed
- The AI tool re-reads the updated resources automatically
Fallback: If WebSocket disconnects, the server falls back to cache-based reads with a 30-second TTL. It automatically reconnects with exponential backoff.
Development
# Install dependencies
pnpm install
# Run in development mode
AIGLUE_API_KEY=your-key pnpm dev
# Run tests
pnpm test
# Build
pnpm buildLicense
MIT
