Easily manage AI context for your projects using the Memory Bank technique. This extension integrates with the Model Context Protocol (MCP) to provide structured AI interactions with Cursor.
Note: This extension is designed to work exclusively with Cursor IDE, not with VS Code. (Maybe will add support for VSCode in the future)
- Creates and manages a collection of Memory Bank files to maintain context across AI interactions
- Seamlessly integrates with Cursor AI through the Model Context Protocol (MCP)
- Provides a simple interface for accessing and updating memory bank files
- Automatically configures Cursor's MCP integration settings for easy connection
- Helps maintain and access project context across different sessions
- Open Cursor
- Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "AI Memory"
- Click "Install"
- Download the latest
.vsix
file from GitHub releases - In Cursor, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run "Extensions: Install from VSIX..." and select the downloaded file
- Install the extension (see above)
- Create a workspace folder for your project (if you haven't already)
- Run the
AI Memory: Start MCP
command from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) - The extension will:
- Create a
memory-bank
folder in your workspace root if it doesn't exist - Start the MCP server (default port: 7331, fallback: 7332)
- Automatically update your Cursor MCP configuration to connect to the server
- Create a
The extension creates and manages these core files in the memory-bank
folder:
projectbrief.md
: Foundation document that shapes all other filesproductContext.md
: Why this project exists, problems it solves, user experience goalsactiveContext.md
: Current work focus, recent changes, next stepssystemPatterns.md
: System architecture, key technical decisions, design patternstechContext.md
: Technologies used, development setup, technical constraintsprogress.md
: What works, what's left to build, current status, known issues
Once the MCP server is running, you can use AI Memory with Cursor in two ways:
-
Direct interaction with Cursor AI: Cursor will automatically access the memory bank context when you chat with it.
-
Using
/memory
commands: Type commands like/memory status
in the Cursor chat to interact with your memory bank.Available commands:
/memory status
: Check the status of the memory bank/memory list
: List all memory bank files/memory read <filename>
: Read a specific memory bank file
Run the AI Memory: Open Dashboard
command to open a dashboard interface for viewing and managing your memory bank files.
If you experience issues connecting to the MCP server from Cursor:
-
Check server status: Ensure the server is running by visiting
http://localhost:7331/health
in your browser. You should see{"status":"ok ok"}
. -
Port conflicts: If port 7331 is in use, the extension will try port 7332. Check the extension output to see which port was actually used.
-
Manual config update: Run the
AI Memory: Update Cursor MCP Config
command to manually update the Cursor configuration. -
Connection issues: If you see "Client closed" errors:
- Make sure no firewalls are blocking localhost connections
- Try restarting the MCP server with
AI Memory: Start MCP
again - Check the extension's output panel for error messages
For detailed troubleshooting steps, see TROUBLESHOOTING.md.
Contributions to AI Memory are welcome! This project uses automated versioning and release processes.
This project follows the Conventional Commits standard for commit messages:
feat:
- A new feature (triggers a minor version bump)fix:
- A bug fix (triggers a patch version bump)docs:
- Documentation changesstyle:
- Code style changes (formatting, etc.)refactor:
- Code changes that neither fix bugs nor add featuresperf:
- Performance improvementstest:
- Adding or modifying testschore:
- Changes to the build process or auxiliary toolsBREAKING CHANGE:
- Changes that break backward compatibility (triggers a major version bump)
When you push to the main
branch, the following happens automatically:
- A GitHub Action analyzes your commit messages
- The version in
package.json
is bumped based on the commit types - A new tag is created and pushed
- A GitHub release is created with the packaged VSIX file
- The extension is published to VS Code Marketplace and Open VSX Registry (if tokens are configured)
To enable automated publishing to the extension marketplaces, set up these repository secrets in your GitHub repository:
-
GH_TOKEN
(optional): Personal Access Token with 'repo' scope (used for pushing version changes)- If not provided, the workflow will use the default
GITHUB_TOKEN
with write permissions - Create this token at https://github.com/settings/tokens
- If not provided, the workflow will use the default
-
VSCE_PAT
(optional): Personal Access Token for VSCode Marketplace publishing- Create this token at https://dev.azure.com/
- Instructions: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token
-
OVSX_PAT
(optional): Personal Access Token for Open VSX Registry publishing- Create this token at https://open-vsx.org/
- Instructions: https://github.com/eclipse/openvsx/wiki/Publishing-Extensions#how-to-publish-an-extension
To add these secrets:
- Go to your repository on GitHub
- Navigate to Settings > Secrets and variables > Actions
- Click "New repository secret"
- Add each token with its corresponding name
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes using the conventional format (
git commit -m 'feat: add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
-
Clone the repository:
git clone https://github.com/Ipenywis/aimemory.git cd aimemory
-
Install dependencies:
pnpm install
-
Build the extension:
pnpm run compile
-
Start the watch process for automatic rebuilding:
pnpm run watch
-
Launch the extension in debug mode:
- Press F5 in Cursor
- Or run the "Run Extension" launch configuration
-
Test the extension:
- Run commands from the Command Palette
- Use
/memory
commands in Cursor AI
To package the extension for distribution:
pnpm run package
pnpm run package:vsce
The VSIX file will be created in the project root directory.
Apache 2.0
Enjoy!