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

# MCP Server (local)

> Run MemoryPlugin as a local MCP process so any MCP client can read and write your memory

export const ArticleInfo = ({author, lastUpdated}) => {
  const authorAvatar = author === 'Alara' ? '/images/author-alara.jpg' : author === 'asad' ? '/images/author-alara.jpg' : null;
  const formatDate = dateInput => {
    if (!dateInput) return '';
    if (typeof dateInput === 'string' && !dateInput.match(/^\d{4}-\d{2}-\d{2}/)) {
      return dateInput;
    }
    try {
      const date = new Date(dateInput);
      const now = new Date();
      const diffTime = Math.abs(now - date);
      const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
      if (diffDays === 0) return 'today';
      if (diffDays === 1) return '1 day ago';
      if (diffDays < 7) return `${diffDays} days ago`;
      if (diffDays < 30) return `${Math.ceil(diffDays / 7)} week${Math.ceil(diffDays / 7) > 1 ? 's' : ''} ago`;
      if (diffDays < 365) return `${Math.ceil(diffDays / 30)} month${Math.ceil(diffDays / 30) > 1 ? 's' : ''} ago`;
      return `${Math.ceil(diffDays / 365)} year${Math.ceil(diffDays / 365) > 1 ? 's' : ''} ago`;
    } catch {
      return dateInput;
    }
  };
  return <div style={{
    display: "flex",
    alignItems: "center",
    gap: "8px",
    marginBottom: "16px",
    padding: "8px 12px",
    backgroundColor: "var(--ifm-color-emphasis-100)",
    borderRadius: "6px",
    fontSize: "14px",
    color: "var(--ifm-color-content-secondary)",
    border: "1px solid var(--ifm-color-emphasis-200)",
    opacity: "0.8"
  }}>
      <div style={{
    width: "40px",
    height: "40px",
    borderRadius: "50%",
    background: authorAvatar || "linear-gradient(45deg, #4F46E5, #7C3AED)",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    color: "white",
    fontWeight: "bold",
    fontSize: "18px"
  }}>
        {authorAvatar ? <img src={authorAvatar} alt={author} style={{
    width: "100%",
    height: "100%",
    borderRadius: "50%"
  }} /> : author?.[0]?.toUpperCase()}
      </div>
      <div>
        <div style={{
    fontWeight: "400",
    fontSize: "14px"
  }}>Written by <span style={{
    fontWeight: "600"
  }}>{author}</span></div>
        <div style={{
    fontSize: "14px"
  }}>Last updated <span style={{
    fontWeight: "600"
  }}>{formatDate(lastUpdated)}</span></div>
      </div>
    </div>;
};

<ArticleInfo author="Alara" lastUpdated="2026-07-04" />

The Model Context Protocol (MCP) lets AI clients call external tools. MemoryPlugin ships an MCP server, so any MCP client can store and recall your memory and chat history through it. This page covers the **local** server, which runs on your machine via Node.js.

<Note>
  Most people should use the [hosted Remote MCP server](/integrations/remote-mcp-server) instead. It needs no Node.js and no token in a config file: you connect by URL and approve access in your browser. Use this local server only when you specifically want a process on your own machine, for example to keep the connection fully under your control or when your client cannot do the browser sign-in flow. The tools and data are the same either way.
</Note>

## What is MCP?

MCP is a standard from Anthropic for how AI apps talk to external tools and data sources. There are two halves:

* **MCP clients**: the app you chat in (Claude Desktop, Cursor, Windsurf, and others).
* **MCP servers**: tools the client can call. MemoryPlugin is one, and it adds memory and chat-history recall.

