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

# Cursor

> Give Cursor persistent, cross-session memory with Memanto — via the CLI connector or as an MCP server.

# Cursor + Memanto

![Cursor](https://mintcdn.com/memanto/7cqii5_wGejS32un/logo/integrations/cursor.svg?fit=max\&auto=format\&n=7cqii5_wGejS32un\&q=85\&s=60cc73f322350713c6841408a08de02b)

Connect [Cursor](https://cursor.com) to Memanto so it can store facts, decisions, and preferences and recall them across sessions.

## Connect via CLI (recommended)

```bash theme={null}
memanto connect cursor
```

This installs a Cursor-specific rules file (`.cursor/rules/memanto.mdc`) and registers the memanto MCP server in `.cursor/mcp.json` (see [MCP server setup](https://docs.memanto.ai/cli/connect/connect.md#mcp-server-setup)). If `memanto-mcp` isn't installed, you get the `memanto-memory` skill instead. Add `--global` to install to `~/.cursor/` for every project:

```bash theme={null}
memanto connect cursor --global
```

The connector also writes `sessionStart` and `preCompact` hooks into Cursor's `hooks.json`, so [`memanto memory sync`](https://docs.memanto.ai/cli/data/sync) refreshes the memories in `.cursor/rules/memanto.mdc` when a session starts and again before context is compacted.

## Connect via MCP

`memanto connect cursor` already registers the MCP server. To configure it by hand instead, edit `~/.cursor/mcp.json` (per-user) or `.cursor/mcp.json` (per-project):

```json theme={null}
{
  "mcpServers": {
    "memanto": {
      "command": "memanto-mcp",
      "env": {
        "MOORCHEH_API_KEY": "mch_xxxxxxxxxxxxxxxxxx",
        "MEMANTO_DEFAULT_AGENT_ID": "cursor-workspace"
      }
    }
  }
}
```

Reload Cursor and confirm `memanto` shows up with **7 tools**. See the [MCP integration guide](https://docs.memanto.ai/integrations/mcp.md) for the full server reference.

## Next Steps

* [CLI: connect command](https://docs.memanto.ai/cli/connect/connect.md)
* [MCP Integration](https://docs.memanto.ai/integrations/mcp.md)
* [Memory Types Reference](https://docs.memanto.ai/reference/memory-types.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.