From dd6f6f7a2ecbd7455f3f6022bf24d41b498d9d9b Mon Sep 17 00:00:00 2001 From: Akshat Jain <125379408+akshat1423@users.noreply.github.com> Date: Fri, 20 Jun 2025 22:09:10 +0530 Subject: [PATCH] Fix: Add MCP Client Integration Guide and update installation commands (#2956) --- docs/docs.json | 3 +- docs/openmemory/integrations.mdx | 54 +++++++++++++++++++ openmemory/.gitignore | 3 +- openmemory/README.md | 10 ++++ .../ui/components/dashboard/Install.tsx | 4 +- 5 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 docs/openmemory/integrations.mdx diff --git a/docs/docs.json b/docs/docs.json index 47dd1add..edfad920 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -193,7 +193,8 @@ "icon": "square-terminal", "pages": [ "openmemory/overview", - "openmemory/quickstart" + "openmemory/quickstart", + "openmemory/integrations" ] }, { diff --git a/docs/openmemory/integrations.mdx b/docs/openmemory/integrations.mdx new file mode 100644 index 00000000..0c3a3d3d --- /dev/null +++ b/docs/openmemory/integrations.mdx @@ -0,0 +1,54 @@ +--- +title: MCP Client Integration Guide +icon: "plug" +iconType: "solid" +--- + +## Connecting an MCP Client + +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. + +Ensure the following environment variables are correctly set in your configuration files: + +**In `/ui/.env`:** +```env +NEXT_PUBLIC_API_URL=http://localhost:8765 +NEXT_PUBLIC_USER_ID= +``` + +**In `/api/.env`:** +```env +OPENAI_API_KEY=sk-xxx +USER= +``` + +These values define where your MCP server is running and which user’s memory is accessed. + +### MCP Client Setup + +Use the `install-mcp` utility to connect a client. The general command format is as follows: + +```bash +npx install-mcp http://localhost:8765/mcp//sse/ --client +``` + +Replace `` with the desired client name and `` with the value specified in your environment variables. + +### Example Commands for Supported Clients + +| Client | Command | +|-------------|---------| +| OpenMemory | `npx install-mcp http://localhost:8765/mcp/openmemory/sse/ --client openmemory` | +| Claude | `npx install-mcp http://localhost:8765/mcp/claude/sse/ --client claude` | +| Cursor | `npx install-mcp http://localhost:8765/mcp/cursor/sse/ --client cursor` | +| Cline | `npx install-mcp http://localhost:8765/mcp/cline/sse/ --client cline` | +| RooCline | `npx install-mcp http://localhost:8765/mcp/roocline/sse/ --client roocline` | +| Windsurf | `npx install-mcp http://localhost:8765/mcp/windsurf/sse/ --client windsurf` | +| Witsy | `npx install-mcp http://localhost:8765/mcp/witsy/sse/ --client witsy` | +| Enconvo | `npx install-mcp http://localhost:8765/mcp/enconvo/sse/ --client enconvo` | + +### What This Does + +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. + +The connection status and memory activity can be monitored via the OpenMemory UI at [http://localhost:3000](http://localhost:3000). \ No newline at end of file diff --git a/openmemory/.gitignore b/openmemory/.gitignore index 4337750e..a8a36107 100644 --- a/openmemory/.gitignore +++ b/openmemory/.gitignore @@ -10,4 +10,5 @@ node_modules/ *.log api/.openmemory* **/.next -.openmemory/ \ No newline at end of file +.openmemory/ +ui/package-lock.json \ No newline at end of file diff --git a/openmemory/README.md b/openmemory/README.md index 5cb8cb0f..6296f2a6 100644 --- a/openmemory/README.md +++ b/openmemory/README.md @@ -96,6 +96,16 @@ pnpm install pnpm dev ``` +### MCP Client Setup + +Use the `install-mcp` utility to connect a client. The general command format is as follows: + +```bash +npx install-mcp http://localhost:8765/mcp//sse/ --client +``` + +Replace `` with the desired client name and `` with the value specified in your environment variables. + ## Project Structure diff --git a/openmemory/ui/components/dashboard/Install.tsx b/openmemory/ui/components/dashboard/Install.tsx index 49a480c0..3161021b 100644 --- a/openmemory/ui/components/dashboard/Install.tsx +++ b/openmemory/ui/components/dashboard/Install.tsx @@ -51,7 +51,7 @@ export const Install = () => { const handleCopy = async (tab: string, isMcp: boolean = false) => { const text = isMcp ? `${URL}/mcp/openmemory/sse/${user}` - : `npx install-mcp i ${URL}/mcp/${tab}/sse/${user} --client ${tab}`; + : `npx install-mcp ${URL}/mcp/${tab}/sse/${user} --client ${tab}`; try { // Try using the Clipboard API first @@ -167,7 +167,7 @@ export const Install = () => {
                     
-                      {`npx install-mcp i ${URL}/mcp/${key}/sse/${user} --client ${key}`}
+                      {`npx install-mcp ${URL}/mcp/${key}/sse/${user} --client ${key}`}