<Info>
  [Claude Desktop](https://claude.ai/download) is a common MCP client because Anthropic created the protocol, but 100+ other tools support MCP.
</Info>

## Requirements

You need three things:

1. **Node.js** to run the server. [Download it from nodejs.org](https://nodejs.org).
2. **An MCP client** such as Claude Desktop, Cursor, or Windsurf.
3. **A MemoryPlugin account** to get your auth token.

<Warning>
  Local MCP setup is more technical than the other integrations. You edit a JSON config file by hand and paste in a token. If that is not what you want, the [Remote MCP server](/integrations/remote-mcp-server) is the easier path.
</Warning>

## Setup

You do not install the server like an app. You add a config entry to your MCP client that tells it to run the MemoryPlugin server on demand.

<Steps>
  <Step title="Copy your auth token">
    In the [MemoryPlugin dashboard](https://memoryplugin.com/dashboard), open the account menu and go to **Settings → Integrations**. Under **Authentication Token**, click **Copy** to copy **Your Auth Token**.

    <Frame caption="Settings → Integrations: copy Your Auth Token, or regenerate it if it ever leaks.">
      <img src="https://mintcdn.com/memoryplugin/9o9T_0PzzkacB3w3/images/screenshots/tools/settings-integrations.png?fit=max&auto=format&n=9o9T_0PzzkacB3w3&q=85&s=aeb720a7556b580ce5bffd336cfcec2d" alt="Settings modal with the Integrations tab active, showing the masked Authentication Token field with Copy and Regenerate buttons" width="2400" height="1600" data-path="images/screenshots/tools/settings-integrations.png" />
    </Frame>

    <Warning>
      This token is like a password to your account. Paste it into your config, but never share it. If it leaks, click **Regenerate** on the same screen to invalidate the old one.
    </Warning>
  </Step>

  <Step title="Add the server to your client config">
    Add the MemoryPlugin entry to your client's MCP config file (see the example below) and paste your token in as `MEMORY_PLUGIN_TOKEN`.
  </Step>

  <Step title="Restart and use it">
    Restart your client so it picks up the new server. The AI then calls the MemoryPlugin tools when they are relevant.
  </Step>
</Steps>

<Info>
  Account email independence: Your MemoryPlugin sign‑in email does not need to match the email you use on ChatGPT, Claude, TypingMind, or any other tool. Access and permissions are tied to your MemoryPlugin account (and API key when applicable), not third‑party logins.
</Info>

For client-specific steps, see the [official MCP quickstart](https://modelcontextprotocol.io/quickstart/user) and the [@memoryplugin/mcp-server npm page](https://www.npmjs.com/package/@memoryplugin/mcp-server).

## Configuration example

Every MCP client has its own config format, but they follow the same shape. Here is an example for Claude Desktop:

```json theme={null}
{
  "mcpServers": {
    "memoryplugin": {
      "command": "npx",
      "args": ["@memoryplugin/mcp-server"],
      "env": {
        "MEMORY_PLUGIN_TOKEN": "your-auth-token-here"
      }
    }
  }
}
```

<Info>
  This runs `npx @memoryplugin/mcp-server` when the client needs it, which downloads and starts the server automatically. There is nothing to install ahead of time.
</Info>

## Supported MCP clients

<CardGroup cols={2}>
  <Card title="Claude Code" icon="code" href="https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview">
    Anthropic's official CLI tool
  </Card>

  <Card title="Cursor" icon="cursor" href="https://www.cursor.com/">
    AI-powered code editor
  </Card>

  <Card title="Windsurf" icon="wind" href="https://docs.windsurf.com/windsurf/mcp">
    AI development environment
  </Card>

  <Card title="Cline" icon="terminal" href="https://github.com/cline/cline">
    AI assistant for developers
  </Card>

  <Card title="Sage" icon="brain" href="https://sageapp.ai/">
    AI assistant application
  </Card>

  <Card title="Roo-Code" icon="code-branch" href="https://github.com/RooVetGit/Roo-Code">
    AI coding assistant
  </Card>

  <Card title="VS Code Copilot" icon="microsoft" href="https://code.visualstudio.com/docs/copilot/chat/mcp-servers">
    GitHub Copilot Chat in VS Code
  </Card>

  <Card title="And many more..." icon="ellipsis" href="#">
    Any client that speaks MCP works
  </Card>
</CardGroup>

## Available tools

The server exposes 12 tools, grouped by feature. Each tool ships with a description that tells the AI when and how to use it, so most of the time the client calls the right one on its own.

### Memory tools

| Tool                       | Description                                                                                                               |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `store_memory`             | Save information for future recall. The AI is prompted to proactively save preferences, decisions, and important context. |
| `get_memories_and_buckets` | Retrieve saved memories, optionally filtered by bucket. Also returns the available buckets.                               |
| `search_memories`          | Semantic search across memories, ranked by relevance.                                                                     |
| `list_buckets`             | List your memory buckets.                                                                                                 |
| `create_bucket`            | Create a new bucket to organize memories.                                                                                 |
| `update_or_move_memories`  | Edit a memory's text, move it to another bucket, or bulk-move up to 100 memories at once.                                 |

### Smart Memory tools

For buckets with Smart Memory enabled:

| Tool                     | Description                                                                       |
| ------------------------ | --------------------------------------------------------------------------------- |
| `list_bucket_categories` | Get the Smart Categories for a bucket, including summaries and topic information. |
| `list_category_memories` | Load every memory in a specific category.                                         |

### Chat History tools

Search and pull from your imported and synced conversations:

| Tool                       | Description                                                                                               |
| -------------------------- | --------------------------------------------------------------------------------------------------------- |
| `recall_chat_history`      | Search past conversations and get synthesized context back. Supports parallel queries for complex topics. |
| `get_conversation_summary` | Get one conversation's details: the full transcript for short chats, an AI summary for long ones.         |
| `get_full_conversation`    | Retrieve the complete transcript of a past conversation.                                                  |

### File tools

Query your uploaded documents:

| Tool                    | Description                                                                               |
| ----------------------- | ----------------------------------------------------------------------------------------- |
| `search_uploaded_files` | Search documents in your file buckets. Returns relevant passages with file and page info. |

<Note>
  Chat History recall returns about 600 tokens of context by default, up to a hard cap of 2,000. That keeps recall useful without flooding the conversation.
</Note>

## What you get through MCP

* **Memories** stored and recalled across conversations
* **Buckets** to keep separate contexts apart
* **Smart Memory** categories and summaries
* **Chat History** search across your imported conversations
* **File search** over your uploaded documents
* The same data across every tool you connect, because it all reads one account

## Troubleshooting

<AccordionGroup>
  <Accordion title="Node.js not found">
    Confirm Node.js is installed and on your PATH. Run `node --version` in a terminal; you should see a version like `v20.10.0`.
  </Accordion>

  <Accordion title="Auth token invalid">
    Recopy the token from **Settings → Integrations** and make sure you pasted the whole string. If in doubt, click **Regenerate** and update your config with the new token.
  </Accordion>

  <Accordion title="MCP server not connecting">
    1. Check the config file for typos.
    2. Confirm the config is in the location your client expects.
    3. Run `npx @memoryplugin/mcp-server` directly in a terminal to see if it starts.
  </Accordion>

  <Accordion title="Tools not appearing">
    Restart your client fully. Some clients only detect new servers on a clean restart.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Remote MCP server" icon="cloud" href="/integrations/remote-mcp-server">
    The easier, no-install path: connect by URL
  </Card>

  <Card title="Memory Buckets" icon="folder" href="/features/memory-buckets">
    Organize your memories into separate contexts
  </Card>

  <Card title="Smart Memory" icon="brain" href="/features/smart-memory">
    AI-organized categories and summaries
  </Card>

  <Card title="File Buckets" icon="folder-open" href="/features/file-buckets">
    Upload documents to query via MCP
  </Card>
</CardGroup>
