> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sovseal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Persistent Memory for Cursor AI with sovseal MCP

> Wire the sovseal MCP server into Cursor so your AI agent remembers code style choices, design decisions, and package versions across every session.

sovseal gives Cursor's AI agent a persistent memory layer that outlives individual sessions. Once configured, the agent can recall your preferred frameworks, database choices, package version overrides, and design decisions without you having to re-explain them every time you open a project. Cursor supports MCP servers natively, so no signup or cloud configuration is required for the local memory tier.

## Installation

You can add the sovseal MCP server through the Cursor UI or by editing the config file directly.

<Tabs>
  <Tab title="Cursor Settings UI">
    <Steps>
      <Step title="Open Cursor Settings">
        Click the gear icon in the top-right corner of the Cursor window.
      </Step>

      <Step title="Navigate to MCP">
        Go to **Features** → **MCP**, then click **+ Add New MCP Server**.
      </Step>

      <Step title="Fill in the server details">
        Enter the following values:

        | Field   | Value                        |
        | ------- | ---------------------------- |
        | Name    | `sovseal-memory`             |
        | Type    | `stdio`                      |
        | Command | `npx -y @sovseal/mcp-server` |
      </Step>

      <Step title="Save and reload">
        Click **Save**. Cursor will start the MCP server in the background. The `store_memory` and `recall_memory` tools become available in the Agent chat panel.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Config file">
    Add the following block to your global `~/.cursor/mcp.json` for memory shared across all projects, or to `.cursor/mcp.json` inside a specific project root for project-scoped memory:

    ```json ~/.cursor/mcp.json theme={null}
    {
      "mcpServers": {
        "sovseal-memory": {
          "command": "npx",
          "args": ["-y", "@sovseal/mcp-server"]
        }
      }
    }
    ```

    Save the file and restart Cursor to apply the change.
  </Tab>
</Tabs>

## Add proactive recall with Cursor Rules

By default, the agent only calls memory tools when you explicitly ask. To make Cursor automatically recall relevant context before every response, add the following instructions to **Cursor Settings → General → Rules for AI**, or create a `.cursorrules` file at the root of your project:

```text .cursorrules theme={null}
Always invoke the `recall_memory` tool as your first action on any new user request
to retrieve historical context, past code decisions, and user stack preferences.
Do not ask the user for context if it can be retrieved via a recall query.
When the user shares a persistent stack choice, API change, or file path decision,
call `store_memory` immediately to persist it for future sessions.
```

## Project-scoped vs. global memory

By default, sovseal writes all memories to `~/.sovseal/db/memories.lance`, which is shared across every project. If you want to prevent React Native context from bleeding into a Rust project, set the `SOVSEAL_DB_DIR` environment variable to a project-local path:

```json .cursor/mcp.json theme={null}
{
  "mcpServers": {
    "sovseal-memory": {
      "command": "npx",
      "args": ["-y", "@sovseal/mcp-server"],
      "env": {
        "SOVSEAL_DB_DIR": "./.sovseal/db"
      }
    }
  }
}
```

Memories stored with this config are written to `.sovseal/db/` inside the project folder and are never visible to other projects.

## Troubleshooting

**Tool fails to load in Cursor Chat**

* **Node.js version:** Cursor spawns MCP servers from its own background process using your system's global Node.js. Run `node -v` in a terminal and confirm it reports `>= 20.0.0`.
* **Warmup latency:** On the first run, the ONNX embedding model (\~22 MB) downloads to `~/.sovseal/models/`. The tool status in Cursor may show "Connecting…" for up to 30 seconds during this download — this is expected and happens only once.
* **Inspect the logs:** Open Cursor's developer console via **Help → Toggle Developer Tools → Console** and look for any MCP server error output.
