The Smritea plugin: persistent memory for Claude Code and Cursor

The Smritea plugin: persistent memory for Claude Code and Cursor

by Tushar Dwivedi
Ask AI about this page

The Smritea plugin gives an AI coding assistant memory that lasts across sessions. For Claude Code, it adds slash commands, a session-start hook, a skill and the MCP tools. For Cursor, it adds the MCP tools, a rule and a skill.

Claude installation

  1. Add the Smritea marketplace.

    /plugin marketplace add SmrutAI/smritea-plugin
  2. Install the plugin.

    /plugin install smritea@smritea
  3. Reload plugins.

    /reload-plugins
  4. Log in with /smritea:login. Then pick an app with npx -y smritea-mcp configure, or ask the assistant to use the list_apps and select_app tools.

The commands

The plugin adds four slash commands to Claude Code. The table says what each command does.

CommandWhat it does
/smritea:loginSigns you in through the browser
/smritea:configRuns the smritea-mcp configure setup wizard
/smritea:add-memory <text>Stores the text as a memory, exactly as you typed it
/smritea:recall <topic>Searches memories about the topic, up to 10 results, and summarizes them

What the session hook does

When a Claude Code session starts, the hook searches your selected app for relevant memories. It adds the top 10 to the session as context.

  • If you set a project name, the hook keeps only memories with the same project_name metadata. The add_memory tool adds that metadata. A memory you added through an SDK has no project_name, so the hook skips it.
  • If you have not selected an app, or you are not logged in, the hook prints a message that says what to run.
  • If the hook fails, it prints a warning. It never blocks your session.

Cursor installation

The Cursor package holds the MCP configuration, an always-on rule and a skill. The rule makes the assistant search memories at the start of each conversation.

  • On Teams or Enterprise, an admin imports https://github.com/SmrutAI/smritea-plugin as a team marketplace. Members then install smritea.
  • For a local copy, copy the cursor/ folder of the plugin repository to ~/.cursor/plugins/local/smritea. Then run Developer: Reload Window.

Cursor does not get the session-start hook or the slash commands. Run npx -y smritea-mcp login and npx -y smritea-mcp configure in a terminal.

Where it keeps its settings

The plugin reads the same files as the MCP server: ~/.smritea/settings.json and ~/.smritea/auth.json. It does not read environment variables. If your app is in India, set memory_base_url in settings.json to https://api-in.smritea.ai.

Learn more

The docs page Claude Code and Cursor plugin covers the same steps. The MCP server post explains the tools the plugin uses.

Related posts

Comments