# Cursor

> Connect MMW to Cursor through the local agent or over direct HTTP, globally or for a single project.

On this page you will connect MMW to Cursor, decide where the configuration goes (all projects or just one), and check that Cursor's agent can see your memory.

## What you get

- The `remember`, `search`, `forget`, `validate_memory` and `gateway_call` tools in Cursor's agent.
- `mmw_sync_status` when you connect through the local agent.
- Memory shared with Claude Code, Codex and claude.ai: a fact saved in Claude Code in the morning is found by Cursor in the afternoon.

Cursor session history is not uploaded: the agent uploads Claude Code and Codex sessions only.

## Prerequisites

- An MMW API key (starts with `mmw_`); see the [Quickstart](/start/quickstart/).
- Cursor with MCP support.
- For the local agent: Python 3.11+ and [uv](https://docs.astral.sh/uv/) (the `uvx` command).

## Where the config goes

| File | Applies to |
|---|---|
| `~/.cursor/mcp.json` | Every project (recommended). |
| `.cursor/mcp.json` in the project root | This project only. |

A project-level `.cursor/mcp.json` is easy to commit together with your key by accident. Add it to `.gitignore` or use the global file.

## Setup

1. Open or create the configuration file (global or project).

2. Add an `mmw` block to `mcpServers`:

   ```json title="~/.cursor/mcp.json"
   {
     "mcpServers": {
       "mmw": {
         "command": "uvx",
         "args": ["--from", "https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl", "mmw-agent"],
         "env": {
           "MMW_API_KEY": "mmw_your_key",
           "MMW_ENDPOINT": "https://mcp.mmwhub.tech"
         }
       }
     }
   }
   ```

3. Save the file and restart Cursor (or toggle the server in the MCP settings).

1. Open or create the configuration file (global or project).

2. Add an `mmw` block to `mcpServers`:

   ```json title="~/.cursor/mcp.json"
   {
     "mcpServers": {
       "mmw": {
         "url": "https://mcp.mmwhub.tech/mcp",
         "headers": { "Authorization": "Bearer mmw_your_key" }
       }
     }
   }
   ```

   Nothing to install, but no `mmw_sync_status`.

3. Save the file and restart Cursor (or toggle the server in the MCP settings).

## Verify

1. Open Cursor's settings, MCP section. The `mmw` server should show a green indicator and the tool list: `remember`, `search`, `forget`, `validate_memory`, `gateway_call` (plus `mmw_sync_status` through the agent). Where the section lives depends on your Cursor version.

2. In chat, in agent mode, ask:

   ```text
   Remember in MMW: run integration tests with --forked, otherwise the database fixture fails. Fact key: tests-run.
   ```

   Cursor proposes a `remember` call; once you approve, the record is saved with the `unverified` status.

3. In a new chat ask:

   ```text
   How do we run integration tests? Check MMW.
   ```

   Expected answer: the agent calls `search` and replies that tests run with `--forked`.

## Common problems

With the agent, Cursor usually cannot find `uvx` or Python is older than 3.11: put the full path to `uvx` in `command` (`which uvx` on macOS and Linux, `where uvx` on Windows). With a direct connection, check the URL and the `Authorization` header.

The key is missing, revoked or expired. Check the key in `mcp.json` and issue a new one in your account if needed.

MCP tools work in agent mode. Add a Cursor project rule telling the agent to search MMW before starting a task and to save decisions it makes; see [Best practices](/memory/best-practices/).

## What's next
