|
| 1 | +--- |
| 2 | +title: MCP Client Integration Guide |
| 3 | +icon: "plug" |
| 4 | +iconType: "solid" |
| 5 | +--- |
| 6 | + |
| 7 | +## Connecting an MCP Client |
| 8 | + |
| 9 | +Once your OpenMemory server is running locally, you can connect any compatible MCP client to your personal memory stream. This enables a seamless memory layer integration for AI tools and agents. |
| 10 | + |
| 11 | +Ensure the following environment variables are correctly set in your configuration files: |
| 12 | + |
| 13 | +**In `/ui/.env`:** |
| 14 | +```env |
| 15 | +NEXT_PUBLIC_API_URL=http://localhost:8765 |
| 16 | +NEXT_PUBLIC_USER_ID=<user-id> |
| 17 | +``` |
| 18 | + |
| 19 | +**In `/api/.env`:** |
| 20 | +```env |
| 21 | +OPENAI_API_KEY=sk-xxx |
| 22 | +USER=<user-id> |
| 23 | +``` |
| 24 | + |
| 25 | +These values define where your MCP server is running and which user’s memory is accessed. |
| 26 | + |
| 27 | +### MCP Client Setup |
| 28 | + |
| 29 | +Use the `install-mcp` utility to connect a client. The general command format is as follows: |
| 30 | + |
| 31 | +```bash |
| 32 | +npx install-mcp http://localhost:8765/mcp/<client-name>/sse/<user-id> --client <client-name> |
| 33 | +``` |
| 34 | + |
| 35 | +Replace `<client-name>` with the desired client name and `<user-id>` with the value specified in your environment variables. |
| 36 | + |
| 37 | +### Example Commands for Supported Clients |
| 38 | + |
| 39 | +| Client | Command | |
| 40 | +|-------------|---------| |
| 41 | +| OpenMemory | `npx install-mcp http://localhost:8765/mcp/openmemory/sse/<user-id> --client openmemory` | |
| 42 | +| Claude | `npx install-mcp http://localhost:8765/mcp/claude/sse/<user-id> --client claude` | |
| 43 | +| Cursor | `npx install-mcp http://localhost:8765/mcp/cursor/sse/<user-id> --client cursor` | |
| 44 | +| Cline | `npx install-mcp http://localhost:8765/mcp/cline/sse/<user-id> --client cline` | |
| 45 | +| RooCline | `npx install-mcp http://localhost:8765/mcp/roocline/sse/<user-id> --client roocline` | |
| 46 | +| Windsurf | `npx install-mcp http://localhost:8765/mcp/windsurf/sse/<user-id> --client windsurf` | |
| 47 | +| Witsy | `npx install-mcp http://localhost:8765/mcp/witsy/sse/<user-id> --client witsy` | |
| 48 | +| Enconvo | `npx install-mcp http://localhost:8765/mcp/enconvo/sse/<user-id> --client enconvo` | |
| 49 | + |
| 50 | +### What This Does |
| 51 | + |
| 52 | +Running one of the above commands registers the specified MCP client and connects it to your OpenMemory server. This enables the client to stream and store contextual memory for the provided user ID. |
| 53 | + |
| 54 | +The connection status and memory activity can be monitored via the OpenMemory UI at [http://localhost:3000](http://localhost:3000). |
0 commit comments