|
| 1 | +# Basic Memory MCP Server Extension for Zed |
| 2 | + |
| 3 | +This extension integrates [Basic Memory](https://github.com/basicmachines-co/basic-memory) as a context server for [Zed's](https://zed.dev) [Assistant](https://zed.dev/docs/assistant/assistant). |
| 4 | + |
| 5 | +Basic Memory lets you build persistent knowledge through natural conversations with Large Language Models, while keeping everything in simple Markdown files on your computer. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +- Python 3.12+ |
| 10 | +- [uv](https://github.com/astral-sh/uv) installed |
| 11 | + |
| 12 | +> **⚠️ Important Note**: This extension currently requires Zed to support MCP tools, which is still in development. While you can install the extension now, its functionality will become available once Zed adds MCP tools support in a future update. Follow [Zed's releases](https://github.com/zed-industries/zed/releases) for updates. |
| 13 | +
|
| 14 | +## Installation |
| 15 | + |
| 16 | +### 1. Install uv and Basic Memory |
| 17 | + |
| 18 | +```bash |
| 19 | +pip install uv |
| 20 | +uv tool install basic-memory |
| 21 | +``` |
| 22 | + |
| 23 | +### 2. Install the extension |
| 24 | + |
| 25 | +Navigate to: **Zed** > **Extensions**. Or use the command palette to search for "extensions". |
| 26 | + |
| 27 | +### 3. Configure the extension |
| 28 | + |
| 29 | +Add the following to your Zed settings: |
| 30 | + |
| 31 | +```json |
| 32 | +{ |
| 33 | + "context_servers": { |
| 34 | + "mcp-server-basic-memory": { |
| 35 | + "settings": { |
| 36 | + "project": "optional-project-name" |
| 37 | + } |
| 38 | + } |
| 39 | + } |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +The `project` setting is optional: |
| 44 | + |
| 45 | +- If specified, Basic Memory will use the named project for storing and accessing notes |
| 46 | +- If omitted, Basic Memory will use its default project (typically stored in `~/basic-memory/config.json`, or set in the `BASIC_MEMORY_PROJECT` environment variable) |
| 47 | + |
| 48 | +You can configure these settings either: |
| 49 | + |
| 50 | +- Globally in your Zed settings.json |
| 51 | +- Per-project in your project settings |
| 52 | +- Or omit them to use Basic Memory's default project |
| 53 | + |
| 54 | +## Usage |
| 55 | + |
| 56 | +Once configured, Basic Memory will be available in the Zed Assistant. You can use prompts like: |
| 57 | + |
| 58 | +- "Create a note about software architecture patterns" |
| 59 | +- "What do I know about functional programming?" |
| 60 | +- "Search my notes for information about React hooks" |
| 61 | + |
| 62 | +## Multiple Projects |
| 63 | + |
| 64 | +Basic Memory supports multiple projects to separate different kinds of notes. If you work on different codebases or subjects, you might want to maintain separate knowledge bases for each. |
| 65 | + |
| 66 | +## Building the Extension |
| 67 | + |
| 68 | +This extension needs to be compiled to WebAssembly (WASM): |
| 69 | + |
| 70 | +1. **Add the WASM target to your Rust toolchain:** |
| 71 | + |
| 72 | + ``` |
| 73 | + rustup target add wasm32-wasip1 |
| 74 | + ``` |
| 75 | + |
| 76 | +2. **Build the extension:** |
| 77 | + |
| 78 | + ``` |
| 79 | + cargo build --target wasm32-wasip1 --release |
| 80 | + ``` |
| 81 | + |
| 82 | +### Local Testing |
| 83 | + |
| 84 | +For testing locally: |
| 85 | + |
| 86 | +1. Build the extension as described above |
| 87 | +2. In Zed, open Extensions (⌘ + Shift + E) |
| 88 | +3. Click "Install Dev Extension" and select the extension directory |
| 89 | +4. Your dev extension will override any published version with the same name |
| 90 | + |
| 91 | +> Note: When installing as a dev extension, Zed will automatically use the build artifacts from your target directory. |
| 92 | +
|
| 93 | +## Basic Memory Resources |
| 94 | + |
| 95 | +For more detailed information about Basic Memory, visit: |
| 96 | + |
| 97 | +- [Basic Memory Documentation](https://memory.basicmachines.co/) |
| 98 | +- [GitHub Repository](https://github.com/basicmachines-co/basic-memory) |
| 99 | + |
| 100 | +## License |
| 101 | + |
| 102 | +This project is licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at: |
| 103 | + |
| 104 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 105 | + |
| 106 | +This extension interfaces with the `basic-memory` MCP server, which is a separate product developed by [Basic Machines](https://github.com/basicmachines-co) and is licensed under the GNU Affero General Public License, Version 3.0 (AGPL-3.0). The `basic-memory` MCP server's license can be found at: |
| 107 | + |
| 108 | + https://www.gnu.org/licenses/agpl-3.0.html |
| 109 | + |
| 110 | +Please note that while this extension is distributed under the Apache 2.0 License, if you use the `basic-memory` MCP server through this extension, you must comply with its AGPL-3.0 license terms. This extension itself does not incorporate any code from the `basic-memory` MCP server; it only provides an interface to communicate with it as an external service. |
0 commit comments